Pin conservation, sneaky modulating tricks?
Jason Smith
Posts: 2
I'm creating a game show buzzer, and have hit a hurdle in that I need more pins than I have available. I use 3 pins for the buzzers (1 each), 4 pins for LEDS to indicate status (player 1,2,3 buzzed, and buzzer ready). Status updates are sent to the computer via serout, so I need those pins too. Now I have 3 judge panels, with three buttons each (thus requiring 9 pins) that I need to read. Is there some quick and clever way to use one pin for the three buttons? Maybe some easy way to create an oscillating signal I can interpret?
Comments
If that won't work for you, use a 74HC165 serial shift register to expand the Stamp's input pin capability. There's a discuss of this and some programming examples in the StampWorks manual that you can download.
Post Edited (Mike Green) : 8/16/2007 5:11:43 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You could use the 74LS165 multiplexer chip to read up to 8 inputs with only 3 pins.
There are schematics and source code examples detailed in the Stamp Works article available on Parallax's web site here.
I used this with great success in my RoboSpinArt project. The 74ls165 reads four direction joystick switches and four pump activation switches.
Vern
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
David
There are 10 types of people in this world,...
Those that understand binary numbers, and those that don't!!!
3 chips will give you 24 inputs from 3 pins!
And while your at it get some 74HC595 and do the same with the outputs.
·Parallax sells them:
http://www.parallax.com/detail.asp?product_id=602-00010
http://www.parallax.com/detail.asp?product_id=602-00009
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
Post Edited (TechnoRobbo) : 8/19/2007 4:14:53 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
[url=:openreq('http://www.ortodoxism.ro/datasheets/philips/74HC_HCT165_CNV_2.pdf')][/url]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing like a new idea and a warm soldering iron.