Searching \ for '[PIC]: Driving LED Matrix Display from a PIC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/displays.htm?key=led
Search entire site for: 'Driving LED Matrix Display from a PIC'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Driving LED Matrix Display from a PIC'
2003\06\11@214404 by Mike Hord

picon face
Take a look at this:

http://www.tinaja.com/glib/muse152.pdf

Don Lancaster's method for driving 56 LED's from 1 8-bit output port.
You're
thinking about doing 256, but the principle here can be expanded out to just
about any number; he gives some idea of how to do it.  The math suggests
that 16 bits can drive up to 240 LED's.

As for getting together the drive current, I'd try some a CMOS tri-state
buffer.
You will probably have to sacrifice a couple of more lines to control the
IC.

Mike H.


{Quote hidden}

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\06\11@230438 by Bob Axtell

face picon face
part 1 2626 bytes content-type:text/plain; charset="us-ascii"; format=flowedI've had wonderful luck driving LED's with two 74HC595 with a 330-ohm R in
series with all segments. In a present application I am driving a
multiplexed 4-digit clock array with two HC595's using the SPI port of the
PIC for SOURCE and SINK current. It doesn't conflict with the SPI port's
other uses because the HC595 ignores the data received until the LATCH pin
is strobed down then up. Works at fastest SPI transfer rate as long as
board traces are fairly short.

Schematic enclosed.

--Bob

At 08:43 PM 6/11/2003 -0500, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads




part 2 15419 bytes content-type:application/pdf; name="CAM_TST.pdf" (decode)

part 3 414 bytes content-type:text/plain; charset="us-ascii"; format=flowed
---------------
NOTICE

1. This account can accept email & attachments up to 10M in size.
2. Federal Monitors: At request of client, some attachments are encrypted.
Please DO NOT delay traffic; please reply with credentials for password.
--------------


--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads




part 4 2 bytes
-

2003\06\14@113400 by Thomas N

picon face
I have few more questions:
1.  If I multiplex the LEDs, does that mean only 1 LED can be on at a time?
2.  What is the maximum time for a duty cycle before I see the LED blinking?
3.  If I drive a 16x16 LED matrix by four HC595 latches (2 ICs for rows, 2 ICs for column) at 5Mhz SPI speed, what's my refreshing rate?  How do I calculate it?
4.  If I want my refresh rate to be 100Hz, is it possible to multiplex the LED?
Thank you for your help!
Regards,
Thomas

Mike Hord <@spam@gaidinmdKILLspamspamHOTMAIL.COM> wrote:
Take a look at this:

http://www.tinaja.com/glib/muse152.pdf

Don Lancaster's method for driving 56 LED's from 1 8-bit output port.
You're
thinking about doing 256, but the principle here can be expanded out to just
about any number; he gives some idea of how to do it. The math suggests
that 16 bits can drive up to 240 LED's.

As for getting together the drive current, I'd try some a CMOS tri-state
buffer.
You will probably have to sacrifice a couple of more lines to control the
IC.

Mike H.


{Quote hidden}

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

2003\06\14@114404 by Andre Thomas

flavicon
face
Hi Thomas,

From what I experienced in previous experiments an led flashing more than
about 25 times per second (i.e. 25hz) appears to be "on" all the time even
though it is flashing.

Your refresh rate can be calculated in the time that it takes for one sweep
to complete. If you wanting your refresh rate to be 100Hz, you should be
running at about 4x8bits that, giving that you are using four 595 shift
registers which will require 8 shifts each to update your entire output
register.

So, if I am correct, which I am not 100% certain of, you should be clocking
your serial output to the first 595 at around 3.2Khz ? Comments?

Regards,
Andre Thomas


{Original Message removed}

2003\06\14@115837 by Spehro Pefhany

picon face
At 08:32 AM 6/14/2003 -0700, you wrote:
>I have few more questions:
>1.  If I multiplex the LEDs, does that mean only 1 LED can be on at a time?

Maybe. If you do it "maximally" then yes. If you use the more common m x n
matrix,
then m (or maybe n, depending on where the resistors are) LEDs can be on at
once.
This is better from a drive pov (lower peak currents in the drivers). At lower
than 10% duty cycle (ton/(ton + toff))  the overall brightness tends to
have to
be significantly lower than for DC drive. Just a rule of thumb- I like to be
4:1 ~ 8:1 but your 16:1 is not ridiculous.

>2.  What is the maximum time for a duty cycle before I see the LED blinking?

Refresh the entire display at least every 10msec. 1kHz is better, but may not
be practical for large arrays and slow processor.

>3.  If I drive a 16x16 LED matrix by four HC595 latches (2 ICs for rows, 2
>ICs for column) at 5Mhz SPI speed, what's my refreshing rate?  How do I
>calculate it?

Suppose you set up a 2kHz interrupt on your processor.. then your "frame rate"
is 2kHz/16 = 125Hz if you send out a new set of data every interrupt. The SPI
rate doesn't enter into it (but high is better because the data gets sent
faster, and the ISR thus sucks less processor bandwidth).

Programming-wise, you'd create an array in RAM that mirrors the LED states,
and send out the appropriate data every interrupt, This will be a short easy-to
debug program segment. You'll need one nibble "static volatile" storage to
maintain the current row or column being scanned between interrupts. Your
background program then can update the array at its leisure.

>4.  If I want my refresh rate to be 100Hz, is it possible to multiplex the
>LED?

See above.

We use this all the time with 7-segment displays, in fact our displays have
the connections internally committed to this so a 4-digit display has only
12 pins.

http://www.trexon.com/leds/trexon_led_display.pdf

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spamBeGonespeffspamBeGonespaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

2003\06\14@134132 by Picdude

flavicon
face
On Saturday 14 June 2003 10:32, Thomas N scribbled:
> I have few more questions:
> 1.  If I multiplex the LEDs, does that mean only 1 LED can be on at a time?

If you create a 16x16 grid, with 16 I/O lines to control the rows, then whenever you switch on a column, you can control 16 LED's simultaneously with the row outputs.  So 16 LED's of 256 can be on at any time, meaning you have a duty-cycle of 16/256 or 1/16.  If you do 8 rows by 32 columns, then you have 8/256 or 1/32 duty-cycle, etc.


> 2.  What is the maximum time for a duty cycle before I see the LED
> blinking?

In my experience, I've found the visual limit to be more a function of OFF time, rather than just duty-cycle or frequency.  And the brand/model of LED makes a difference as well.  You best bet is to mock up a circuit and some simple code that rapidly pulses one of your LED's to find that point for your system.


> 3.  If I drive a 16x16 LED matrix by four HC595 latches (2 ICs
> for rows, 2 ICs for column) at 5Mhz SPI speed, what's my refreshing rate?
> How do I calculate it? 4.  If I want my refresh rate to be 100Hz, is it
> possible to multiplex the LED? Thank you for your help!
> Regards,
> Thomas
>

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

2003\06\14@135801 by Thomas N

picon face
Thank you all for your reply!  If I use 16x16 matrix, 16 LEDs on 1 row (or column) can be controlled after sending 4 bytes of data.  Which means in order to update the entire 16x16 screen, I have to send to the latches 16 x 4 bytes = 64bytes

With 100Hz refresh rate, I need the SPI speed at 100Hz x 8bits x 64 bytes = 51.2Khz.  Please correct me if I am wrong.
Thomas

Andre Thomas <andrethomasEraseMEspam.....LANTIC.NET> wrote:
Hi Thomas,

From what I experienced in previous experiments an led flashing more than
about 25 times per second (i.e. 25hz) appears to be "on" all the time even
though it is flashing.

Your refresh rate can be calculated in the time that it takes for one sweep
to complete. If you wanting your refresh rate to be 100Hz, you should be
running at about 4x8bits that, giving that you are using four 595 shift
registers which will require 8 shifts each to update your entire output
register.

So, if I am correct, which I am not 100% certain of, you should be clocking
your serial output to the first 595 at around 3.2Khz ? Comments?

Regards,
Andre Thomas


{Original Message removed}

2003\06\14@171921 by Spehro Pefhany

picon face
At 10:57 AM 6/14/2003 -0700, you wrote:
>Thank you all for your reply!  If I use 16x16 matrix, 16 LEDs on 1 row (or
>column) can be controlled after sending 4 bytes of data.  Which means in
>order to update the entire 16x16 screen, I have to send to the latches 16
>x 4 bytes = 64bytes
>
>With 100Hz refresh rate, I need the SPI speed at 100Hz x 8bits x 64 bytes
>= 51.2Khz.  Please correct me if I am wrong.
>Thomas

Really what I think you want to do is to spit out the SPI data as fast as the
PIC  can send it (in an ISR), then do RETI, do other stuff, rinse and repeat.

Why do you want to waste all your processor bandwidth waiting for the SPI
buffer to become ready for another byte?

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
EraseMEspeffspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservEraseMEspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body

2003\06\14@190652 by Olin Lathrop

face picon face
> From what I experienced in previous experiments an led flashing more
> than about 25 times per second (i.e. 25hz) appears to be "on" all the
> time even though it is flashing.

That's awfully low.  100Hz would be much better.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspam_OUTspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

2003\06\14@191315 by Spehro Pefhany

picon face
At 07:05 PM 6/14/2003 -0400, you wrote:
> > From what I experienced in previous experiments an led flashing more
> > than about 25 times per second (i.e. 25hz) appears to be "on" all the
> > time even though it is flashing.
>
>That's awfully low.  100Hz would be much better.

Yup. 100Hz would also be a bit low if there is vibration. Above 1kHz there
isn't much difference.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
RemoveMEspeffTakeThisOuTspamspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspamspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

2003\06\25@202049 by Wouter van Ooijen

face picon face
> Don Lancaster's method for driving 56 LED's from 1 8-bit output port.

I have been using this to drive 12 LEDs from an 8-pin PIC. One problem I
found is that when too much current is used (a high pak current is
required because you are multiplexing) not only the intended LED will
light but also some pairs of others that are in parallel to the intended
one. This might be due to variations in the set of no-brand LEDs that I
have been using.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestKILLspamspammitvma.mit.edu>

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...