Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp to work like a cd 4017 counter — Parallax Forums

Basic Stamp to work like a cd 4017 counter

Frank123Frank123 Posts: 4
edited 2014-02-20 13:28 in BASIC Stamp
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

Comments

  • ercoerco Posts: 20,257
    edited 2014-02-18 21:07
    Welcome to the forums, Frank123! Hope you're staying warm in New York.

    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?
  • Frank123Frank123 Posts: 4
    edited 2014-02-19 06:07
    Yes, you are correct but at this time I have many bs1 and bs2 just sitting around. I will be only making one or two of these devices. The time to design and make a pcb will take time. Yes the seven I/O lines should do find I am only going to use 6 outputs and 1 mechanical switch very slow open and close only when the person wants to step to another output.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-02-19 18:47
    Frank123 wrote: »
    using the basic stamp 1 ...some help or direction to a starting point to write my program.

    symbol

    button

    if then

    output
    low
    high

    Is the book "BASIC Stamp Starter Kit" available online?
  • ercoerco Posts: 20,257
    edited 2014-02-20 13:28
    See also:

    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
Sign In or Register to comment.