Shop OBEX P1 Docs P2 Docs Learn Events
any answers — Parallax Forums

any answers

bandrbandr Posts: 3
edited 2009-02-23 16:44 in BASIC Stamp
hello

this is my first post in this forum and i hope to be a new freind for all of you.

i'm working now on my first project with parallax parts ,

my question is :

how can i define the pins ( in baisc stamp 2)· in an array?

for example:

i recive 5 bits to (0,1,2,3,4) pins from some switchs and i would like to define them as array or a byte with 3 (don't care bits) ?

then· i use them in the proggram then i send them through anthor pins (i.e. pin6,pin7,pin8,pin9,pin10) ?

how can i do this as code

thank you.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-23 16:44
    The I/O pins are actually bits in a 16 bit variable (INS / OUTS) which you can reference like any other variable including as a bit array. There's a detailed discussion in the Stamp Manual pages 81-91.
Sign In or Register to comment.