Shop OBEX P1 Docs P2 Docs Learn Events
Add Stamp Lines — Parallax Forums

Add Stamp Lines

MRMR Posts: 46
edited 2007-10-11 02:39 in BASIC Stamp
I know its in the forum somewhere please direct me to the post I can't find it in the search.

Thanks.

I need to add more input/output pins using the basic stamp 2p40.

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-10-10 13:22
    MR -

    The most common way to add more input/output facilities is to use shift registers. An 8 bit shift register will gain I/O facility at the rate of 1 Stamp pin port per 8 devices. In other words if you use an 8-bit shift register, the state (ON-OFF, 0-1) of 8 external digital devices can be fetched with one PBASIC instruction (SHIFTIN/SHIFTOUT). Obviously if you use a 16-bit shift register that same ratio is 1 x 16.

    Two shift registers that are typically used with PBASIC Stamps are as follows:

    Input Usage -

    74xx165 8-bit parallal load shift register, parallel-in, serial-out

    Output usage -

    74xx595 8-bit shift register with internal storage register, parallel-out, serial-in/out, and tri-state outputs

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • DonDon Posts: 34
    edited 2007-10-10 18:40
    MR said...
    I need to add more input/output pins using the basic stamp 2p40.
    Another convenient method of I/O expansion is to use an I2C I/O expander like the PCF8574.· One of the advantages of this particular device is that its 8 I/O lines are bidirectional.· Prof. Anderson has an application note showing how to use this chip with the Basic Stamp at http://www.phanderson.com/stamp/i2c/8574.html.
    There are other methods of I/O expansion that may be useful to consider as well.· Several of them are described in an application note at http://www.zbasic.net/appNotes/AN203.pdf.· Although the app note is oriented toward a different microcontroller the ideas can be equally well applied to any microcontroller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don Kinzer

    ZBasic Microcontrollers
    http://www.zbasic.net
    ·
  • MRMR Posts: 46
    edited 2007-10-11 01:41
    Thanks For the Replys.

    I have a project where I am trying to drive 39 7 Segment Displays using 1 BS2P40. I know it can be done my friend did it but won't tell me how.

    I can drive three separate rows of 13 7 segment displays using three Stamps but I want to be able to drive all 39 displays with one stamp.


    I use common anode 7 segment displays and the 7 cathodes are connected to a 7447 BCD to 7 Segment decoder to reduce the amount of pins used on the stamp from 7 pins to four pins.

    All the cathodes are connected in parallel i.e. All Segment A's are connected together, B's, C's etc. I multiplex the displays by turning each segment on for only a certain amount of time. I don't have enough pins on the stamp to turn on all 39 anodes for each display using one stamp which is why I need to expand the amount of pins I have to be able to drive all the segments using one stamp. Please help me solve this problem.
  • Tony BoersmaTony Boersma Posts: 41
    edited 2007-10-11 02:39
    What about using a chip like the MAX7221 or MAX7219, SPI interfaced 7 segment display drivers. You can get samples from Maxim.
    www.maxim-ic.com
    Tony
Sign In or Register to comment.