0 favorites     0 comments    78 visits

1/40 f/3.1 8.2 mm ISO 200

PENTAX Corporation PENTAX Optio S5z

EXIF - See more details

See also...


Keywords

electronics
PWM
AVR


Authorizations, license

Visible by: Everyone
All rights reserved

78 visits


PWM again...

PWM again...
What to do if you favourite microcontroller doesn't have enough hardware PWM pins? Software driven PWM of course.

There many absolutely dumb ways to do it, and I've probably tested all of these. They can be classified as "brute force".

A better way of doing it is to only do any work if there is anything to do. But you already know all of this of course. Calculate when to toggle the lines and let a timer do all of the work. Code can be found on my blog

Comments

Sign-in to write a comment.