Digital clock from 7490's.

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
m2mike
Posts: 13
Joined: Wed Dec 07, 2005 1:01 am
Contact:

Digital clock from 7490's.

Post by m2mike »

Hello,

I would like to construct a digital clock from cascading 7490 chips. What is the best way to implement the hours section? So far, I have seen this. http://members.aol.com/_ht_a/HAdelkopf/dclock.html

What about getting hours and then dividing by twelve with a 7492?

I would then need the following output:
0000 00000001
0001 00000010
0010 00000011
0011 00000100
0100 00000101
0101 00000110
0110 00000111
0111 00001000
1000 00001001
1001 00010000
1010 00010001
1011 00010010
1100 XXXXXXXX
1101 XXXXXXXX
1110 XXXXXXXX
1111 XXXXXXXX

The above can be simplified, but it isn't a very pretty solution. What is the most efficient way to do this? How would a adder be used? That is mentioned here:

http://www.howstuffworks.com/digital-clock7.htm

<small>[ February 27, 2006, 12:23 AM: Message edited by: m2mike ]</small>
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Digital clock from 7490's.

Post by MrAl »

Hi there,


I havent studied the circuit but i guess it is
a 24 hour format clock and you want to make it
a 12 hour format clock?

In this case i would take the output from the
previous stage and divide by 12 using a 4 bit
counter set up to divide by 12. I would take the
output from this 12 count counter and feed a
flip flop (or another counter using only the
first bit). The output from the flip flop (or
counter) is the AM/PM indicator, which could
drive an LED for PM (on) and AM (off).
You still need two digits for the "12" and then
one extra LED to indicate AM/PM.

Sound easy enough?


Take care,
Al
LEDs vs Bulbs, LEDs are winning.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Digital clock from 7490's.

Post by philba »

This goes back a ways...

Are you using a single 4 bit counter for hours or 2 counters (for BCD). Typically people have used 2 so they can do 12 or 24 hr format and its a bit easier to feed into 7 seg LED displays. I'll assume 2 4 bit counters.

I would use BCD counters like the 40192 which has a carry out and preset (similar to the 7490). to do a 12 hour count, use a 3 input nand gate with the inputs connected to the 3 outputs that will be high when 13 is reached. The nand output is connected to the /preset pin of the 192s. When /preset goes low, the counters will load what ever you have on the preset pins - in this case 0000 and 0001. You can do similar for 24hr though the preset is 0000 0000.

To maintain an AM/PM LED, use another NAND gate and hook the inputs to the pins that will be high when 12 is reached. Feed the output into a flipflop that toggles on the falling edge.

It's a bit ironic that all this logic can be done with a $2 PIC. It also has 20 mA drive capability per output pin so you don't need individual drivers for each LED segment.

Phil
Dean Huster
Posts: 1263
Joined: Wed Dec 05, 2001 1:01 am
Location: Harviell, MO (Poplar Bluff area)
Contact:

Re: Digital clock from 7490's.

Post by Dean Huster »

Let's see you do a fully-synchronous precision clock system (all outputs change on the same input clock cycle, no cascading or rippling) with a PIC. PICs are nice, but they sure aren't God's gift to mankind as they often are made to seem.

Dean
Dean Huster, Electronics Curmudgeon
Contributing Editor emeritus, "Q & A", of the former "Poptronics" magazine (formerly "Popular Electronics" and "Electronics Now" magazines).

R.I.P.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Digital clock from 7490's.

Post by philba »

OK, sure, a simple uC based design isn't synchronous but the above design isn't either. I'm not sure why this application NEEDs to be synchronous.

With some external logic plus the uC, one could make it synchronous, at least at the output pins. Done with fewer parts and lower cost. Still, kind of a silly way to implement a 7-Segment LED clock.

A uC is an extremely appropriate solution for this problem - it's cheaper, smaller and more flexible than the SSI/MSI version. I'm suprised at your response. - I never said the PIC was "God's Gift".

Phil
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Digital clock from 7490's.

Post by MrAl »

Hi there,


I dont believe you would need synchro counters
either. The clock pulse is going to be one
FULL second long, which is at least a million
times slower than the counters are, and the
eye sure can't catch the turnover of digits
when they reach the state where they
all change count at the same time.


Take care,
Al
LEDs vs Bulbs, LEDs are winning.
Dean Huster
Posts: 1263
Joined: Wed Dec 05, 2001 1:01 am
Location: Harviell, MO (Poplar Bluff area)
Contact:

Re: Digital clock from 7490's.

Post by Dean Huster »

You don't need synchronous counting for most clock applications. Can't a guy just play with some TTL once in a while, learning a lot of design and troubleshooting techniques in the process without having a PIC shoved in his face? Most of the electronics courses are gone from schools all across the country, probably because you can't teach electronics worth a darn using a PIC. It seems that I see more questions on forums about basic electronics from PIC-experts than I do PIC questions from electronics experts.

Of course, none of this has any place in this thread. I just need to modify my profile.

Dean
Dean Huster, Electronics Curmudgeon
Contributing Editor emeritus, "Q & A", of the former "Poptronics" magazine (formerly "Popular Electronics" and "Electronics Now" magazines).

R.I.P.
Dean Huster
Posts: 1263
Joined: Wed Dec 05, 2001 1:01 am
Location: Harviell, MO (Poplar Bluff area)
Contact:

Re: Digital clock from 7490's.

Post by Dean Huster »

There. That should be more appropriate.

Dean
Dean Huster, Electronics Curmudgeon
Contributing Editor emeritus, "Q & A", of the former "Poptronics" magazine (formerly "Popular Electronics" and "Electronics Now" magazines).

R.I.P.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Digital clock from 7490's.

Post by philba »

Originally posted by Dean Huster:
You don't need synchronous counting for most clock applications. Can't a guy just play with some TTL once in a while, learning a lot of design and troubleshooting techniques in the process without having a PIC shoved in his face? Most of the electronics courses are gone from schools all across the country, probably because you can't teach electronics worth a darn using a PIC. It seems that I see more questions on forums about basic electronics from PIC-experts than I do PIC questions from electronics experts.

Of course, none of this has any place in this thread. I just need to modify my profile.

Dean
I do agree with much of what you say - uCs are an important tool in an engineer's tool-box but so are ohms law, transistors (bipolar AND MOSFET), analog circuits, the venerable 555 and so on. I firmly believe that an engineer that doesn't understand all of these things (including uCs) is at a deep disadvantage.

I actually enjoy figuring out how to put various logic parts together to make something happen. The reality is that using a uC to do the same allows me to make changes quickly via software and potentially add features at a low to no cost.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Digital clock from 7490's.

Post by MrAl »

Hi again,

Dean:
No problem here :) I like to see these old
designs resurrected once in a while.

I built a digital clock way back when but it
used a dedicated clock chip made just for
making a digital clock -- not an mcu chip.
Still needed external transistor drivers
for the 7 seg lines however.

Oh yeah, and guess what? I still have an old
frequency counter (8 red led digits!) that i made
from discreet parts (bcd counters, 7 seg led
driver chip + gates for digit multiplexing, 555
osc., etc.) and i still like to keep it around.
I think i first built it in 1980 something, and
upgraded it with faster, lower power counters
(dang thing drew a full amp with the old parts)
to make it easier to power, and added a crystal
time base (using a newer multi-stage divider chip).

Hey that reminds me, he can use the multiplexer
for this design too.


Take care,
Al
LEDs vs Bulbs, LEDs are winning.
Dean Huster
Posts: 1263
Joined: Wed Dec 05, 2001 1:01 am
Location: Harviell, MO (Poplar Bluff area)
Contact:

Re: Digital clock from 7490's.

Post by Dean Huster »

And I will be the first to admit that for a processor controling a complex interaction of several input and output devices (an autonomous robot is a good example here), the ability of changing lines of code to modify a process or to compensate for the modification of some hardware is wonderful. And in this application, there is no way that "discrete" logic could handle the problem without sacrificing size and power consumption -- no doubt about it.

As some of you know, I'm on the receiving end of the elimination of one of those electronics programs and it leaves a bitter taste in my mouth. My electronics programs included everything from basic DC, AC, solid state, digital and analog ICs and on to µPs. And all those were just the basic courses as students went on in the school to specialize in automation, instrumentation & control and computer repair (back when computers were actually repaired and not simply replaced, upgraded or put into a network). Since then, I've become more and more "curmudgeonly". Maybe I'll find a group: "Hi. I'm Dean and I'm an electronics curmudgeon."

"Hi, Dean!"
Dean Huster, Electronics Curmudgeon
Contributing Editor emeritus, "Q & A", of the former "Poptronics" magazine (formerly "Popular Electronics" and "Electronics Now" magazines).

R.I.P.
Robert Reed
Posts: 2277
Joined: Wed Nov 24, 2004 1:01 am
Location: ASHTABULA,OHIO
Contact:

Re: Digital clock from 7490's.

Post by Robert Reed »

I'm with you Dean.
m2mike
Posts: 13
Joined: Wed Dec 07, 2005 1:01 am
Contact:

Re: Digital clock from 7490's.

Post by m2mike »

philiba,

Which 2$ PIC are you referring to?
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Digital clock from 7490's.

Post by philba »

Well, I guess I lied, it's not $2. It's the 16F628A and it can be had for $1.74 for the industrial DIP version, quantity 1 from mouser.

It's an 18 pin pic with 13 I/O lines. You might need to use a little external logic (3-8 decoder) if you are displaying seconds but for hh:mm + am/pm you are good. I assume you want to drive 7 segment displays.
Post Reply

Who is online

Users browsing this forum: No registered users and 83 guests