This code is for a simple RGB LED controller for 1 RGB LED using a PIC12F675 (or PIC12F629). The pattern is determined by the data in the EEPROM. When the PIC needs a new target for the PWM, it loads it from EEPROM. Pin 4 (GP3) is pulled high because it is used to switch between displays. Please see the source code for more information; the structure and design is commented. The operation of the controller is very simple and so is the wiring.
The microcontroller code can be downloaded here:
– 1RGBLED.jal (hex)
I like it. Just starting pic programming, and I’m wondering what the value of R1(the pull up resistor) is. Thanks.
Never mind, i got it to work, turns out my switch was broken in the closed position.
1 & 2 (Daniel Winkler) – I intentionally left those blank because they would be dependent upon the application, but I would suggest either a 3.3 kOhm or 4.7 kOhm resistor. Make sure to use one though, otherwise the switch will short the power supply to ground when it is pressed!
i living in VIETNAMESE. i use PIC12F675 for my robot but i don’t know how can i deliver program in pic?
wow! that is OK!
Hello
I just build a similar circuit as LED flasher for RC models, input line decoding the PPM signal from a RC receiver. One change I did after some collegues input. Seems that the PIC’s have less resistor to ground than to VCC, so driving a LED to ground, Anode connected to VCC may be brighter. So I added the LED resistors in serie to the pic pins, and added a 3 pin connector allowing LED to be connected to gnd our VCC. I’ill publish the board layout on my WEB site when available.
I was bought RGB diode with common anode. It’s possible to change progam or i must use NPN transistor to drive it ?
Use it as is…
Connect the common (+) to Positive and the negative (-) of the leds via resistors (see your data sheet for info on value) to the outputs of the PIC12F675.
(It works with my RGB-led but the PIC can not sink source as powerfull as driving it)
regards,
Seconika
I used a common cathode type, too.
but 4 diodes in parallel.
to get the full current to the diodes i used three PNP transistors(2n2907) as driver for the diodes.
hi :
i am new in the pic world
i just want to know how learn all about pic 12f675
how begin how programming how to know all the instructions how program and how pass to hex files
i hope you can answer me
thanks for help me…
hello,
why you give “5v” to MCLR ?