PIC16F628 Serial 8 RGB LED PWM Controller

This 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.

The microcontroller code can be downloaded here:
u8RGBpwm4.jal (hex)

Sample VB code and test application: 8RGBpwmblinkenlightsDR1r1

5 thoughts to “PIC16F628 Serial 8 RGB LED PWM Controller”

  1. 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,


  2. 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.

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

  4. Can you please provide video for 8 RGB LED project, and expecting a RGB LED CUBE project and its details.
    Uttam Dutta/India

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.