Basic Stamp to work like a cd 4017 counter
Frank123
Posts: 4
Hello
I am trying to build a circuit using the basic stamp 1 for a disabled person. The stamp needs to function like a Cd 4017 decade counter. With one switch closure one output will go high while the other outputs are low. Then with another switch closure that high output goes low and the next output goes high and sequence down the line until all the outputs are low again. What I need is some help or direction to a starting point to write my program.
Thanks for your help
I am trying to build a circuit using the basic stamp 1 for a disabled person. The stamp needs to function like a Cd 4017 decade counter. With one switch closure one output will go high while the other outputs are low. Then with another switch closure that high output goes low and the next output goes high and sequence down the line until all the outputs are low again. What I need is some help or direction to a starting point to write my program.
Thanks for your help
Comments
First, your ROI will be poor; you're using a $29 BS1 to simulate a 50-cent part : http://www.ebay.com/itm/3-x-CD4017-4017-DECADE-COUNTER-DIVIDER-TEXAS-/400240485931?pt=LH_DefaultDomain_0&hash=item5d3031262b
Pinout at http://electrosome.com/cd4017
Second, the BS1 has only 8 I/O pins. Assuming you forget about the 4017's Reset, Clock Enable and Carry Out pins, you still need one clock line, so you'll only have 7 output lines in the sequence. Is that OK? What type of switch are you using and how fast will it open & close?
symbol
button
if then
output
low
high
Is the book "BASIC Stamp Starter Kit" available online?
DIRS=%01111111
main:PINS=00000001
aaa:IF IN7=0 THEN aaa
PINS=00000010
PAUSE 1000
bbb:IF IN7=0 THEN bbb
PINS=00000100
PAUSE 1000
ccc:IF
etc
etc
etc
GOTO main