I'm trying to use PIN 0 and PIN1 as PWM outputs to drive an LED, as well as use the TONE function to output a frequency on pin 3. PWM does not appear to be working though. The sketch works fine (with changed pins) on a DCBoArduino. Is this an issue of expecting too much from the timer in such a small chip or am I not doing something right in my code?
I just wish I could get an 8 pin processor that did 3 PWM channels.
The TONE output is a simple square wave rather than a PWM signal. But now that I think of it, that's really all the the PWM signal is right?
And generate a tone?
Yes. I'd like to be able to use 3 PWM pins to control a single RGB LED, while using a 4th pin to generate a constant frequency, I've been using tone since it is simple.
In one of the other threads there was some talk of the ATTINY85 being able to do PWM on pin PB3, but you appear to firmly discount this
It is. But, in my experience, the quality is not very good. Any interrupt (like the timer 0 /millis interrupt) causes ticks and pops. The problem gets especially bad when the processor is running at 1 MHz.
Has anyone successfully used this library before?
but nothing has changed
...I cannot get tone() operational...
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16