PIC16F628 Serial 8 RGB LED Controller

This code is for a simple RGB LED controller for 8 LEDs using a PIC16F628. It is controlled by sending 3 bytes to the internal USART for the red, green, and blue color channels. The operation is very simple and so is the wiring. The PIC selects each LED then turns on/off the respective colors then goes to the next LED. Because of persistence of vision, the eye sees the LEDs as all being on at the same time.

The microcontroller code can be downloaded here:
u8RGBm.jal (hex) (less optimized but higher refresh rate)
u8RGBm2.jal (hex) (better optimized but lower refresh rate)

Sample VB code and test application: 8RGBblinkenlightsDR1r1.zip

15 thoughts to “PIC16F628 Serial 8 RGB LED Controller”

  1. Hi Steve!

    I’m definitely going to build this little and easy project, my son will love it!
    Could you please link the schematic page with a bigger picture? The other led project has this link functioning.

    Keep on designing!

  2. #4 (EVE) – Thanks! I’ve looked at the Lunar Accents website and they have some interesting industrial LED applications. A number of other manufacturers are creating similar products due to the widespread interest in LED lighting. I enjoy creating hobbyist projects and applications and sharing them as much as possible.

  3. How about 10 LEDs each channel, using manual dial to control color?
    I don’t have the device to program PIC.

  4. Hi Steve, great job, thank you very much for share it…!
    I´m almost a beginner in electronics and I´ve built the circuit successfully and It looks awesome…!
    So far my programming knowledge allow me to build 16f628 based sequencers (up to 15 channels as I don´t know much of multiplexing).
    I´d like to add other effects, like blinking three times red, three times green, three times blue, and others sequences. Is it possible to add three more led in paralell to make 4 x 8 channels? Can you help me with this…?
    Thx in advance

    Rafael

  5. Hi Steve,

    Just put together your project. Nothing happens. No LEDs light up. It could be many things but I think the RS232 connection to my very old is not working If I read the EPROM directly, it is full of FFs. Do you have somewhere a test program that just eluminates the LEDs with a default value. Many thanks in advance

  6. I must correct my last post. The problem is not with the RS232 interface. This is working ok. The problem is that I didn’t connect the RGB LEDs which are made by Kingbright correctly. There are 6 connections and not 4. Sorry for the misleading post.

    Lawrence

  7. Cool Project…
    But it doesnt compile with actual JAL V2.4n compiler and actual Jallib.
    So I will use your Code for learning purposes and try to rewrite it for the new Jallibs.
    I used a PIC 18f2550 and USB instead of RS232. Since my version doesnt run smoothly I now changed to use a Pic18f14k50 and an TLC5940 PWM Chip. It doesnt work well, yet, but when it is working well I will tell you.

Leave a Reply

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