Sections
You are here: Home Forum Devices and Hardware PWM and Common-Anode RGB LED?

PWM and Common-Anode RGB LED?

Up to Devices and Hardware

PWM and Common-Anode RGB LED?

Posted by Jesse at November 16. 2008

I was able to hook up a Common-Cathode RGB LED to the MC and control it with 3 PWM channels just fine.  I wanted something a bit smaller so I picked up these surface mount RGB LEDs from SparkFun:

http://www.sparkfun.com/commerce/product_info.php?products_id=7844

However, they are Common-Anode.  I can hook up the anode to the VOut1 port and the cathodes to Out0-2 and turn them on and off as digital outs (though the LED is off when the port is set on, and on when set to off).  If I try to use them as PWM ports, the LED just stays off until I disable that PWM port.  

Any suggestions?  All I can think is to either write my own PWM code by turning the DigitalOut ports on and off and sleeping for varying amounts of time.  Or maybe a small circuit that would convert the output of the Out# ports?

Thanks in advance.

Powered by Ploneboard
Document Actions