Go Down

Topic: 8x8 LED Serial Matrix - PWM question (Read 719 times) previous topic - next topic

idreamincode

Hi All,

 I purchased a SparkFun RG LED Matrix w/ controller - http://www.sparkfun.com/products/759 and have it working fine with 3 colors.  Using the code:
Code: [Select]

// Send a single byte via SPI, taken from Atmel's datasheet example.
void sendChar(byte cData){
 SPDR = cData;
 while(!(SPSR&(1<<SPIF)));
}

It works if I send it 0 - off, 1-green, 2-red, 3-orange.

My question is, how would I go about dimming each of the LEDs.  Can I send it PWM commands over serial?

Thanks in advance,  I just got into Arduino and am loving all the possibilities.

--Kevin

Grumpy_Mike

Quote
Can I send it PWM commands over serial?

No.
You can't use PWM to dim a matrix unless you synchronise your refresh with the PWM. This can done with chips like the TLC5940 and the multiplex library.

idreamincode

Thanks for the answer.  Not exactly what I wanted to hear, but its good to know the limitation of the serial backpack.

I would assume this is the same with the RGB serial matrix?  No dimming allowed on that one either?

Grumpy_Mike

Quote
I would assume this is the same with the RGB serial matrix?

Don't know send me the link.
I did notice the lack of current limiting resistors in the schematic of the first one. Very poor design.

idreamincode

Here is the RGB unit.

http://www.sparkfun.com/products/760

I wouldn't say these are poorly designed.  They serve their purpose very well.  I can have a LED matrix up and running in minutes and not have to worry about cables, soldering, etc etc.  If they can't dim, so be it.  If the next version they put out dims, that would be excellent, but for now, I'm very happy with this backpack.

As for the limiting resistors, they do specify you need to feed it 5V.

--Kevin

Grumpy_Mike

That is better they have limiting resistors on that one. Still can't dim it though.  I think there must be an error in the previous schematic, no matter what voltage you always need something to limit the current in an LED.

Go Up