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.

Electronic LED Clock

Status
Not open for further replies.
Hi all,
I want to make a clock, and I think I have the basics figured out, but I need a bit of help...

You may know that when a counter (mine is the 4520) it counts 0 to 9... Its the zero I need help with. Obviously, a 12 hour clock does not go>

12:59 >> 00:00 >> 00:01 etc...

I need it to, instead, go:

12:59 >> 01:00 etc...

Thats where I'm stuck... I don't know how to get rid of that zero. Furthurmore, I need it to come back again when counting like:

09:59 >> 10:00 (note the zero is back)

How, on earth do I do this??? :confused: I know how to switch the zero in and out when needed, but how would I get rid of it?

All help is most appriciated, the datasheet for the 4520 can be found here and a useful site is here
 
hi mike,

The 12 hour real time clock logic needs some extra decoding to make it roll over correctly at midday and midnight and the option in the display drivers to blank the drivers.

Why did you choose the 4520 binary counter and not the 4518 BCD counter.

What decoders are you using on the outputs of your counters to drive your 7 seg LED displays.

Do you have a diagram you could post?
 
Well, I thought that because it is still binary, and there are two in one package, it would be better and cheaper... Upon looking at the 4518, It looks ok, but my supplier does not stock it. And, I've never had expirience with this IC before. I planned on using the 4511 decoder/ driver, but this is my first big clock, so any help is needed... thank you !!
 
hi mike,
Not having seen your circuit I have to assume that you are decoding, for the 0 to 9 counters a reset at 10 and
for the 0 to 5 counters reset at 6.

The outputs from the counters are connected to the 4511 BCD 4 to 7 seg drivers.

The problem with the circuit is that you are using a counter that cannot be preloaded with a value,
so as you reach say, 12:59 it will roll over to 13:00. but you want 01:00.
This means you would need to preload the MSD with '0' [and blank it] and the next MSD with '1'.
You could do this using a 4 bit parallel load counters.

At midnight 11:59, rollover to 00:00 again you would need to preload with '0000' by using the master clear on your counters.

One of the methods used on a 12Hr clock is a 'am/pm' latch.
The state of the latch is used to determine whether the LZ [leading zero] should blanked within the decoding to the 4511 blank pin.

A 24Hr clock is easier to implement as you dont get that awkward roll over at midday.

Hope this helps.... a little.
 
Hi Mike,
At www.circuitdb.com/show.php?cid=99 there is a schematic for a clock you want to build. The counter ICs they are showing can easily be replaced with the 4518's. Yea I know you got the 4520s. You can add additional circuitry (logic gates) to be able to use the 4520s but at least this gives you something to start with.

HTH,

Alarmman
 
thanks, I take it I will need to decode the BCD to seven segment. I was thinking, maybe I should turn this into (my first) PIC microcontroller project. Then I wouldn't need all that extra stuff... that would work ok?
 
mike11298 said:
I was thinking, maybe I should turn this into (my first) PIC microcontroller project. Then I wouldn't need all that extra stuff... that would work ok?

Of course that will work. It will be easier to assemble due to fewer components, and, the programming is not that hard.

However, if the learning experience counts, you will be much better off for having built the timer-counter-decoder-display circuit. That is why most newbies eventually gravitate to some form of clocking, i.e, stop-watch, egg-timer, etc.
 
Hi Mike,

No decoding! Just use a CD4511 BCD to 7 segment decoder/display driver. Of course if you want to chuck the whole idea then a PIC or AVR will do the trick. I personally use a separate clock IC like the Maxim DS1337. Has two programmable alarm outputs or 1 alarm output and 1 programmable pulse output. I use this on many of my projects.:) I think anyone doing electronic projects should build a logic based clock just to appreciate what microcontrollers can do for you.

HTH,

Alarmman
 
thanks allvol, do you think I should make a timer/countdown/countup or something like that so im familiar with the sort off thing, the do my microcontrololer project?
 
mike11298 said:
thanks allvol, do you think I should make a timer/countdown/countup or something like that so im familiar with the sort off thing, the do my microcontrololer project?

In my opinion it is always good to have hands-on experience, and that is especially true here.

Building any sort of timing circuit will give you a good feel for later uC projects. You do not have to build a clock, per se. The internet is full of simple counter projects. Any one of them, using a 555 timer, will show you how to build a counter chain. From there, it is just a matter of putting it all together.

In fact, with just a 555, 74ls90 and four LEDS, you can learn to count in BCD. That is a giant step toward understanding microprocessing.

Others may give you the same or better advice.

Good Luck
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top