RGB LED Controller with PIC18F25K20


Posted on Nov 20, 2012

In this project it was used the ?Piranha Super-flux RGB? Led of common anode, and the PIC18F25K20, in order to generate combinations of colors. It has two function modes, automatic that generate the color sequence that is stored in the ?C memory, and the manual mode in which you can select one of the seven possible colors. The control of the RGB led is made with PWM(Pulse With Modulation), because PIC18F25K20 only have 2 PWM outputs (Hardware), I did the PWM by software to have 3 PWM outputs for that I use TIMER0 and for the Manual mode I use IOC(interrupt on change).


RGB LED Controller with PIC18F25K20
Click here to download the full size of the above Circuit.

In this project I use push buttons to change between modes and to change the colors. But if we use the button as in the circuit (1) we have a problem. The problem with this configuration, due to the mechanical nature of any switch that may contains spring return action of some kind, there won?t be a clean transition from a state to another, but instead there will be a series of high and low states spikes. To solve that problem we have to implement a de-bouncing system, it can be done by hardware or software. We can use a RC delay circuit or it can be done with a schmitt trigger, but both ways will increase the price. So I done by software the de-bounce.




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

Three-minute-timer
DIY Arduino FM Radio Shield
Transmitter Precision Thermocouple Amplifier Circuit
Melody Generator Circuit using UM66
Diode Radio For Low Impedance Headphones
Tachometer circuit
SN74AVCA406E MMC SD Card And Memory Stick Voltage-Translation Transceiver
Using the Panasonic WM61A as a Measurement Microphone
4 Channel Portable Audio Mixer
NE5532 manufactured by headphone amplifier circuit
A circuit of a pyroelectric infrared switch application BISS0001
Homemade infrared automatic door controller circuit
Common collector amplifier circuit DC and AC path b
High Power Full Bridge Flyback Driver circuit



Top