Shop OBEX P1 Docs P2 Docs Learn Events
pin decleration for the BSp 40 pin stamp — Parallax Forums

pin decleration for the BSp 40 pin stamp

faisalfaisal Posts: 14
edited 2008-01-21 20:28 in BASIC Stamp
Hi all,

How do I declare a pin that is higher than 15.

eg.· Pin_Name PIN 16 does not work

any help would be appreciated.

Cheers
·

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-01-21 19:51
    Check out the AUXIO and MAINIO instructions in the IDE help file.

    Jeff T.
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2008-01-21 20:28
    Declare those pins as duplicates on 0 to 15, but precede the command that will reference the pin with the key words AUXIO or MAINIO. If a command uses two pins, (such as SHIFTOUT data and clock), both must be on the same bank of pins. Example:

    ' pins on mainio
    tiger PIN 0
    lion PIN 1
    jaguar PIN 2
    cat PIN 3

    ' pins on auxio
    fox PIN 0
    wolf PIN 1
    dog PIN 2

    MAINIO
    LOW tiger
    SHIFTOUT lion,jaguar,[noparse][[/noparse]mydata]
    HIGH tiger

    AUXIO
    LOW fox
    SHIFTOUT wolf,dog,[noparse][[/noparse]myotherdata]
    HIGH fox

    MAINIO
    PULSIN cat,1,[noparse][[/noparse]mydata]

    '...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.