Shop OBEX P1 Docs P2 Docs Learn Events
Stamp 2P40 how to address pins????? — Parallax Forums

Stamp 2P40 how to address pins?????

Brian DalzielBrian Dalziel Posts: 17
edited 2005-02-03 21:47 in BASIC Stamp
Hello,

How do you address the i/o pins on a 2P40 IN PBasic? Is it:

PO - P15, X0 - X15

OR

0 - 31


For example,

HIGH [noparse][[/noparse]pin#]

Would you put HIGH 31 (for the last i/o pin) or HIGH X15 or something else?


Thanks

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-02-03 21:47
    The pins on the BS2p40 are banked. To get to P0 - P15 issue the MAINIO command. To get to A0 - A15 you would use the AUXIO command. There is a third command, IOTERM, that lets you specify which group of pins the succeeding instructions will follow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.