Using a 40192 Up/Down Counter

Discussion in 'General Electronics Chat' started by kgstewar, May 4, 2012.

  1. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Hi all,

    I, too, am making an up/down counter using the 40192 and have found this thread very helpful. I have everything working but the counter counts when the push button is released. I saw the circuit proposed by Sgt. Wookie that counts when the button is pushed, but alas I must use a SPST pushbutton. Does the 555 trigger circuit shown in the previous post accomplish that (increments counter when pushed)? Thanks!

    Kevin
     
    Last edited by a moderator: May 4, 2012
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Welcome to AAC!

    A thread belongs to the OP (original poster). Trying to take over someone elses thread is called hijacking, which is not allowed at All About Circuits. I have therefore given you a thread of your very own.

    This was split from 40192 Up/Down Counter

    The first thing you always need to show is a schematic of your circuit. We can only guess as to what you are doing.

    Please attach all documents locally on AAC.

    To attach a document or picture to a post

    Click "Go Advanced" at the bottom of your post,

    One of several options will pop up,

    Click "Manage Attachments" much further at the bottom of your post,

    To upload a file from your computer click "Browse", then select the file.

    Schematics should be .gif or .png format, pictures should be .jpg. .jpg formats will fuzz out schematics, and should not be used for that purpose.

    ---------------

    If you want to display this file there is an old thread I made,

    How to Display Attachments Full Size
     
  3. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Many thanks Bill, let me put together a schematic and I'll post again soon.

    Kevin
     
  4. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    I am making a scoreboard using the 40192 up/down counter. What's a bit funny about this IC is that to count up, clock down pin must be held high while the clock up goes from low to high (and vice versa for counting down). I have everything working using the circuit illustrated below. (I got this design from another thread and the circuit was provided by MrChips).

    Here's my problem: This circuit registers a count when S1 or S2 is released. That works fine but I would prefer that it register when the button is pushed. I saw a circuit design that will accomplish this using a DPST switch, but I am hoping to be able to use some rather-expensive, already-purchased, non-returnable, SPST switches that I have instead. Is it possible to trigger this counter when a SPST switch is pressed? I was looking at the datasheet for a CD4528 and it appears that chip can send out an inverted pulse when triggered by a positive pulse. Perhaps that may be a solution? Thanks!

    Kevin
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    You can do this with a dual monostable chip. I have to leave now but will provide a circuit later, unless someone else beats me to it.
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    [​IMG]

    Any hex inverter or Schmitt trigger hex inverter will work such as CD4049, 4069, CD4584, MC14584.

    Any dual retriggerable monostable will work such as CD4528, CD4538, MC14528, MC14538.
     
  7. crutschow

    Expert

    Mar 14, 2008
    13,031
    3,240
    If you connect R1 and R5 to ground and connect the PBs to +V, you will reverse the operation of the push buttons and it should trigger when you push the button. Don't see that you need the one-shot since you already have an anti-bounce circuit.
     
  8. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    MrChips: Thanks! I've ordered a few 4528s and will give this a try. Am I correct that a 40106 will serve as an appropriate hex inverter?

    Crutschow: Interesting, I will give this a try asap. Is the attached diagram an accurate representation of your solution?

    Thanks!

    Kevin
     
  9. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    No, this wouldn't work because you are back to the old problem where the idle COUNT input must be HIGH while the active input is pulled low.

    If you don't want to wait for components I will show you a quick mod to your existing circuit that you can try.
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    [​IMG]

    In the circuit shown above I have created a monostable that generates a negative going pulse by simply adding one capacitor C2 in series with the output of the second inverter.

    Be warned that I have not tested this circuit and you may have to alter the value of C2.

    Repeat the same modifications for the COUNT DOWN part of the circuit.
     
  11. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    CD40106 hex Schmitt trigger will work fine.
     
  12. crutschow

    Expert

    Mar 14, 2008
    13,031
    3,240
    I missed that. My bad. :p
     
  13. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Thanks MrChips. That circuit most definitely increments on the push, not the release. I tried a few cap values for C2 and discovered the following:

    10 nF - Skips a lot of numbers with each push (e.g. goes from 4 to 8 to 17, etc.)

    .005 nF - Does not increment with a push

    .02 nF - .07 nF - increments exactly one number per push EXCEPT it always skips from 7 to 9. Every other push increments just one number. How strange.

    I need to get a few caps in the .005 nF to .02 nF range to see if there is a magic value that increments by one throughout the whole count.

    Thanks again!

    Kevin
     
  14. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    I will have to look at this on an oscilloscope and get back to you tomorow.
     
  15. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Thanks for your help MrChips.I'll try some different caps tomorrow if I can get to the local Radioshack.

    Kevin
     
  16. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
  17. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Thanks for the link Bill. That is something I had not thought of.
     
  18. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    So am I correct that I should be placing a capacitor between the power and ground pins of each IC? It seems like 0.1uF is a standard value to use in this kind of application, or do I need to run the numbers and calculate the precise value of the cap for each IC? Thanks!

    Kevin
     
  19. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    It is more correct to say, can't hurt, might help, may be critical. On simple circuits I don't bother, but as the complexity increases the more important it becomes, as all those various functions dump noise into the power suppy.
     
  20. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    So far we have looked at the signals generated by the Schmitt trigger inverters and the capacitor monostable with the same values as shown. The oscilloscope signals look clean with the expected time constants (10ms at the Schmitt trigger and 0.8ms low pulse to the counter. Right now someone is wiring up a CD40193 counter and will report back with the results.
     
Loading...