Go Down

Topic: modifying SoftPWM for attiny (Read 5 times) previous topic - next topic

niekwoo10

Hello,

I would like to be able to use an RGB LED with my attiny45, but it only has 2 PWM ports. I found this SoftwarePWM library http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1268806013.

I tried to compile with the arduino tiny and attiny45 @1Mhz but it didn't work. The library uses timer2.

Is there any way to modify this library for use with attiny45 or another working library?

Coding Badly

Hello,


Hello to you.

Quote
I would like to be able to use an RGB LED with my attiny45, but it only has 2 PWM ports.


It has three.  (technically it has four but two overlap)  I suggest figuring out why the third one is not working rather than trying to port SoftwarePWM.

niekwoo10

I saw on the datasheet that it had 2 channel RGB so i tought 2 pins. Now if i try to fade digital pin 3 it works just fine but with all 3 together the one connected to pd3 just flickers.

niekwoo10

So is there any working software PWM library that's easy to use with attiny45? i only need 1 software PWM port, there are 2 built in harware PWM's in attiny45

Coding Badly


Post your sketch and a link to the core you are using.

Go Up