Using constants for pin designations

Discussion specific to the ZX-1281 and ZX-1280 microcontrollers as well as the ZX-1281 and ZX-1280 Dev Boards.
Post Reply
cerickson
Posts: 45
Joined: 20 May 2008, 15:50 PM
Location: Waikoloa Village, HI, USA
Contact:

Using constants for pin designations

Post by cerickson »

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
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Using constants for pin designations

Post by dkinzer »

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: Select all

Public Const lcdPin as Byte = L.3
- Don Kinzer
cerickson
Posts: 45
Joined: 20 May 2008, 15:50 PM
Location: Waikoloa Village, HI, USA
Contact:

Post by cerickson »

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
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

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.
- Don Kinzer
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

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
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

spamiam wrote:Didn't Rumsfeld say something about this?
Yes
- Don Kinzer
Post Reply