9 PWM channels

Andrew Cowan

Senior Member
I'm working on another RGB LED project, and I require three sets of LEDs, so 9 PWM channels in total.

I don't really want lots of PICAXE chips, so I'm looking for an expansion chip (serial, SPI or I2c - I don't mind).

Has anyone had any experience with any output expansion chips (supporting PWM) that they would recommend? I know Dippy has created such a system - is that available for sale?

Thanks

Andrew
 

Dippy

Moderator
Hi Andrew,

I'm sure I've seen mention of such a thing on this Forum within the last 6 months.
I'd be surprised if such a thing didn't exist as RGB is popular.
Have you searched Farnell?


My code was not PICAXE BASIC unfortunately.
Basically, I had a DO loop of length 100 so that RGB values were in percents.
Then load the separate RGB values into 3 variables.
Run the loop. Decrement the variables on each loop.
Have a conditional to test variable >0. If so have an output. If not deassert.
This is like a home-made PWM.
I didn't use the PIC PWM as it was a dedicated chip.

My own code added multiplexing and ADCing (overheat thermistor) and reading the USART buffer.
This allowed the PIC (18F25K20) to control 8x RGB+W channels.
4 'PWM' channels plus 8 lines for MOSFET control.
And serial control like an LCD firmware chip. (Address,%R,%G,%B,%W)
And reducing power in overheat condition and reporting back to Host.

I'm sure with a fast x-Y decoder you could multiplex even more.

The bit I was pleased about most was my serial read+process without flicker.
I interleaved the processing so that it was 'hidden' time-wise amonst the muliplexing. No gaps, no flicker.... feeling good...

I think each individual RGBW ran at about 3kHz , so fairly stable. But you could see the strobe effect if you really waggled your eyes. (Far less flickery than most car rear red sidelights!!).

I don't even know where it is now. I only did it as an exercise.

To try and do the same thing with an X2 PICAXE may be possible but I think you could only do one if you wanted it fairly flicker-free.
 

techElder

Well-known member

JimPerry

Senior Member
TLC59108 are available free from TI as samples - they are surface mount though :cool: I've got a few if you want them PM your address
 
Top