tinyRGB
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:
Rx = (Vcc-Vf)/Im
[Vcc: Volatge of power supply, Vf: Vorward Voltage of the Diode, Im: Max current of LED or AVR pin (20mA)]
If you want to control power LED’s read here: powerRGB.
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.
Downloads:

Hello Tobi,
your code just fit my needs for my application.
The Program works fine , color-change is smooth, except for one small (but disturbing) side-effect:
When one of the LED (either R,B or G) dimms up (gets brighter) there is a short “blackout” during the dimm-up-process.With “blackout” i mean, that the LED which gets brighter will switched off for a very short (but visible) time, then continues with dimming.This “blackout” shows up randomly, sometimes at the beginning of the dimming-process,sometimes in the middle or near the end or even when the LED is fully on.The “blackout” is only in the dimming-up-phase visible.Dimming-down is smooth and o.k. I have simulated your program in AVR-Studio4 for hours to detect this “blackout”, but with no success.In AVR-Studio all seems to be fine, no reason for a “blackout” found.I have also tried several Tiny15Ã?´s but no change at all.
My Question:Do you know about this problem and (if available) can offer a patch to eliminate this “blackout” ??
Best regards and thank you for this great code
Robert Ibener/Vienna
Someone reported this “blackout” earlier. I had a short look at the code then but couldn’t find the source. When I have some time I’ll have a look at it again.
Tobias
so here’s the new version of the code. The fading has been improved and I couldn’t see any “blockouts” or “glitches” using an 1W RGB Led.
Hello Tobi,
thank you for your new version.It works as expected now, even i am missing some features built in in the previous version (for example:
adjustable dimming steps,adjustable time of color-change,e.t.c).
I will try to implement above features into the new version.If you are interrested, i will send you the code, but it will need some time!
Best regards
Robert Ibener
I’m working on it. Do you need it faster or slower?
Hello Tobi,
it�´s hard to say that i need it faster/slower.It depends on my applications (Moodlight-Stuff).
For shure i need some adjustment-points in the code to control dimmtime/color-change-time.With only changing the Timer0/1-Prescaler my problem is not solved.
But dont get nervous about this.It is not soooooo urgent and (i think) it�´s only my personal wish for my PERFECT application.
In the meantime i have adapted your code for a Tiny45.
Best regards
Robert Ibener
Hello Tobi, hello Robert,
at first a happy new year and I�´ll hope that you can understand my bad english.
I think that IÃ?´m the ââ?¬Å?Someoneââ?¬? who reports earlier from this ââ?¬Å?blackoutââ?¬?.
Now I have test allso the new code for the Tiny 15 and I can say:
ââ?¬Å?It works fine and now there are no ââ?¬Å?blackoutsââ?¬? to see. Great work.ââ?¬?
Sometimes I�´m also think that it wood be fine, when there are some adjustment-points in the code to control dimmtime/color-change-time.
Please let me know, if you Tobi or you Robert implement this features into an other new version. I�´m also interested on the adapted code for the Tiny45. Robert, can you send me this code or where can i find the code in the www ?
Best regards
Andreas
Hello Andreas,
sorry for my looooong delay to answer your question about the ATTiny45 code.As i have no Homepage for downloading, i ask Floe for help:
Which is the best way to transfer my modified Code to Andreas??? (May be, Floe is also interested to check the Code?)
Best regards from Vienna
Robert
Send me an email with your code and I will publish it here.
How do you download code to it?
The programming part is not shown here in the circuit. But you can program it like all other AVR connecting MISO (PB1), MOSI (PB0), SCK (PB2) and RESET (PB5) to an ISP Programmer.
ok, thanks
Dera sir . Send me more informtion about RGB TINY ( PCB DIAGRAM AND SOURCE CODE )
tHANKS
hi
thank you for this program
i want use this program by atmega32 but i face to problem.
i think i must be change timer counter .
please help me about this problem fast.
so tell me how can I help you?
[...] Attiny15L RGB Led controller – [Link] Tags: ATtiny15L, Led, RGB, tinyRGB Filed in Led | 1 views No Comments [...]
[...] is the extension of tinyRGB to drive high power LED’s. It is using 3 N-Channel HEXFet Mosfet’s to drive the LEDs and uses [...]