Shop OBEX P1 Docs P2 Docs Learn Events
Max of 16 Pins Input to BS2 for button? — Parallax Forums

Max of 16 Pins Input to BS2 for button?

eflyefly Posts: 34
edited 2007-03-18 02:59 in BASIC Stamp
Dear all,
·
I have to build a project that require ~30 buttons control, however, according BS2 port there are only 16 pins that allow me to input,·are that any ways can increase number of the buttons?

Thank you very much. yeah.gif

=======================================================
'{$STAMP BS2}
DO
DEBUG ? IN0
DEBUG ? IN1
DEBUG ? IN2
DEBUG ? IN3
DEBUG ? IN4
DEBUG ? IN5
DEBUG ? IN6
DEBUG ? IN7
DEBUG ? IN8
DEBUG ? IN9
DEBUG ? IN10
DEBUG ? IN11
DEBUG ? IN12
DEBUG ? IN13
DEBUG ? IN14
DEBUG ? IN15·······················

IF (IN1=1)THEN LED_ON
LED_ON
HIGH 1

...
...

ELSE
LOW 1

ENDIF

LOOP
=======================================================

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-18 02:59
    Efly,

    Our Stamp Works manual shows how to expand your inputs/outputs using shift registers. You can download a free PDF version of the manual from our website at the following link. Take care.

    http://www.parallax.com/detail.asp?product_id=27220

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.