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:
- tinyRGB Sourcecode and HEX File
- NEW RGB LED – Sourcecode for ATTiny45 from Robert Ibener
December 10th, 2006 at 12:55
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
December 10th, 2006 at 17:18
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
December 13th, 2006 at 01:05
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.
December 14th, 2006 at 17:41
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
December 15th, 2006 at 00:46
I’m working on it. Do you need it faster or slower?
December 15th, 2006 at 12:40
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
December 21st, 2006 at 12:51
[...] The software for the AVR is the same as for tinyRGB. [...]
January 7th, 2007 at 15:59
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
March 2nd, 2007 at 17:43
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
March 4th, 2007 at 14:21
Send me an email with your code and I will publish it here.
December 12th, 2007 at 01:30
How do you download code to it?
December 12th, 2007 at 15:13
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.
December 13th, 2007 at 06:52
ok, thanks