Pic RGB color generator using PIC12F629
PIC RGB is a circuit that generates random RGB colors using a RGB LED and fades between them. The idea for this circuit came from the candle simulator  and another project called TinyRGB  .
The challenge was to create an algorithm that could fade 3 independent colors at different speeds in the same time interval, using integer math, (of course).
Design and Implementation
Basic schematic includes a voltage regulator 78L05, the PIC with a decoupling capacitor and a few resistors.
Since each PIC pin can supply a maximum of 25mA of current, and the LED specification indicates a maximum of 25mA, the LED resistors were calculated to provide 20mA of current in each color.
Vred = 2.1V, Vgreen=3.4 and Vblue=3.5V
Rred = 145 Ohm -> 150 Ohm
Rgreen = 80 Ohm -> 82 Ohm
Rblue = 75 Ohm -> 82 Ohm
The push-button switches between running modes, random and sequence.
Note: PIC pin1 is the lower right one.
For more detail: Pic RGB color generator using PIC12F629
For All Your PCB Need, One-stop PCB Solution Services Appear:
EasyEDA: free PCB design tool, 200,000+ engineers are using
PCBs: 10pcs 2-layer 10x10cm only $8.21, on-time global shipping
Components: save 50% on cost, save on freight if shipped with ordered PCBs
Current Project / Post can also be found using:
- 12f mcu pwm rgb led
- clock circuit Pic16f876
- voltage regulator with 12f629