Any way to make LEDs mimic analog seconds movement on a cloc

L

Largo

Guest
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

Largo
 
Largo wrote:
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

Largo
If I understand what you need to do, drive 60 individual LEDs, the
minimum drive line count is 16 (8 x 8 matrix). PIC16F870 has enough
lines plus some for I/O. Matrix LED anodes on Port-B, cathodes on
Port-C. Drive 1 line high, and one low from each port. Float the rest.
Then move on to the next line for a count of 60.

The PIC's all have 25ma current limit so resistors are not needed. This
is a 'one chip' solution.

--
Luhan Monat: luhanis(at)yahoo(dot)com
http://members.cox.net/berniekm
"Any sufficiently advanced magick is
indistinguishable from technology."
 
On Wed, 18 May 2005 19:15:56 -0700, the renowned Luhan Monat <x@y.z>
wrote:

Largo wrote:
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

Largo

If I understand what you need to do, drive 60 individual LEDs, the
minimum drive line count is 16 (8 x 8 matrix). PIC16F870 has enough
lines plus some for I/O. Matrix LED anodes on Port-B, cathodes on
Port-C. Drive 1 line high, and one low from each port. Float the rest.
Then move on to the next line for a count of 60.
9 port lines are enough to directly drive 60 LEDs.

The PIC's all have 25ma current limit so resistors are not needed. This
is a 'one chip' solution.
I think I'd like to see 9 current limiting resistors in there. The
maximum current is not well defined.

But converting the drive from two digits of an existing digital clock
into unary sounds pretty unpleasant.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
Spehro Pefhany wrote:
snip

But converting the drive from two digits of an existing digital clock
into unary sounds pretty unpleasant.


Best regards,
Spehro Pefhany
It's probably easier to make a whole clock with a PIC than to decode the
digits...

--
-------------------------------------------
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
Spehro Pefhany wrote:


9 port lines are enough to directly drive 60 LEDs.
How do you do 60 LEDs with 9 lines?

--
Luhan Monat: luhanis(at)yahoo(dot)com
http://members.cox.net/berniekm
"Any sufficiently advanced magick is
indistinguishable from technology."
 
On Thu, 19 May 2005 15:07:15 -0700, the renowned Luhan Monat <x@y.z>
wrote:

Spehro Pefhany wrote:


9 port lines are enough to directly drive 60 LEDs.


How do you do 60 LEDs with 9 lines?
Connect two antiparallel LEDs betwen each unique pair of lines (series
resistor on each line assumed). The maximum number of LEDs with n
lines is thus n*(n-1) for n>=2. To drive a single LED you tristate all
but two lines, on those two you make one high and the other low. The
antiparallel LED is turned on by reversing the polarity, of course.
Only one LED can be on at once, but that's okay for this application
(and multiplexing can increase the number that visually appear to be
lit, within reason).


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
antiparallel ???


Could you please post a simple schematic.

I don't get it.


Spehro Pefhany wrote:
On Thu, 19 May 2005 15:07:15 -0700, the renowned Luhan Monat <x@y.z
wrote:


Spehro Pefhany wrote:



9 port lines are enough to directly drive 60 LEDs.


How do you do 60 LEDs with 9 lines?


Connect two antiparallel LEDs betwen each unique pair of lines (series
resistor on each line assumed). The maximum number of LEDs with n
lines is thus n*(n-1) for n>=2. To drive a single LED you tristate all
but two lines, on those two you make one high and the other low. The
antiparallel LED is turned on by reversing the polarity, of course.
Only one LED can be on at once, but that's okay for this application
(and multiplexing can increase the number that visually appear to be
lit, within reason).


Best regards,
Spehro Pefhany
 
On Thu, 19 May 2005 18:26:57 -0600, the renowned Donald
<donald@dontdoithere.com> wrote:

antiparallel ???


Could you please post a simple schematic.

I don't get it.
Okay, sounds like dinner's almost ready, let's see if I can get it
done and scanned.. ah, in the nick of time:

http://www.speff.com/12_from_4.jpg

This is an example of driving 12 LEDs from 4 port lines.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
On Wed, 18 May 2005 18:52:07 -0700, Largo <largo@fullBS.cox.net>
wrote:

I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?

Largo
I pondered this myself for use with a WWVB clock.

Reset a 60-long shift-register at 00, then clock it at one second
intervals.

MAYBE smaller, use counters and decoding logic.

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
"Luhan Monat" <x@y.z> schreef in bericht news:Z68je.434$rr.290@fed1read01...
Spehro Pefhany wrote:


9 port lines are enough to directly drive 60 LEDs.


How do you do 60 LEDs with 9 lines?
Google for charlieplexing.

--
Thanks, Frank.
(remove 'q' and 'invalid' when replying by email)
 
In article <h9vn8112uf779lik9p7doo3nbbv90n7nqq@4ax.com>,
Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:
[....]
But converting the drive from two digits of an existing digital clock
into unary sounds pretty unpleasant.

To make the design easier you can:

Do it in two steps. The first could be a PROM look up table with 128
elements, 10 of which will ever be addressed. From there it is a simple
decode.


Since this is only got to work at 1Hz like time frames: you could just
make a table of LED states and search down the list for one that matches
the clock's output. There could be a second table that gives the port
state for the LED drive.

--
--
kensmith@rahul.net forging knowledge
 
On Fri, 20 May 2005 13:55:10 +0000 (UTC), the renowned
kensmith@green.rahul.net (Ken Smith) wrote:

In article <h9vn8112uf779lik9p7doo3nbbv90n7nqq@4ax.com>,
Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote:
[....]
But converting the drive from two digits of an existing digital clock
into unary sounds pretty unpleasant.


To make the design easier you can:

Do it in two steps. The first could be a PROM look up table with 128
elements, 10 of which will ever be addressed. From there it is a simple
decode.


Since this is only got to work at 1Hz like time frames: you could just
make a table of LED states and search down the list for one that matches
the clock's output. There could be a second table that gives the port
state for the LED drive.
And, on the input end, de-multiplexing the digit data (most likely)
and level-shifting the LED drive (assuming it's an LED clock)- maybe a
bunch of comparators.

I did something like this ages ago using a few 4051s to mux static
3-1/2 digit LED drive into a single comparator. Plus some magic to
synchronize with updates. Unpleasant.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
On Wed, 18 May 2005 18:52:07 -0700, Largo <largo@fullBS.cox.net>
wrote:

I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.
Several electronics stores (in Europe at least) sell kits made by a
company called Velleman. One of their kits is a roulette wheel, which
uses a PIC to drive 36 LEDs. The circuit for it is here:

http://www.velleman.be/Downloads/0/Manual_MK119.pdf

It's the same principle as Spehro's, just taken a few stages further
(and so far as I can see, still a fair bit of room for expansion).
Very cunning!

Mike
 
Spehro Pefhany wrote:
On Thu, 19 May 2005 15:07:15 -0700, the renowned Luhan Monat <x@y.z
wrote:


Spehro Pefhany wrote:



9 port lines are enough to directly drive 60 LEDs.


How do you do 60 LEDs with 9 lines?


Connect two antiparallel LEDs betwen each unique pair of lines (series
resistor on each line assumed). The maximum number of LEDs with n
lines is thus n*(n-1) for n>=2. To drive a single LED you tristate all
but two lines, on those two you make one high and the other low. The
antiparallel LED is turned on by reversing the polarity, of course.
Only one LED can be on at once, but that's okay for this application
(and multiplexing can increase the number that visually appear to be
lit, within reason).


Best regards,
Spehro Pefhany
You are most exactly correct on this. I'll keep it in mind next time I
need to run a shitload of LED's from just a few line.

--
Luhan Monat: luhanis(at)yahoo(dot)com
http://members.cox.net/berniekm
"Any sufficiently advanced magick is
indistinguishable from technology."
 
On Fri, 20 May 2005 17:37:17 +0100, the renowned MSC <spam@spam.com>
wrote:

On Wed, 18 May 2005 18:52:07 -0700, Largo <largo@fullBS.cox.net
wrote:

I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Several electronics stores (in Europe at least) sell kits made by a
company called Velleman. One of their kits is a roulette wheel, which
uses a PIC to drive 36 LEDs. The circuit for it is here:

http://www.velleman.be/Downloads/0/Manual_MK119.pdf

It's the same principle as Spehro's, just taken a few stages further
(and so far as I can see, still a fair bit of room for expansion).
Very cunning!

Mike
I think the Velleman design is a sub-optimal variation that, in
return, for the extra port lines, allows an inexpensive single-sided
PCB layout


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> wrote in sci.electronics.design:
On Thu, 19 May 2005 18:26:57 -0600, the renowned Donald
donald@dontdoithere.com> wrote:

antiparallel ???


Could you please post a simple schematic.

I don't get it.

Okay, sounds like dinner's almost ready, let's see if I can get it
done and scanned.. ah, in the nick of time:

http://www.speff.com/12_from_4.jpg

This is an example of driving 12 LEDs from 4 port lines.
Nice drawing :)

It could also be arranged in a matrix with diodes across each crossing
except the main diagonal, all the same orientation. The port lines
are connected to both the rows and the columns of the matrix. That are
n^2 - n = n*(n - 1) diodes. To light the diode at i,k (i != k), make
line i high, line k low, and make all other lines hi-z.

Anno
 
On Sat, 21 May 2005 15:31:35 GMT, Fred Bloggs <nospam@nospam.com>
wrote:

Largo wrote:
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?


I would forget the 7219 and use two M74HC42 available from Mouser. The
74HC42 are BCD to decimal decoders which means you input a 4-bit BCD
code in the range 0-9 and it activates 1 of 10 outputs low. So you
arrange the 60 LEDs into 6 groups of 10, use the MSD of the clock
seconds for input to one 74HC42 to select one group of 10 LEDs, and then
the clock LSD inputs to the second HC42 to select the 1 of 10 LEDs in
the group. This requires 2x 16-pin 74HC42, one current limiting
resistor, and six cheap transistor+ base resistor like so- how you
extract the seconds MSD and LSD depends on what's in the clock:

View in a fixed-width font such as Courier.

This sounds very helpful. I wish i could just recode the PIC based
digital clock since all the PIC code is offered from this site:
http://hobby_elec.piclist.com/e_pic6_76.htm

The circuit already uses a BCD decoder for driving six 7-segment LED
displays. There a link to the circuit I refer which I purchased most
of the parts. It uses a PIC and also a CPLD for 3 to 8 decoder, some
divider for time accuracy and debounce logic. I use a 10Mhz metal-can
oscillator for the time keeping input. I cannot find the oscillator
used in the original description. Perhaps the circuit shown to the
group can loosen a few extra suggestions. Thanks for your
suggestions.

This circuit can be found on this link:
http://hobby_elec.piclist.com/e_pic6_71.htm

Largo
 
Largo wrote:
On Sat, 21 May 2005 15:31:35 GMT, Fred Bloggs <nospam@nospam.com
wrote:



Largo wrote:

I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?


I would forget the 7219 and use two M74HC42 available from Mouser. The
74HC42 are BCD to decimal decoders which means you input a 4-bit BCD
code in the range 0-9 and it activates 1 of 10 outputs low. So you
arrange the 60 LEDs into 6 groups of 10, use the MSD of the clock
seconds for input to one 74HC42 to select one group of 10 LEDs, and then
the clock LSD inputs to the second HC42 to select the 1 of 10 LEDs in
the group. This requires 2x 16-pin 74HC42, one current limiting
resistor, and six cheap transistor+ base resistor like so- how you
extract the seconds MSD and LSD depends on what's in the clock:

View in a fixed-width font such as Courier.


This sounds very helpful. I wish i could just recode the PIC based
digital clock since all the PIC code is offered from this site:
http://hobby_elec.piclist.com/e_pic6_76.htm

The circuit already uses a BCD decoder for driving six 7-segment LED
displays. There a link to the circuit I refer which I purchased most
of the parts. It uses a PIC and also a CPLD for 3 to 8 decoder, some
divider for time accuracy and debounce logic. I use a 10Mhz metal-can
oscillator for the time keeping input. I cannot find the oscillator
used in the original description. Perhaps the circuit shown to the
group can loosen a few extra suggestions. Thanks for your
suggestions.

This circuit can be found on this link:
http://hobby_elec.piclist.com/e_pic6_71.htm

Largo
It looks like the simplest add-on that does not require a programmable
part would be some simple logic to detect 00 written to DSP5,6 digits-
this then resets two BCD counters like the 74HC162 or 74HC192- these
counters then increment with each TR6 strobe (assuming the update is 1
sec)- the BCD counters are used to drive the MSD, LSD of the 74HC42 circuit.
 
Fred Bloggs wrote:
Largo wrote:

On Sat, 21 May 2005 15:31:35 GMT, Fred Bloggs <nospam@nospam.com
wrote:



Largo wrote:

I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?


I would forget the 7219 and use two M74HC42 available from Mouser.
The 74HC42 are BCD to decimal decoders which means you input a 4-bit
BCD code in the range 0-9 and it activates 1 of 10 outputs low. So
you arrange the 60 LEDs into 6 groups of 10, use the MSD of the clock
seconds for input to one 74HC42 to select one group of 10 LEDs, and
then the clock LSD inputs to the second HC42 to select the 1 of 10
LEDs in the group. This requires 2x 16-pin 74HC42, one current
limiting resistor, and six cheap transistor+ base resistor like so-
how you extract the seconds MSD and LSD depends on what's in the clock:

View in a fixed-width font such as Courier.


This sounds very helpful. I wish i could just recode the PIC based
digital clock since all the PIC code is offered from this site:
http://hobby_elec.piclist.com/e_pic6_76.htm

The circuit already uses a BCD decoder for driving six 7-segment LED
displays. There a link to the circuit I refer which I purchased most
of the parts. It uses a PIC and also a CPLD for 3 to 8 decoder, some
divider for time accuracy and debounce logic. I use a 10Mhz metal-can
oscillator for the time keeping input. I cannot find the oscillator
used in the original description. Perhaps the circuit shown to the
group can loosen a few extra suggestions. Thanks for your
suggestions.

This circuit can be found on this link:
http://hobby_elec.piclist.com/e_pic6_71.htm

Largo


It looks like the simplest add-on that does not require a programmable
part would be some simple logic to detect 00 written to DSP5,6 digits-
this then resets two BCD counters like the 74HC162 or 74HC192- these
counters then increment with each TR6 strobe (assuming the update is 1
sec)- the BCD counters are used to drive the MSD, LSD of the 74HC42
circuit.
Looks like the DSP6 strobe is going to be several KHz- so scratch that
idea. Why don't you learn how to re-program the PIC- or ask the kit
maker to do it, so that RC0-RC6 output a 4-bit BCD instead of 7-segment
when addressing DSP5,6- then 2x 4-bit latches capture the data and drive
the 74HC42 circuit.
 
On Sat, 21 May 2005 09:05:19 -0700, Largo wrote:

On Sat, 21 May 2005 15:31:35 GMT, Fred Bloggs <nospam@nospam.com
wrote:



Largo wrote:
I wish to take digital clock seconds "00 to 59" and translate the
segments into 0 to 60 incrementing LED'S. IOW the digital display
converted to "analog" ring of LED's around the clock face. Thus my
digital clock display's "hh:mm" and a ring of LED's (60 for each
second). They must start at the 12 O-Clock position when seconds
makes 00.

Looking at the MAX 7219 to drive the individule LEDs. How can I
decode this?


I would forget the 7219 and use two M74HC42 available from Mouser. The
74HC42 are BCD to decimal decoders which means you input a 4-bit BCD
code in the range 0-9 and it activates 1 of 10 outputs low. So you
arrange the 60 LEDs into 6 groups of 10, use the MSD of the clock
seconds for input to one 74HC42 to select one group of 10 LEDs, and then
the clock LSD inputs to the second HC42 to select the 1 of 10 LEDs in
the group. This requires 2x 16-pin 74HC42, one current limiting
resistor, and six cheap transistor+ base resistor like so- how you
extract the seconds MSD and LSD depends on what's in the clock:

View in a fixed-width font such as Courier.

This sounds very helpful. I wish i could just recode the PIC based
digital clock since all the PIC code is offered from this site:
http://hobby_elec.piclist.com/e_pic6_76.htm
Why can't you?

The circuit already uses a BCD decoder for driving six 7-segment LED
displays. There a link to the circuit I refer which I purchased most
of the parts. It uses a PIC and also a CPLD for 3 to 8 decoder, some
divider for time accuracy and debounce logic. I use a 10Mhz metal-can
oscillator for the time keeping input. I cannot find the oscillator
used in the original description. Perhaps the circuit shown to the
group can loosen a few extra suggestions. Thanks for your
suggestions.

This circuit can be found on this link:
http://hobby_elec.piclist.com/e_pic6_71.htm
How many suggestions do you need?
Do you want to maintain the 7-segment, and _add_ the seconds roulette
wheel?

Then you'll either need 8x 8-bit shift registers, 4X 4-to-16 decoders,
or a matrix.

Or another PIC, which means you'll have to learn to program a PIC anyway.

Do you want a strictly hardware solution to this, without any programming
involved _at all_? Then be prepared to spend about a couple of hundred
bucks on discrete logic and perfboards.

Good Luck!
Rich
 

Welcome to EDABoard.com

Sponsor

Back
Top