| Author |
Message |
cerickson
Joined: 20 May 2008
Location: Anchorage, AK, USA
|
|
Posted: 20 August 2008, 22:11 PM Post subject: Using constants for pin designations |
|
|
There is probably something obvious I am missing but here goes my question.
How do I set up public constants to refer to 1280n pins (ZX-1280n development board) via logical A-L port and bit designations that I can use with GetPin and PutPin?
I have been looking for the answer to this all morning in the documentation.
-Christopher Erickson |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Location: Portland, OR
|
|
Posted: 20 August 2008, 23:26 PM Post subject: Re: Using constants for pin designations |
|
|
| cerickson wrote: | | How do I set up public constants to refer to 1280n pins (ZX-1280n development board) via logical A-L port and bit designations that I can use with GetPin and PutPin? | On all ZX devices, you may refer to a pin by its physical pin number or by its port.bit designation. For example, on the ZX-1280n if you want to refer to bit 3 of port L you can use either 38 or L.3.
As for defining constants to refer to the pins, just define a Byte constant and specify its value as described above.
| Code: | | Public Const lcdPin as Byte = L.3 |
|
|
| Back to top |
|
 |
cerickson
Joined: 20 May 2008
Location: Anchorage, AK, USA
|
|
Posted: 20 August 2008, 23:29 PM Post subject: |
|
|
Yes, it figures that I would figure it out just minutes after I post my question!
My problem was that I was trying to implement a type conversion from a string that wasn't required.
Now I am off to discover my next challenge!
"We will never know how much we don't know"
-Chris |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Location: Portland, OR
|
|
Posted: 21 August 2008, 4:29 AM Post subject: |
|
|
| cerickson wrote: | | "We will never know how much we don't know" | The unknown unknowns are inscrutable indeed, as compared to the known unknowns, that is. |
|
| Back to top |
|
 |
spamiam
Joined: 13 Nov 2005
|
|
Posted: 22 August 2008, 14:38 PM Post subject: |
|
|
| dkinzer wrote: | | cerickson wrote: | | "We will never know how much we don't know" | The unknown unknowns are inscrutable indeed, as compared to the known unknowns, that is. |
Didn't Rumsfeld say something about this? Maybe the most intelligent thing he was recorded saying.
-Tony |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Location: Portland, OR
|
|
Posted: 22 August 2008, 17:24 PM Post subject: |
|
|
| spamiam wrote: | | Didn't Rumsfeld say something about this? | Yes |
|
| Back to top |
|
 |
|