RGB LED control

Rob Wol

New Member
Just wondered if anyone had controlled an RGB LED with a PICAXE chip successfully. A number of my school students wanted to, I have with Crumble microcontrollers but prefer PICAXE.
Thanks Rob


Senior Member
Welcome to the PICAXE Forum.

Yes, I've used PICAXEs to control RGB LEDs using PWM in several projects. PWM allows the software to control the brightness of each of the colours, permitting many thousands of hues. Some of the projects were on a large (commercial) scale for clients, see images, below. My PICAXE microcontroller of choice for PWM control of LEDs is the 28X2 but smaller PICAXEs that have 3 PWM channels can be used.

There are a few different types of RGB LEDs that you could use. These could be a simple 4-wire device with R, G, B and common leads or the more sophisticated WS2801-driven ones Eg the 5050 size. The WS2801 driver requires the use of SPI, which is not so simple for the beginner.

Could you tell us what hardware you have to start with?
3. 'Flourish' (Evening) FITZ Apartments LoRes.jpg5. 'DownLounge' (Night) Leederville LoRes.jpg
Last edited:


Senior Member
There are a fair few projects and discussions on the forum for driving single RGB LEDs which is probably the best way to start, including -


Using a single 4-leg RGB LED, common cathode or common anode, and even with just one resistor in the common line, one can start experimenting with them, three resistors, one per LED, is a better way.

A PICAXE with three separate PWM channels is perhaps best and easiest to use, but a single PWM and multiplexing the LEDs with three digital lines, or just pulsing digital lines to 'bit-bang the PWM' can also work.

Unfortunately this forum, like most others, doesn't support searching for short words like "RGB LED" and similar but Google and other internet search engines can help there, especially when the "site:" is specified, for example -

rgb led site:www.picaxeforum.co.uk


Senior Member
I have made a number of successful single pixel RGB APA102 chip devices where the chip is connected to 4 wire common telephone wire - V+, V-, Data, Clock connections. I think this is easier than using a 4 wire RGB LED with 3 different PWMOUTs though it can be done...




Senior Member
I like the ease of driving the APA102s AND much higher flicker rate if you do not use the global dimming function - have to admit I didn't do well with WS28xx units I tired... [with 08M2s]...