Pin multiplier questions...
HomeSchoolDad
Posts: 32
Greetings all!
In the post below Jon (great resource that guy!) gave a circuit diagram of using a 74HC595 and a 75HC165 to create additional I/O when you run out of pins. That diagram uses 3 stamp pins (I use a BS2pe) to create the additional I/O by combining the clock signals.
http://forums.parallax.com/showthread.php?p=548988
Here is what I would like to know:
Thanks in advance for your responses!
Jeff
In the post below Jon (great resource that guy!) gave a circuit diagram of using a 74HC595 and a 75HC165 to create additional I/O when you run out of pins. That diagram uses 3 stamp pins (I use a BS2pe) to create the additional I/O by combining the clock signals.
http://forums.parallax.com/showthread.php?p=548988
Here is what I would like to know:
- Do I understand that this gives me 16 pins organized as 8 ins and 8 outs so that I have (for instance) 8 buttons and 8 LEDs?
- Could I use multiple chips to create more inputs/outputs from the same 3 pins?
- Can I tie other clocks (such as serial flash memory) to this clock to reduce my overall pin usage?
- Is this within reason as fast as direct pin use and worthwhile to do rather than changing the design to use the BS2p40?
Thanks in advance for your responses!
Jeff
Comments
[*]Could I use multiple chips to create more inputs/outputs from the same 3 pins?[*]You can daisy-chain up to 8 chips, giveing you 64 outputs.
[*]Can I tie other clocks (such as serial flash memory) to this clock to reduce my overall pin usage?[*]Probably.
[*]Is this within reason as fast as direct pin use and worthwhile to do rather than changing the design to use the BS2p40?[*]Absolutely, as far as simple outputs go.· Remember, the outputs are "dumb terminals".· They can not sense anything
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
2. Yes; you should be able to daisy-chain devices (I've not done it with that circuit, but nothing jumps out at me as being a problem)
3. Yes, so long as the device is being controlled by the Stamp
4. Not as fast as with a BS2p40 (since you have serial/parallel conversion), but still a cheap way to add simple I/O
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
This sounds like a winner, but I·can't seem to wrap my head around how exactly a daisy chain with these devices would be accomplished.
Also, the MCP23016 seems like a good idea just because it looks like it would give me the option of In, Out, or I/O an any extended pin, but it is I2C so I suspect much slower.· Also, I am already using the 0/1 pin·set for the bluetooth app·header and the 8/9 pin set for an I2C LCD - can I share one of these with that chip?· Can I chain that chip·for more pins?· Is it much slower/costlier than the 74HC595 and 75HC165 option?
As usual, you guys are the greatest - thanks again for the replies.
··· Jeff
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Post Edited (Jon Williams (Parallax)) : 10/12/2005 1:39:24 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
I barely had time to send another email before I got your replies!
I am running a BS2pe so it has the I2C code in it and the price of the MCPs are wonderful so it looks like my decision is made!· You guys ROCK.
THANK YOU.
··· Jeff
Since your level of electonics "expertise" is unknown to me, let me approach your question from a logical or physical point of view, as opposed to an electrical/electronics point of view. The answer is the same, only the specific words used will really differ.
When you're dealing with shift registers or latches of the type being discussed, the primary feature which makes them so desirable for pin expansion is the fact that in addition to any other qualities they may have, they are parallel to serial or serial to parallel (depending on how you choose to view it) devices. What this means is that 8 adjacent pins (PARALLEL) on the chip, which can operate independently, can be set or queried by inspection or manipulating the continuous string (8 bits or more) of bits (SERIAL) which can be sent or received from these devices. The number of parallel pins, and thus the number of bits in the serial steam representing those pins, is device dependent.
Shift registers and latches generally come in multiples of 8 bits (8, 16, 32, 64) and there is always a direct correlation and 1-to-1 relationship between the number of adjacent I/O pins (PARALLEL) and the number of bits in the resultant bit string (SERIAL). 8 I/O pins yields 8 bits of serial data, 16 I/O pins yields 16 bits of serial data, etc.
Many if not most of these chips are designed in such a way that they can be cascaded. The (additional) input from one stage, can come from the output of a prior stage. Thus, if so cascaded, one can extract 16 bits of serial data from a cascaded pair of 2 x 8 parallel devices. This continues in effect, upwards; 16 = 2 x 8, 24 = 3 x 8, 32 = 4 x 8, etc.
I hope that gives you a better feel for what goes on with "daisy chaining" or cascading shift registers. BTW - My hat is off to all who home-school, and have that sort of patience!
Regards,
Bruce Bates
73
spence
k4kep
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·