gramo
New Member
I know there are 100's of RGB LED circuits and programs out there, but here's my take on things
I've made a program that allows the user to control the brightness of each LED from 0 to 100% by modifying a register from 0 to 255 for each color
What makes this program different? I back up the system registers before the interrupt, and restore them afterwards, so your main program could be doing absolutely anything (within reason), and the three PWM signals will function perfectly, and are all editable on-the-fly
It also includes a very handy mS register that can be used anywhere in the main program to create delays and the such, eg;
This example will delay 10mS between each increment of the Red Duty Cycle. The **broken link removed** is a little more elaborate, and generates a random number to decide which color to increase/decrease, for something so simple, the results are amazing in real life.
The Common Anode RGB LED's I used can be found **broken link removed** (they are very bright and have very vivid colors)
You can get very stunning effects with these LED's, and the video's I took didn't give them the justice! I used three LED's and a large white semi transparent bowl to diffuse the light and make a "mood rock" type feature.
RGB Practicle.wmv - File Shared from Box.net - Free Online File Storage
More info about the program and circuit can be found **broken link removed**
I've made a program that allows the user to control the brightness of each LED from 0 to 100% by modifying a register from 0 to 255 for each color
What makes this program different? I back up the system registers before the interrupt, and restore them afterwards, so your main program could be doing absolutely anything (within reason), and the three PWM signals will function perfectly, and are all editable on-the-fly
It also includes a very handy mS register that can be used anywhere in the main program to create delays and the such, eg;
Code:
Red_Duty = 0 // Clear the Red_Duty register
While Red_Duty < 255 // Create a loop condition
Inc(Red_Duty) // Increment the Red Duty Cycle
mS = 0 // Clear the mS register
repeat
until mS = 10 // Wait for 10mS to elapse
wend
This example will delay 10mS between each increment of the Red Duty Cycle. The **broken link removed** is a little more elaborate, and generates a random number to decide which color to increase/decrease, for something so simple, the results are amazing in real life.
The Common Anode RGB LED's I used can be found **broken link removed** (they are very bright and have very vivid colors)
**broken link removed**
You can get very stunning effects with these LED's, and the video's I took didn't give them the justice! I used three LED's and a large white semi transparent bowl to diffuse the light and make a "mood rock" type feature.
RGB Practicle.wmv - File Shared from Box.net - Free Online File Storage
**broken link removed**
More info about the program and circuit can be found **broken link removed**
Last edited: