Shop OBEX P1 Docs P2 Docs Learn Events
More I/O pins on BS2 ? — Parallax Forums

More I/O pins on BS2 ?

T&E EngineerT&E Engineer Posts: 1,396
edited 2005-11-15 15:28 in BASIC Stamp
I know you can add a 74HC595 for more HIGH or LOW outputs and you can add a 74HC165 for more HIGH or LOW inputs, but is there anyway to get more outputs that can pass other functions such as SHIFTOUT or PULSOUT without having to add another BS2.

BTW does someone have a drawing showing how to connect 2 BS2's or a BS2·to·a BS2p or something else.

What is a good upgrade to go to (from a BS2)?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-26 21:59
    Hello,

    ·· As far as passing internal functions, such as SHIFTOUT to external chips, no, but then, why would you need to?· 2 lines on the BASIC Stamp could handle quite a few devices connected for that.· You could expand their CS lines out onto shift registers if you want to.

    ·· As for everything else you asked for, there are dozens of free books as PDF downloads on our website which describe connecting devices, as well as networking two Stamp Modules.· In fact, the Stamp Editor Help file shows how to connect two Stamp Module together.

    ·· I guess I would recommend starting with "What's A Microcontroller?" and once you'd gotten through that, then try perusing StampWorks.· If there's a specific connection you're looking for a more precise link could be provided to you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-10-26 22:36
    Thanks Chris. It's good to know that I can use the Shiftout function on more than one device. However, I saw on a drawing sent in another post from Jon a 4.7K resistor was needed when connecting a 595 and 165 together. Is this always the case?

    I appreciate so much the support I get from guys like you, Jon and Bean!

    Any recommendations on an upgrade BS2 chip that will work in the Board of Education rev C?

    Thanks again,

    Timothy Gilmore
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-26 23:32
    It really depends on what exactly is connected.· If you look in the Projects Forum at a project called, "Binary Digital·Clock" you will see that I have connected a DS1302, DS1620, MAX7219 and three 74HC595s to the same two SPI lines, so it can be done quite easily.· Now, I did have to use protection resistors on the DS1302 and DS1620 data lines since they are bi-directional, but that's merely a safety issue.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 10/26/2005 11:35:04 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-26 23:39
    Tim,

    That 4.7K in my circuit is required in that specific design -- that resistor (and the circuit configuration) saves us a precious I/O pin. If you study the circuit you'll see that the Stamp pin connects to the input of the 74HC595 and through the 4.7K to the output of the 74HC165. With this resistor in place it doesn't matter what the output state of the '165 pin is, the '595 will always see the correct level from the BASIC Stamp. If you remove this resistor, there will be a conflict between the Stamp (when in output mode for the '595) and the '165 data pin.

    If you want "smart" external devices, you can always go Stamp-to-Stamp; use a serial connection for the Stamp master to send commands to a Stamp slave.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Clock LoopClock Loop Posts: 2,069
    edited 2005-11-11 17:48
    tdg8934 said...
    I saw on a drawing sent in another post from Jon a 4.7K resistor was needed when connecting a 595 and 165 together.

    I saw that one too, but can't find it now, any one have a link?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-11 18:21
    I think this is what you're looking for: http://forums.parallax.com/attachment.php?attachmentid=39221

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Jon MJon M Posts: 22
    edited 2005-11-14 17:49
    You could use a CDP68HC68P1 which gives 8 bi-directional I/O lines which can be individually controlled. You could have a number of these on the SPI interface giving for example 32 I/O's from 4 pins of your BS2. That would free up enough BS2 I/O's for other 'high speed' functions.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-14 18:33
    Jon M, you've confused your part numbers, the CDP68HC68P1 is a serial real-time clock with RAM, there are no general I/O pins on the chip. There are I2C I/O expansion chips from TI and Phillips that have 8 or 16 bits of general I/O. The PCA9535 is one example of these chips. Type I/O in the search dialog at www.digikey.com·then click on Interface catagory·for a complete listing. The PCF8574AN is a good one in DIP pakaging for under $2. Using the address pins A0-A2 provides upto 64 I/O using only 2 pins on the stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10

    Post Edited (Paul Baker) : 11/14/2005 6:41:39 PM GMT
  • Jon MJon M Posts: 22
    edited 2005-11-15 09:46
    Paul, afraid not the CDP68HC68P1 is an 8bit serial I/O port which I have used previously to expand the BS2 (in the days before the BS2p40). The datasheet is attached.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-15 14:34
    Puzzling, I checked the part through digikey's spec sheet database and there were none, I cannot look at the pdf at the moment, but will when I get to work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-15 15:28
    Well, there you have it, I stand corrected, turns out I was looking at the spec sheet for the CDP68HC68T1 series, guess T=time, P=port, I hate it when companies do that, standard practice is the last letter is packaging information, something that clearly wasn't adhered to in this example.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
Sign In or Register to comment.