Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Using constants for pin designations

 
Post new topic   Reply to topic    Forum Index -> ZX-1281
Author Message
cerickson



Joined: 20 May 2008
Posts: 30
Location: Waikoloa Village, HI, USA

Posted: 20 August 2008, 22:11 PM    Post subject: Using constants for pin designations Reply with quote

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
Posts: 2493
Location: Portland, OR

Posted: 20 August 2008, 23:26 PM    Post subject: Re: Using constants for pin designations Reply with quote

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
Posts: 30
Location: Waikoloa Village, HI, USA

Posted: 20 August 2008, 23:29 PM    Post subject: Reply with quote

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
Posts: 2493
Location: Portland, OR

Posted: 21 August 2008, 4:29 AM    Post subject: Reply with quote

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
Posts: 661

Posted: 22 August 2008, 14:38 PM    Post subject: Reply with quote

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
Posts: 2493
Location: Portland, OR

Posted: 22 August 2008, 17:24 PM    Post subject: Reply with quote

spamiam wrote:
Didn't Rumsfeld say something about this?
Yes
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZX-1281 Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group