Please help me with my RGB LEDs!

Hi all...

Before I get into my little problem, let me start by saying I've only had my Arduino for a week and I absolutely love it... I'm a total n00b when it comes to electronics so if you guys could help me out, I'd really appreciate it.

I picked up a few of these RGB LEDs: http://maplin.co.uk/Module.aspx?ModuleNo=35893

The datasheet is here: http://www.maplin.co.uk/Media/PDFs/N63AX.pdf

I've managed to get two of them working, but I've now used up all the PWM pins on my Arduino. :( I want to hook up another two and have each be able to be any colour.

I was wondering how I would go about this? Do I need to use a shift register? From what I've read that won't work with PWM. I'm really quite confused at the moment, so any help would be greatly appreciated!

Thanks...

Matt

I've only had my Arduino for a week and I absolutely love it... I'm a total n00b when it comes to electronics

I LOVE how every thread starts like that :).

Do I need to use a shift register

I believe that should work.

From what I've read that won't work with PWM.

Now, I'm pretty nooby when it comes to Shift Registers, but I have no idea why it wouldn't...

That was a quick reply! :)

I thought shift registers would only allow me to digital... To be honest, I'm completely confused... A good n00b explanation of how to do it would be awesome! :)

Cheers!

it probably wouldn't work with shift registers, unless you used the pwm as the clock, then they would all be in the exact same state...

off the top of my head I am not sure

Try to check this old thread:

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

It's about using a 5940 IC which has 16 PWM channels

I'm pretty nooby when it comes to Shift Registers, but I have no idea why it wouldn't.

The reason why it wouldn't work is that PWM turns things on an off rapidly to achieve dimming. A shift register only expands the digital output capability. In order to get PWM from a shift register you would have to load the shift register very quickly at least 256 * 32 = 8192 times a second, for 8 bit PWM resolution. Then you would need the software to drive this. There would be little time to do anything else.