Re: Multiplexing LEDs - calculating resistor value
- From: John Fields <jfields@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Jun 2006 10:37:44 -0500
On 27 Jun 2006 04:18:54 -0700, "roxlu" <diederickh@xxxxxxxxx> wrote:
Hi John and Jonathan,
Really thanks a lot!! Now I get what you mean...I'm not a
electronics-man and still learning. When I'm using a current limiting
resitor of 100R, could I let my circuit as it is now? And what about
the speed? As suggested I need to shift in 48 bits for each row instead
of 8 (for all the rows). I can imagine this will take a lot more
processing power which will cause flickering.
---
If you assume that a frame rate of 50Hz will be adequate to prevent
flickering, then that means you'll need to update the array every 20
milliseconds.
Since you have 8 rows which you're strobing, one at a time, during
that 20ms you'll have each one of them on for 2.5ms, and since you
have 48 pixels in each row, the longest time you can take, per
pixel, to shift in a new row before the strobe happens is 52.08µs.
You should be able to do it much faster than that, though, the limit
being how fast your µC can fill up the shift register, which will
determine how much time you've got left over to do other stuff.
Like this:
+-------------------------------------------+
| |
| |<-----------20ms----------->| |
| ____________ ________________ |
+---->|____________|________________|--+ |
FILL ROW 1 DO OTHER STUFF | |
+--------------------------------------+ |
| |<------------20ms----------->| |
| ____________ ________________ |
+---->|____________|________________|---+ |
FILL ROW 2 DO OTHER STUFF | |
. |
. |
. |
| |
+---------------------------------------+ |
| |
| |<------------20ms----------->| |
| ____________ ________________ |
+---->|____________|________________|-------+
FILL ROW 8 DO OTHER STUFF
I think I'd use an internal timer (if I could) to get the 20ms
ticks, then use the timer interrupt to jump to my ISR, which would
fill the shift register with new data, then latch it and increment
the row counter when the 48th bit clock went true, then exit and
wait for the next timer interrupt.
--
John Fields
Professional Circuit Designer
.
- Follow-Ups:
- Re: Multiplexing LEDs - calculating resistor value
- From: John Fields
- Re: Multiplexing LEDs - calculating resistor value
- References:
- Multiplexing LEDs - calculating resistor value
- From: roxlu
- Re: Multiplexing LEDs - calculating resistor value
- From: nospam
- Re: Multiplexing LEDs - calculating resistor value
- From: roxlu
- Re: Multiplexing LEDs - calculating resistor value
- From: Jonathan Kirwan
- Re: Multiplexing LEDs - calculating resistor value
- From: roxlu
- Multiplexing LEDs - calculating resistor value
- Prev by Date: Re: Speaking of audiophools
- Next by Date: Re: How to detect telephone status at the other end ?
- Previous by thread: Re: Multiplexing LEDs - calculating resistor value
- Next by thread: Re: Multiplexing LEDs - calculating resistor value
- Index(es):