PIC16F628 Serial 8 RGB LED PWM Controller

PIC16F628 Serial 8 RGB LED PWM ControllerThis code is for a simple RGB LED controller for 8 LEDs using a PIC16F628 that has PWM control for the LEDs. It is controlled by sending 12 bytes to the PIC’s internal USART for the intensities of the red, green, and blue color channels. The operation is very simple and so is the wiring. The PIC selects each LED and turns on the respective colors if they are less than or equal to theCount then goes to the next LED. Because of persistence of vision, the eye sees the LEDs as all being on at the same time. However, because this is running off the internal OSC (4MHz) and the code is not optimized, there is some flickering evident when moving one’s head from side to side.

PIC16F628 Serial 8 RGB LED PWM Controller Schematic
The microcontroller code can be downloaded here:
- u8RGBpwm4.jal ( u8RGBpwm4.hex)

Sample VB code and test application: 8RGBpwmblinkenlightsDR1r1.zip

Responses to “PIC16F628 Serial 8 RGB LED PWM Controller”

  1. Matt Bates Says:

    Would you send me an example of your fantastic idea? SChematic and code of any type would be great! I just happen to have a free copy of BASIC for the pic so that would be nice.

    Thnaks for any help,

    Matt

    ReplyReply
  2. Htoo Naing Win Says:

    your projects are good, but I think it is better to write programs in assembly because I’m not familar with jal very well. Thank you.

    ReplyReply
  3. RES Says:

    You could also charlieplex the rgb leds.

    ReplyReply
  4. Sputnik Says:

    How about making it where it stores the pattern in EEPROM and plays it back without need for serial connection?

    ReplyReply

Leave a Reply

Trackbacks/Pingbacks to “PIC16F628 Serial 8 RGB LED PWM Controller”