Fading RGB LED with PWM Controll
The circuit is very simple. The RGB LED is hooked up to the PWM outputs on PORTB1 , PORTB2 and PORTB3 of the ATMega8. There is also a resistor between the LED and the ATmega8 to limit the current to 20mA. There is also a link to the datasheet of the RGB LED that is used in this project.
The code for the fading LED is written in assembler with the AVR Studio 4. In this example the LEDs will fade in and out one by one. The PWM timers of the ATMega8 are used to let the LED’s fade in and out. To use the PWM timers you first need to initialize the timers at the begin of the program code. The speed of the fading in and out can be changed with changing the clock speed of the ATM8.You can copy and paste the textfile into the AVR Studio 4.
Fading RGB LED with PWM Controll: [Link]



July 7th, 2008 at 6:10 pm
Hi, i have a project with RGB LED and a proximity sensor, i need someone to give me hints or give me ideas on how to build this circuit.
Basically the RGB LED will fade into a different color upon an object proximity to the sensor.
Any ideas ?
July 7th, 2008 at 11:39 pm
verduzconi, i remember seeing something like that a couple of mounts ago but i cant find it right now, i searched everywhere but i just can’t find it, sorry, if i stumble on it I’ll let you know