PIC16F628 8 RGB LED Controller

This code is for a simple RGB LED controller for 8 LEDs using a PIC16F628. The pattern is determined by the data in the EEPROM. Upon startup, the controller loads the data into RAM and starts up the sequence. 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. Currently the max number of display patterns is 20 (because the bank array is 80 bytes and each pattern is 4 bytes).


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

20 thoughts to “PIC16F628 8 RGB LED Controller”

  1. ola amigo estou a procura de controle de leds rbg com pic 12f629
    grato a todos
    helio atibaia são paulo brasil
    que tenham um feliz natal a todos

  2. What do you think about using PIC16F628 to control individule circuit board? It seems impossible for me but people from Lunar Accents said they can do it with their program!!!

  3. #4 (Solar) – What do you mean by using a PIC16F628 to control individual circuit boards? If you mean a master and multiple slaves, then yes it would not be a problem. As long as you use a multidrop bus then it would not be difficult to create a system that controls multiple lights. You could even do long-distance control using RS485 converters and wiring.

  4. hi, nice circuit, im building a pov and using one color led, hopefully, your schematic gave me an idea to make a tri color pov toy. do you have the source code in .asm format. thanks

    alain

  5. Can someone post a video to this? It seems like the red LEDs stay on and the green and blue chase each other in the .hex example. Is this correct?

  6. What i can do with that Code? The circuit it`s does work self? Were i need That code???Please tell me !!!!!

  7. I built a backlight for a wall hung LCD clock and used 8 RGB’s. Then i stumbled on this wonderfull circuit, Thank you very much…. It just so happened that I hadf an extra 16f628 and the project works wonderfully. I was wondering if you had any other HEX codes for the non serial version? what I have is 4 RGB’s down each side of the display, i would like to make them all change color at the same time or change in patterns of 4(so 2 RGB’s are the same color at the same time) I’m new to PIC programming so I would appreciate any help. Thank you for your time

  8. Hi,

    Where can I find the Bank_arrays_ins.jal librairy, for this very cool project?

    Thanks

    Davidp0

  9. Hi..! Can you post the source code with some comments or explanations..I´d like to make others effects. Thx in advance

  10. Hi,

    I’m trying to build a rgb led POV, but I don’t know in what frequency the engine has to spin
    to produce an image by POV, and don’t know how to control what word will appear…can you help me? I mean, with the schematic and the code shown, can I make one of this things?
    (I’m a rookie in eletronics/PIC programming)
    Thanks

    Filipe Galiza

  11. @Galiza: @Galiza:
    Hi.
    i too working on POV clock ….. can u give me some information abt ur project…. plz help me … i am in initial stage of my project

  12. Hi LEDs
    I need to control 100 RGB LEDs, each with different color (let say that the color values are taken from data in memory).
    the color should change every 50 milliseconds.
    what is the best way to do that ?

    TNX,
    Vertilka

  13. Hi,
    I need to control 100 RGB LEDs, each with different color (let say that the color values are taken from data in memory).
    the color should change every 50 milliseconds.
    what is the best way to do that ?

    TNX,
    Vertilka

  14. Hello, I’m interested in this project, I want to learn how to do PWM in software using this, but it give me errors at compiling your (unmodified) source code.
    Theese are the errors:
    1RGBLED.jal:1: cannot open ‘f675_4i.jal’
    1RGBLED.jal:3: cannot open ‘nibsbps.jal’
    1RGBLED.jal:16: “osc_calibrate” not defined
    1RGBLED.jal:16: unexpected token: osc_calibrate

    I don’t know how to fix the errors, can you help me?

  15. Hi…!
    I’m building a pov with single color led. I’ve used a shift register 74hc595. I’ve built complete circuit. The only thing remaining is the pic program. I have pickit 2 and i use mplab for programming. I’ve tried a lot but i didn’t get the pov text. I’m using 16 led’s with 2 shift registers. Can anyone please help me with the program in mplab? I need it for my college project.
    My email id- tejabhang92@gmail.com

    Thanks in advance…!

Leave a Reply

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