The easiest way to control a RGB Led.
tinyRGB uses an ATMEL Attiny15L (8pin uC) to control a standard RGB Led.
R1 is a pullup Resistor for Reset generation (should be about 10k).
R3 to R5 depend on the LED you are using. You can calculate the resistor as followed:
[list:be74d5d7a1]Rx = (Vcc-Vf)/Im[/list:u:be74d5d7a1]
[Vcc: Volatge of power supply, Vf: Vorward Voltage of the Diode, Im: Max current of LED or AVR pin (20mA)]
The software is written in Assembler (avra under Linux, should be compatible to AVR Studio). Timer0 is used to generate interrupts at about 30kHz. This interrupts are used to build a 8bit PWM. Timer1 is used to change the color pattern.
For schematic see avrRGB1.jpg. Software is also includes, see tinyRGB.zip.
Copyright Tobias Floery [url]http://tobiscorner.floery.net/[/url]Parts:1 x Atmel ATTiny15LP (IC1)
1 x Resistor 10kOhm (R1)
2 x Resistors (see calculation) (R3-R5)
1 x RGB LED