Step 2: Put it to work!

That's it! Connect some RGB LEDs - they will go through all 7 combination of colors.

See it in action.

Hello i will be glad if i can have your code i drive a PIC 16 F 886 that only has one module but i am really courious how you change the colors thanks in advice
Can we use pic16f690 for the job ??? <br>and how is going to affect to the project ???
I'm sure you can. THe change to the code should be very minor - like changing the header file, and possibly changing the pin assignments.<br>
How would you make them fade in and out?
<br> The PIC has a PWM module, so you can use it. But to fade many LEDs can be hard, and that lead me to develop Aurora 9x18...<br> <br> Aki<br>
I only need two to fade.
Will this circuit work with a 16c711 chip?
Thanks! Your instructable just helped me to understand a great deal about how to write a simple program and actually programming a PIC. I had to look up and research the datasheets and other guides to learn how to program. I had to learn about the MCLR function. I had to learn to navigate the PIC software I was using and the process involved there. <br><br>This simple project inspired me to learn way more than you would have guessed. I hope I learn enough to be half as good as your skill level. Thanks again. If I wore a hat I'd tip it to you. You'll be seeing my LED projects with a little more flair from now on.<br><br>
Great! I'm glad that it worked. Thank you for showing me the result.<br> <br> Working with actual projects is the best way to learn. Looking forward to seeing your future instructables.<br> <br> Aki<br> <br>
Okay, the LEDs were my problem. I just got them from radioshack, and they did not say, but a comment for them says that they are common anode, not common cathode. I wouldn't be able to ask you how to change the firmware to common anode, could I? That would be awesome, because I admit very little knowledge of software writing.
The change is pretty straightforward. Just reverse the polarity of the LED pins.<br> I will change the code and upload it here when I have the time...<br> <br> Aki<br>
Awesome. You are a gentleman and a scholar. I look forward to see the code changes so I know how it's done. btw, I'm reading an output off the pic16 of about .5 V on each pin the LED would plug into. Hopefully this is what it is supposed to be :) <br><br>Sorry to pester you. As I have mentioned before, this is a big hurdle for me to jump, so I appreciate your time very much. Thanks.<br><br>Dustin
I suspect that the device configurations are not correct. The new source has the config bits in, so should fix the problem.<br> <br> Aki<br>
Ok. I uploaded the revised source file. Download and edit the source.<br> Change the following line in the source:<br> <br> &nbsp;&nbsp;&nbsp; COM_ANODE equ 0<br> to:<br> &nbsp;&nbsp;&nbsp; COM_ANODE equ 1<br> <br> Then make/rebuild and program the PIC.<br> <br> Aki<br>
Hey bud I just built this circuit, but have never programmed before. I have a PICkit 2, and imported your hex file into MPLAB software. It appears it took, the hex file shows and everything. BUT, nothing happens otherwise. I have 5 volts at pin 14. I am using a PIC16F628a. Would that mean some small changes for the asm file and hex file?<br><br>If I get this working it will be a huge hurdle for me in my attempts to learn to program
I may be asking a common knowledge question, but what's the .1 uF capacitor for? <br><br>The RGBs I have say typical forward voltage is 3.2 for the green and blue and only 2 V for the red. Does it just depend?<br><br>I have a 12V power supply handy, so obviously I will have to change the resistor values and it made me worry what the cap is for and if the PIC chip has a voltage drop I need to worry about.
0.1uF capacitor is for decoupling for the microcontroller. Most digital ICs need decoupling capacitor to stabilize the oparation.<br> <br> The voltages are correct as you say - I designed this circuit using LEDs with 3.2V for blue/green, and 2V for red. I adjusted the resistors to make R,G, and B to have visually the same brightness. (within the safe limit)<br> <br> The microcontroller can only take up to 5V of supply voltage. You will need to use regulator or something to reduce the voltage to 5V. (Over 5.5V can damage the microcontroller)<br> <br> <br> <br>
great this is very helpful. I noticed the brightness of the three were very different on the datasheet so now I understand the differing resistor values. Thanks again!
20k ohm throws me off too...
<br> That's a pull-up for MCLR (reset) pin. This pin needs to be &quot;high&quot; for the microcontroller to run.<br> <br> <br>
awesome, thanks a bunch
I was just on microchip.com, which type are you using here? I don't know which package type is which (PDIP, SSOP, etc.) I'm guessing I want the PDIP for this purpose....
Yes PDIP (Plastic Dual Inline Package) is what you want for this.<br> <br> Aki
May i recomend some bread bord jumpers i broujt two for this project (and others) and good thing about these it dosent matter if you bend one<br>http://www.dealextreme.com/p/breadboard-jumper-wires-for-electronic-diy-70-cable-pack-80208

About This Instructable


25 favorites


Bio: I am an electronic artist living in Brooklyn, NY. I work with LEDs and microcontrollers to create beautiful objects.
More by ledartist: T962A SMD Reflow Oven Fix/Hack Color Organ Triple Deluxe II Aurora 48 - 48 RGB LED Sequencer
Add instructable to: