Precision timing of LED matrix

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I control a LED matrix of 7x16 LEDs.
I have an output disable pin of a shiftregister (OE=output enable), on this pin I feed a software PWM signal (via timer1 and ocr1a), so I can dimm the display, but when I dimm the display to much I see the LEDs start to flicker. (wider pause period) But the refeshrate is high, is 759.3 Hz.
The multiplexing of the display isn't timed, it's just a loop.
So how can I time the multiplexing and the dimming simultaniously, so the whole system's timing goes synchronicly?
Lets say 700Hz row-refresh as basis. (is a 100Hz display-refresh), but what about the dimming frequency? I use a mega8, only 3 timers available.
So how can I dimm simult. with the multiplexing? Each row or each frame?
Can't see how.

Thanks.

RES

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if you refresh rows at 100Hz, your frame refresh rate is 100/7 = 14.3Hz, not 700Hz.

you obviously can't dim the entire frame at once, so you need to dim each row. you can of course dim entire frames too, but that would require you to significantly increase refresh rate.

So, if your row display takes 1/100 of a second, you would need at least 16 levels of brightness (you will learn that linear brightness adjustment doesn't make linear appearance to the eye, it would be more like 4-6 levels of brightness). That would make 1600Hz row refresh rate.

Does this help?

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not use T1 as PWM output to OE and the T1 overflow interrupt for multiplexing ?

Then multiplexing and pwm was exact syncron.

In general, multiplexing without a timer interrupt was a very bad idea and must flicker, since it depends from execution time of all tasks.

Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danni wrote:
Why not use T1 as PWM output to OE and the T1 overflow interrupt for multiplexing ?

Yes, I programmed this, and this works very very good indeed.
Zero flickering.

Thanks.

RES.

RES