Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Bit-banging PWM in C

2004-11-05 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "weston54" <weston54@y...> wrote:
> 
> I need to generate PWM on PB0 and PB5 of a Mega8.  Yes, I know there
> are dedicated hardware PWMs on this chip, but that's not what is
> required.  Has anyone had experience bit-banging PWM?  

Do you need a true PWM where the duty cycle of each output period is 
identical or do you just need a waveform that implments the desired 
duty cycle on average?

If the latter case is of interest, it is simple to implement.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.