Dimming with max7219

Hi all
I'm asking this question because I can' find any cheap max7219 in france, and my order from futurlec is gonna take a looong time to arrive ^^
To set the brightness of a whole LED matrix with a max7219, you have to use the proper resistor connected to the chip. Ok.
But if I want to have some kind of grayscale on my display?
Let's say we have 2 leds, with a on/off state. To light both, i'll send something like [1,1], to light off [0,0].
Say I want my led #2 to be 50% brightness. Would it work If I do something like this (pseudocode)

void loop () {
[1,0];
[1,1];
delayms(10);
}

Thanks all ^^

Hi melka,

No, won't work with the max7219/7221.
The resistor sets the maximum brightness of the leds (or rather the maximum current through the Leds). The brightness of the whole matrix can be controlled by software, but not an individual Led.

Your pseudocode uses software-multiplexing, but the MAX7221 already multiplexes in hardware. The Led will surly flicker wildly...

Eberhard

Thanks wayoda
Any idea of how I could dim some leds? I plan to use a lot of max7219 to control a lot of RGB leds (at least 256) from max/msp. Maybe another chip than the max7219?

Hi,
Dim some Leds or all 256 leds?
You should probably forget about the MAX7219 anyway, because it was never intended to be used with RGB-Leds.
There are some people on this forum who made it work with RGB Led's but not without problems (flickers) on updates.

What sort of display are you building? There are several ways to drive Led's, but none of them is cheap if we talk about controlling the brightness of each individual Led...

Eberhard

I've opened a topic that might hold some anwsers for you, regarding the TLC5490 led driver which is pretty cheap ( 4 dollars)

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208720996