Problem encountered on building a 24 hr digital clock,only hours portion.Help needed

Thread Starter

devilarm123

Joined Dec 26, 2017
33
Still very new to this,I hope you guys will help me in this journey.I am tasked to create a 24hr clock using 74ls93 ic and im using 74ls47 bcd decoder and 7seg anode led.
Image below shows what i have done so far,and i not sure why the numbers are like that.Please help
 

Attachments

WBahn

Joined Mar 31, 2012
30,045
My crystal ball is in the shop, so I am having a hard time seeing what the signals are that are coming out of U5 and going in to U7. Perhaps I need to get a book on remote viewing.

In the meantime, maybe you could provide that information. It might also be helpful if you could give some indication of what you believe it should be displaying in that figure, at least until I finish my audio CD course on mind reading.
 

Thread Starter

devilarm123

Joined Dec 26, 2017
33
Im trying to cascade a mod 2 and mod12 counter to form a mod 24 counter that counts to 24 then resets to zero,for your question,i am not entirely sure how to do it,so it might be a mistake to connect it like that.However U7 is just the signal to the master reset for U3,and U5 is the 7segment
 

Thread Starter

devilarm123

Joined Dec 26, 2017
33
what im trying a achieve is a mod 24 counter,that also serves as a 24 digital clk.(only the hours portion)
i also need to add the following features:
Two push button (or pulse) switches .One of the pulse switch will function as the manual clock signal generator used for adjusting the start time

The second pulse switch will be used as a toggle switch to select either the manual clock pulse or the free running clock signal.

An LED indicator is also required to light up whenever the manual (or adjust) mode is selected.
 

AnalogKid

Joined Aug 1, 2013
11,036
To have the displays go from 00 to 23, you need two decimal counters. A mod 2 and mod 12 counter will not work. A mod counter goes from 00 (zero) to 11 (eleven) and then rolls over to 00 again.

And, I don't think the counters you do have are doing what you think they are. It looks like you have U5 resetting when the outputs equal 12, making it a 13-step counter. Is that what you want? Also, the output displayed on U1 is correct for a data input of 14 (see the 74LS47 datasheet). U3 resets when its outputs equal 2, which makes it a divide-by-3 counter.

You can display a 24 hour clock with two 7490 decade counters cascaded as shown on the datasheet. Use a 2-input AND gate to decode when the outputs reach 24 and reset the counters back to 00.
An LED indicator is also required
Required by whom?

ak
 

WBahn

Joined Mar 31, 2012
30,045
This sounds like homework or some other kind of school project. Is it? If so, the proper place for the thread is in Homework Help and I can move it there.
 

Thread Starter

devilarm123

Joined Dec 26, 2017
33
To have the displays go from 00 to 23, you need two decimal counters. A mod 2 and mod 12 counter will not work. A mod counter goes from 00 (zero) to 11 (eleven) and then rolls over to 00 again.

And, I don't think the counters you do have are doing what you think they are. It looks like you have U5 resetting when the outputs equal 12, making it a 13-step counter. Is that what you want? Also, the output displayed on U1 is correct for a data input of 14 (see the 74LS47 datasheet). U3 resets when its outputs equal 2, which makes it a divide-by-3 counter.

You can display a 24 hour clock with two 7490 decade counters cascaded as shown on the datasheet. Use a 2-input AND gate to decode when the outputs reach 24 and reset the counters back to 00.


Required by whom?

ak
I see,did not see the datasheet when i was making this.
also,the led is there to indicate "free running" or "set time" mode(this is the later part of the project)
 

Thread Starter

devilarm123

Joined Dec 26, 2017
33
update:
already got the clock to be working.
Now working on the "adjusting time" function.

It'll be great too if you guys can recommend some ideas on how to implement the function using pulse switches,i have the general idea how it should work,but i just dont know where to start or what to use.I really want to learn
 

Attachments

absf

Joined Dec 29, 2010
1,968
24 HR CLOCK.PNG
There are several problems in your design..

1. 74LS93 are binary counters and they count naturally from 0-15 without intervention.
2. The gate you use should be AND and not NAND to force the unit digit to reset at '10' and tenth digit to reset at '3'.

So even after I changed the 2 NAND gates to AND gates, there is still some problems. Now it will count from 00 to 29 then start over from 00 again.

As AK has alredy mentioned in post #5, it would be much easier to design with decade counters 74LS90 so the unit digit would reset at '10' without extra logic and you can use the main logic to reset both to '00' when the Tenth digit is '3' and unit digit is '4'.

Study some more and think see how you're able to do it.:cool::D

Allen
 
Last edited:

Thread Starter

devilarm123

Joined Dec 26, 2017
33
View attachment 143181
There are several problems in your design..

1. 74LS93 are binary counters and they count naturally from 0-15 with intervention.
2. The gate you use should be AND and not NAND to force the unit digit to reset at '10' and tenth digit to reset at '3'.

So even after I changed the 2 NAND gates to AND gates, there is still some problems. Now it will count from 00 to 29 then start over from 00 again.

As AK has alredy mentioned in post #5, it would be much easier to design with decade counters 74LS90 so the unit digit would reset at '10' without extra logic and you can use the main logic to reset both to '00' when the Tenth digit is '3' and unit digit is '4'.

Study some more and think see how you're able to do it.:cool::D

Allen
Oh i see,thanks for the tips.But i can only work with 74ls93. What you guys said was really helpful and i appreciate it.
i solved it by adding a OR gate(photo below)
 

Attachments

Thread Starter

devilarm123

Joined Dec 26, 2017
33
Im pretty sure i am making a mistake on this one,i am trying to make use of two pulse switches(push switches),the first acting as the mode selection(between "free run" and "adjustment" mode),and the second acting as a manual clocking.(see attached image).I need the switches to latch,like a on-off switch,i found out that i need jk ff in order to do so.Also i want to add a led that will light when "adjustment" mode is on.
Help and tips will be appreciated.
 

Attachments

absf

Joined Dec 29, 2010
1,968
24_hr_clk 50%.PNG
1. Are you able to control the Start/Stop of the clock source with a logic level from the JKFF?

2. You cannot have 2 outputs connected together and go to an input. e.g. from 2Q of JKFF to V1 clock o/p then to clk input of U3. Unless both outputs are open collector then you can use a pull-up resistor to wire-or them.

You may use a 2-input gate for case (2.) for the 2 sources to U3 input.

You also forgot to add a resistor in series with the LED. For the case of LSTTL familychips, it would be better to connect the LED cathod to +5 and anode to output of JKFF as LSTTL can source very little current to light up the LED.

What's the purpose to connect the switch to a flip flop to step the clock? In this case you need to push the switch 2 times to step the counter by one.

You might also need a reset switch to reset the counters to zero when in ADJUSTMENT MODE.

Allen
 

Thread Starter

devilarm123

Joined Dec 26, 2017
33
View attachment 143262
1. Are you able to control the Start/Stop of the clock source with a logic level from the JKFF?

2. You cannot have 2 outputs connected together and go to an input. e.g. from 2Q of JKFF to V1 clock o/p then to clk input of U3. Unless both outputs are open collector then you can use a pull-up resistor to wire-or them.

You may use a 2-input gate for case (2.) for the 2 sources to U3 input.

You also forgot to add a resistor in series with the LED. For the case of LSTTL familychips, it would be better to connect the LED cathod to +5 and anode to output of JKFF as LSTTL can source very little current to light up the LED.

What's the purpose to connect the switch to a flip flop to step the clock? In this case you need to push the switch 2 times to step the counter by one.

You might also need a reset switch to reset the counters to zero when in ADJUSTMENT MODE.

Allen
These are the changes that i have made,the led still doesn't seems to work.However the switches are okay now,and im able to choose between 'free run' and 'adjust' mode just fine.you mentioned about my second switch which made me realized my mistake and i made changes too.
However the numbers sometimes are laggy and jerks a lot,is there something still wrong?
 

Attachments

absf

Joined Dec 29, 2010
1,968
I did sim your circuit but I found 2 mistakes in your latest schematics.

24 hr clk_changes.png

The wire from ~1Q to GND is shorting the output of the JKFF to GND.
 
Top