ATtiny13 RGB LED fading

preview_player
Показать описание
My own Atmel ATtiny13 breakout board running RGB LED fading program. Potentiometer was used to adjust the color fading speed from very low (full cycle takes several minutes or even more) to fast. This microcontroller has got only two hardware PWM channels, so I had to implement software PWM on 3 pins. Timer0 was used to accomplish this task. Each channel provides 8-bit resolution for the duty cycle. This results in a very smooth color animation.
Рекомендации по теме
Комментарии
Автор

Before increasing any of the color components call some kind of delay, which depends on the pot's setting. My code reads the analog value coming from the pot every ~2ms (it's done through an internal timer interrupt) and sets the proper delay length. The main loop is a sequence of delays and color changes. Hope this helps :) If you need more help, feel free to ask

luktor
Автор

Thank you! I was able to get my pot changing the fade speed but am unable to get it to go as fast as yours. It seems like my code has a speed limit. I tried changing the internal clocks speed but no success. Im very happy to finally be able to control the speed with a knob.

rexheck
Автор

Hello dear,
Awesome project.
Can you please share the Arduino code file.
Awaiting your earliest response.
Thanks & kind regards.

Electronplus-unns
Автор

Good Job! I have been trying to accomplish this with an arduino for some time now. Do you have any suggestions on how to write the code to change the speed of the color mixing off a POT?

rexheck
Автор

Hello,
is possible to send me compiled .hex file and fuse setting for this? Thank you.

bystrik