Just a quick question, most diagrams show two PWM pins on an ATTiny85 as per the one shown below, pins 0 & 1.
Some say there are three PWM pins, 0, 1 & 4.
Can someone please clarify which is correct?
Thank you in advance.
Just a quick question, most diagrams show two PWM pins on an ATTiny85 as per the one shown below, pins 0 & 1.
Some say there are three PWM pins, 0, 1 & 4.
Can someone please clarify which is correct?
Thank you in advance.
Microchip should be able to clarify. From the datasheet:
Whether all these pins will output PWM when using Arduino's analogWrite() function, I can't say. It may involve manipulation of the Timer registers to get output on some of these pins. I figure if you want/need to limit yourself to this small chip, you're also prepared to expend the effort to optimize the code for it (isn't that the fun of it, anyway!)
PS: note that this doesn't mean that all 4 pins can have a PWM output independent of each other. Truly independent PWM outputs are limited to 2 pins, but you have choice out of 4 physical pins where you want to map this output to.
Many thanks for your reply, I don't know enough to start manipulating Timer registers so will stick to the two pins shown!
Safe bet! You're welcome; good luck with your project.
Thank you for the link, I will have a good read at it later.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.