One BCD used to increment another at a specific value?

Discussion in 'The Projects Forum' started by erwiH, Apr 17, 2011.

  1. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    Hi there

    I am trying to increment a 7-segment display by 1 (using a 74ls90 with 74ls47 decoder) when another decade counter reaches a value of 4.

    In other words, for every 4th count on one decade counter, I want increase the count on a 7-seg display by one! (without the use of micro-controllers)

    I've managed to set up a simple counter (0-9), but I have no idea where to go from now! Attached is my circuit schematic:
    [​IMG]

    I'm still new to the world of electronics, so any help would be greatly appreciated!

    Regards
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Your schematic did not attach.

    As long as you wish to count every increment of 4, all you need to do is to look at bit 2 of the counter (the four outputs are 0 - 3) with an AND gate. When that bit is HIGH, the AND gate will pass the clock to increment the next counter stage.

    That means another counter and a 74LS08. Don't forget to tie unused inputs to ground or pull them HIGH with a 20K resistor (TTL logic can short and wipe your power supply, so you need that resistor as a current control).
     
  3. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    Sorry, here is the schematic: http://img849.imageshack.us/i/bcdcircuitschematic.jpg/

    I think i understand what you are saying and will try figure out the setup, although having looked at the datasheet for the 74LS08, I'm not entirely sure what will go where.

    Thanks for the advice though!
     
  4. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    Hi

    Considering I only need one AND gate, can i not use a single one as opposed to the quad 74LS08? I've set up a dual 7-seg display (so i can count from 0-99), with an AND gate how i think it should be... It seems to be working correctly, but I'm not sure if thats fluke or if I've set it up correctly... My circuit is at http://img845.imageshack.us/i/countercct.jpg/
    Any input/advice would be fantastic!

    However, I'm having a problem as the display shows 1 after the first 4 input pulses, and 2 after the first 8 pulses, as I desire, but now it won't show 3 after 12 pulses. I'm assuming this is because the counter resets to 0 after 9 and the AND gate only passes through the next signal when it gets to 4 again, therefore leaving 6 pulses between displaying 2 and 3. I'm guessing I need to reset the counter when it gets to 4 as opposed to 9, but I have no idea how to do this?!

    Thanks
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Notice that the 74LS90 has RESET inputs. When the count hits 4, besides using the AND gate to Give a count (really ought to use a NAND, as I see it's a negative-going clock pulse) to the next 74LS90, the same signal can reset the first counter to 0. Then the count goes 1, 2, 3, 4.
     
  6. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    I've tried connecting different combinations of pin 2 (RO1) and pin 3(RO2) to QB, QC etc...but I can't seem to get it to work. I was also wondering, do I even need an AND gate since '4' occurs the first time that bit is HIGH. If I reset the counter on 4, and using this bit as the input to my next counter, will I not achieve the same thing?
     
  7. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Don't see why not.
     
  8. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    Ah! Turns out I had just connected the one pin to the wrong place. Sorted it out and it seems to be working perfectly! Thanks a lot for your help!
     
  9. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    After simulating my circuit perfectly, it turns out I only have access to a 74LS193 instead of the 74LS90. Since this is a modulo-16 counter and not a decade counter it obviously counts from 0-15 and not 0-9 as I desire. I've tried quite a few different set ups, but can't get it to reset at 9. Anyone have tips for me?
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    For the one that supplies the counts at a value of 4, just reset that one to 0 at the count of 4.

    For the other, you will need a NAND gate to look at bits 0 and 3 (count of 9) and reset that counter. The output is applied to the PL^ input, with the P0-P3 input tied low.
     
  11. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    Hi, thanks for that. It seems I need to look at a count of 10 (bit 1 and 3) when I reset it since it counts up with a LOW to HIGH transition. Looking at a count of 9 resets at the same time as 9 is outputted, so you never get to see it. Anyways, I need to display a 2 digit number, which I've managed to do - however instead of the 2nd digit starting at 0, it starts immediately at 1. Not sure if this is just my simulation, but even though I count up the 2nd digit when bit 1 and 3 (count of 10) of the first counter are HIGH, the 2nd digit goes to 1 immediately (virtual oscilloscope shows it immediately receiving a HIGH pulse). Any explanation or fix for this?
     
  12. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    At this point, it would be very useful to see the schematic of how things are connected.

    Sometimes it works to use the clock to add timing to the signals.
     
  13. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    Thanks, I think I've solved that. I got round to building the circuit on a breadboard, but nothing works :/ It all works perfectly on multisim, and I've checked my physical circuit a few times and it looks the same as my multisim. Most of the outputs from ICs that I've measured give me a reading of approx. 1.3V when there is 0 input? Is this normal (as a result of the IC's Vcc)? No matter how much I pulse the input to the first counter, my LED display stays on 00.
     
  14. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Something is wrong. Do you have all the IC's with a .1 uF cap at the Vcc pin? Are all unused inputs tied either high or low, as necessary? Use a 20K resistor to pull inputs high. Is Vcc 5 volts?
     
  15. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    All unused pins are tied appropriately. Vcc is 5V, but I don't have all the IC's with a cap... Would that not only effect debouncing? I've triple checked my circuit...still nothing.
    When looking at the first bit (pin 3) of my first counter (74LS190), it is @ 0.1V but doesn't go high when pulsing the input. I'd imagine something is wrong here but I don't know what.
     
  16. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    I'm quite sure the problem is with my first '190 which is being used to pass a signal to the next counter ('193) when it reaches a count of 4. Here is a quick sketch of this part of my circuit: http://img849.imageshack.us/i/74ls190cct.jpg/
    Although it works fine in Multisim so I don't know if theres an obvious error. i'm using the NAND gate to reset the counter at a count of 4.
     
  17. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Shorting outputs to ground can destroy the IC from excessive current. You only need to control unused inputs.
     
  18. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    So I should leave pin 2,3 and 7 untied? I did that and still nothing. If I manually pulse pin 6 high and low then my display counts up as expected, but pulsing the clock (pin 14) does nothing.
     
  19. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Have you tried a different counter? That one may have died from the shorted outputs.
     
  20. erwiH

    Thread Starter New Member

    Apr 17, 2011
    17
    0
    Turns out the input to the clock cannot just be nothing, then high. Has to be grounded, then high...
     
Loading...