One BCD used to increment another at a specific value?

Thread Starter

erwiH

Joined Apr 17, 2011
17
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:


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

Regards
 

beenthere

Joined Apr 20, 2004
15,819
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).
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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
 

beenthere

Joined Apr 20, 2004
15,819
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.
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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?
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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!
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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?
 

beenthere

Joined Apr 20, 2004
15,819
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.
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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?
 

beenthere

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

Looking at a count of 9 resets at the same time as 9 is outputted, so you never get to see it
Sometimes it works to use the clock to add timing to the signals.
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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.
 

beenthere

Joined Apr 20, 2004
15,819
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?
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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.
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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.
 

Thread Starter

erwiH

Joined Apr 17, 2011
17
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.
 
Top