1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

cd4029 counter

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by cliff85, Sep 15, 2017.

  1. cliff85

    cliff85 New Member

    Joined:
    Sep 15, 2017
    Messages:
    4
    Likes:
    0
    Hello all!

    I need some help in getting my cd4029 counter to do what I want.
    I'd like it to do a continuous count both forward and backward using ONLY 8 counts.
    Can be 0000 to o111 or 0001 to 1000, but no recycling.
    Would much appreciate any help on this.
     
  2. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,361
    Likes:
    972
    Location:
    Loveland, CO USA
    I don't know what "recycling" is.

    Is this what you want? 8 states, 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7 etc.
    Counting; 000, 001,010,011, 100,101,110,111,000, 001,010,011, 100,101,110,111,000, 001,010,011, 100,101,110,111, Up
    OR
    Counting the same thing but backwards
    Do not use the MSB!!!

    Carry in = 0
    PreSet = 0
    J1-J4 = not used. Connect to 0.
    Binary/Dec = 1
    upload_2017-9-15_21-15-35.png

    Maybe you want to count up like this:
    0,1,2,3,4,5,6,7,7,7,7,7,7,7,7,7,7,..........
    Count down like this:
    7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,.........
     
  3. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,127
    Likes:
    564
    Location:
    AZ 86334
    What does "no recyling" mean?

    I am not doing the entire design for you, but it occurs to me that you want to preset the counter to 0001, and use the msb becoming 1 (1000) on the eighth clock to steer it back to 1 each time the msb becomes one.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,361
    Likes:
    972
    Location:
    Loveland, CO USA

    Mike, counting 1 through 8 is just as good as 0 through 7. (from post #1)
    The part counts 0 through 7 with out adding logic. Just, do not use the highest bit.
     
  6. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,127
    Likes:
    564
    Location:
    AZ 86334
    When counting up, it takes a three input AND or NAND to decode 0111 (to clear the counter on the next clock), but to detect 1000 doesn't need any logic. It is just as easy to preset the counter to 0001 as it is to clear it to 0000.
     
    Last edited: Sep 15, 2017
  7. cliff85

    cliff85 New Member

    Joined:
    Sep 15, 2017
    Messages:
    4
    Likes:
    0
    Thanks for all the input guys.
    Recycling is when the count JUMPS from 1000 back to zero.
    From 1000 I want the count to go to 0111,0110,0101,0100,0011,0010,0001, and then reverses
    to 0010,0011,0100,etc.

    For the 3 bit count from 000 to 111. It would be 000,001,010,011,etc to 111, then reverse again to 110
    all the way back down again to 000. A continuous up & down counting of 8 with no recycling.
    Hope this explains what I want.
     
  8. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,127
    Likes:
    564
    Location:
    AZ 86334
    You will have to add an external flip-flop which is used to change the direction of counting. That flip-flop is set to count up and cleared to count down. You will need to detect the two "turn-around" states (0000 and 0111 or 0001 and 1000) to alternatively set and clear the "direction" flip flop.
     
  9. cliff85

    cliff85 New Member

    Joined:
    Sep 15, 2017
    Messages:
    4
    Likes:
    0
     
  10. cliff85

    cliff85 New Member

    Joined:
    Sep 15, 2017
    Messages:
    4
    Likes:
    0
    Thanks for that info Mike. That will help me a lot.
    I already had the thing working good using 9 counts, but my project required 8
    I was using a 74175 FF to change direction on the hi side using the MSB.
    Was using the carry out for lo side.
    So now I'll try using some gates to detect that 0001 for reversing the count.
    Think I know how to do it now.
    I tried using those jam inputs, but couldn't get them to work either.
     

Share This Page