Continue to Site

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.

  • 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.

LED digital clock, help!!

Status
Not open for further replies.

burhanmz

Member
i'm making a simple 7-segmented digital clock using 7493 (4 bit binary counters) for my room...
the design is simple.. but i'm facing problem in the 'hour' logic... i want it to reset at 24 hrs...

at the 'hour' part the 1st 7493 counts from 0-9 (10th being the reset condition fed to an AND gate)
the 2nd 7493 counts from 0-2(3 being the reset condition, fed to another AND gate)

now wht i did was that i AND the logic output 4(0100) of 1st 7493 with logic o/p 3(0011) of 2nd 7493 and fed its o/p to an OR gate with the 1st's i/p of logic 10(1010)... i hope u are getting it.

i have checked the OR gates, AND gates... they are all in working condition but still i'm not getting the desired output... some how the hour part goes up to 30 (0-29)... i can't have 29 hrs a day!!

can someone tell me how to implement 24hrs (0-23) on the hour segments..



lastly i have thought of adding 2 time set button..simple push button switch does the trick. one end of the button is +ve volts and second is the clock input of 7493.. when i press it, a sort of extra pulse gets in and counts up the part its connected to... so i placed push button switch one at the minute part (the 3rd 7493 from right) and 2nd button at the hour part (5th 7493 from right)... oh yes, i have to place diodes in place of wires that are carrying the clock pulses to 7493s, other wise when i try to set time the positive supply's momentary pulse from push button destroys the AND gate (after several times of pushing)
 

Attachments

  • clock copy.jpg
    clock copy.jpg
    500.6 KB · Views: 725
Firstly well done looks like a good project :)

The Reseon its counting upto 29 is that the reset condition of the last digit is 3 so when your counter gets to twenty it waits for another 10 pulses before it resets. you need to somehow get the second counter to reset when the count reaches 24 insted of 30
 
You just need to AND the 2 in the 10s of hours and the 4 in the hours and connect the result to the reset of both counters.

You might need to add a delay of a few ns (with a few gates in a row) as there is a possible "race" condition, but it is worth trying without.
 
thats is wht i have already done ... using OR gates, which resets the 1st counter of hour at 2 conditions. i.e at either of these twos
[1] the AND of 3(0011) from 'tens' of hrs and 4(0100) from 'ones' of hour;
[2] at the 10(1010) from 'ones' of hrs.


but condition [1] is not working, even though the OR gate and AND gate is completely ok.

wht can be the problem?
 
thats is wht i have already done ... using OR gates, which resets the 1st counter of hour at 2 conditions. i.e at either of these twos
[1] the AND of 3(0011) from 'tens' of hrs and 4(0100) from 'ones' of hour;
[2] at the 10(1010) from 'ones' of hrs.

but condition [1] is not working, even though the OR gate and AND gate is completely ok.

wht can be the problem?

You don't want to reset when the count is 34. You want to reset both hour counters when the count is 24. Condition 1 should be:-
[1] the AND of 2(0010) from 'tens' of hrs and 4(0100) from 'ones' of hour
 
oh thanks.. i was doing it wrong..

now there is another problem, when the hour count goes uptp 23, then only 'ones' of hour change... some how the 'tens' of hours are not resetting to 0.
so now when it reaches 23 it starts from 20...21...22...23...20...21...22....23...20 and so on... i have checked its reset condition wires, they are ok... but its still stuck.. wht to do now?
 
You don't need the 10s of hours to reset on three but to reset of 24. Just AND together the two C outputs and use that signal to reset both hours counters.

Mike.
 
.. i quite understood wht Diver300 said... and was a great help.. i was putting up the logic wrong... when i corrected it the hours worked, but then i had the problem that my counter was storing its value rather than being reset when it reached my desired count... but that was experimental error, because the whole setup was on 4 breacd boards.. now i have made a PCB for it and soldered all the components.
the clock is working like a charm.. i'm deeply thankful to 'Diver300'
 
And Gate.

Hi Burhanmz,

I don't think you fully understood what Diver300 and Pommie
said. If you had looked more closely at the datasheet of the
7493 you should have noticed that R0 and R1 are inputs of
an AND GATE.
AND GATE, AND GATE, AND GATE, AND GATE,...
You should have used those AND GATES in your
circuit! :eek: Oh well, maybe next time.

on1aag.
 
Last edited:
Hi Burhanmz,

I don't think you fully understood what Diver300 and Pommie
said. If you had looked more closely at the datasheet of the
7493 you should have noticed that R0 and R1 are inputs of
an AND GATE.
AND GATE, AND GATE, AND GATE, AND GATE,...
You should have used those AND GATES in your
circuit! :eek: Oh well, maybe next time.

on1aag.
oh.. man. didn't you even look at my circuit diagram. i had to use an external AND gate no matter what, to propagate the clock pulse. the clock pulse being the AND of reset condition (some place B and D and other C and D) .. so when making a circuit diagram (that i was implementing on bread board first) it was easy for me to short Ro and R1 and then use an external AND gate... this reduced the number of wires i had to use....


but dont you worry.. this isn't exactly the circuit on my PCB, where i have specifically used Ro and R1, and not shorted them and provided them the o/p from any external AND gates...in a PCB the smaller and distinct routes there are the better it is...


and by the way, Ro and R1 are connected to a NAND GATE not an AND GATE... although the NAND GATE is further NOTted at the end so it does become an AND gate.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top