Designing a parking system using SYNCHRONOUS UP/DOWN DECADE(/BINARY) COUNTER

Thread Starter

muhammed_alaa12

Joined Dec 23, 2022
13
I am doing a parking system project for my college , We need to have a 3 push buttons for count up , down and reset but we have only 8 parking yards so we need to stop counting after 8 , I used a nand gate on the last bit (1000 = 8 ) and the count up push button and took the output on the PL load and loaded the data input i need which is 8 , My question is why it's not working on my breadboard its working on proteus but on real it only shows 8 doesn't even count down or any thing only 8 Can any one help me plz ! 1671779802451.png
 

DickCappels

Joined Aug 21, 2008
10,227
I don't see any debouncing on your buttons so my guess is that press the button that is supposed to increment the count you get a lot of edges because of contact bounce- your counter counts up to 8 and then stops like it should.

I see that you are using 7400 logic, so keep the R2 below 220 ohms. If you can get a 74LS14 (Schmitt trigger) for the inverter you should get very clean switching out of the inverter.

1671782421272.png
 

MrChips

Joined Oct 2, 2009
30,933
R2 and R10 in your circuit must be 220Ω or lower for 7400 gates.
Use a proper switch denounce circuit as Dick suggests.
 

Thread Starter

muhammed_alaa12

Joined Dec 23, 2022
13
I am guessing that you didn't understand my question , my issue is that when I do this on my breadboard the 2 push buttons don't do any thing and the 7 seg is only showing 8 no count up / down is working but its working on proteus
 

ericgibbs

Joined Jan 29, 2010
18,990
hi alaa12,
To hold a TTL gate input low a resistor value of less than 250R should be used, say a 220R.

Post a clear photo shot of your bread board layout, so that we can check your wiring.
E
 

Thread Starter

muhammed_alaa12

Joined Dec 23, 2022
13
hi alaa12,
To hold a TTL gate input low a resistor value of less than 250R should be used, say a 220R.

Post a clear photo shot of your bread board layout, so that we can check your wiring.
E
ok i will send the photo but i have another question do i need a capacitor like the replay from Dick Capples ?
 

ericgibbs

Joined Jan 29, 2010
18,990
hi,
Most mechanical push buttons are electrically 'noisy', this bounce noise can create multiple Clock pulses.
Adding a capacitor can help integrate the noisy pulses, leaving a 'clean' one shot pulse.

E
 

Thread Starter

muhammed_alaa12

Joined Dec 23, 2022
13
hi,
Most mechanical push buttons are electrically 'noisy', this bounce noise can create multiple Clock pulses.
Adding a capacitor can help integrate the noisy pulses, leaving a 'clean' one shot pulse.

E
This is the image
the first ic on the left is the 74192
middle 7400
right 7447
the 4 white wires are the 4 bits
the red wire that is connected to second input to the 7400 is the fourth bit and the first input is the same color with the wire connected to push button , both are connected with 74192 pin 5 which is up
the blue one is connected with the count downbutton and the pin 4
i think others are clear enough
this connection it counts up to 7 and down but it doesn't stop at 7 it goes 0 after it i want to hold it at 8 idk why it go up to 7 only i am connecting the fourth bit with the nand which is 1000 means 8
but if i loaded the number 8 through the D0 to D4 it only shows 8 doesn't count up or down
 

Attachments

Thread Starter

muhammed_alaa12

Joined Dec 23, 2022
13
hi alaa12,
To hold a TTL gate input low a resistor value of less than 250R should be used, say a 220R.

Post a clear photo shot of your bread board layout, so that we can check your wiring.
E
This is after i connected all pins of loading data
D0,D1,D2 with negative
D3 positive
it only shows 8 and the countup or down doesn't work
 

Attachments

Thread Starter

muhammed_alaa12

Joined Dec 23, 2022
13
hi,
Have you checked that the push buttons are working as you expect, use a Voltmeter and check the action of the push buttons.
E
its working i tried the counter without trying to hold on a specific number it works perfectly without skipping any numbers with 330 ohm but when i connected the nand gate to hold on number 8 it doesn't work
 

sarahMCML

Joined May 11, 2019
392
its working i tried the counter without trying to hold on a specific number it works perfectly without skipping any numbers with 330 ohm but when i connected the nand gate to hold on number 8 it doesn't work
According to the TI datasheet both clock inputs need to be kept high for the counter to operate correctly, the relevant one being clocked. Otherwise the counter will double clock or not count at all. I wonder if Proteus ignores this, which is why it works there, but not in reality. Try turning your inputs into pullups rather than pulldowns!
 
Last edited by a moderator:

sarahMCML

Joined May 11, 2019
392
According to the TI datasheet both clock inputs need to be kept high for the counter to operate correctly, the relevant one being clocked. Otherwise the counter will double clock or not count at all. I wonder if Proteus ignores this, which is why it works there, but not in reality. Try turning your inputs into pullups rather than pulldowns!
The Up & DOWN pins, 4 & 5. Connect resistors R2 & R10 to +5V, the switches to 0V.
 

djsfantasi

Joined Apr 11, 2010
9,181
Under what conditions do the count up/down pins work? Particularly what effect does the parallel load pin have on the two count pins?

Review the truth table on page 2 of the datasheet and see if that explains the issues you are seeing…
 

Thread Starter

muhammed_alaa12

Joined Dec 23, 2022
13
Under what conditions do the count up/down pins work? Particularly what effect does the parallel load pin have on the two count pins?

Review the truth table on page 2 of the datasheet and see if that explains the issues you are seeing…
I want the counter to count maximum 8 only i've connected the count up pin with nand and the fourth bit and connected the output to the PL so when the number 8 is reached it can't count more and that is what happened but my issue is that i can't count down from 8 although when i plug in the battery it starts 8 and need to be reset first
 

sarahMCML

Joined May 11, 2019
392
I want the counter to count maximum 8 only i've connected the count up pin with nand and the fourth bit and connected the output to the PL so when the number 8 is reached it can't count more and that is what happened but my issue is that i can't count down from 8 although when i plug in the battery it starts 8 and need to be reset first
What you need to do is forget the PL pin and use the 8 count to disable the relevant clock.
In other words, e.g. if you're counting up, when you reach 8, use it to disable the up input, but still allow count down. And vice versa!
 
Top