Thread: ATMEGA16 PWM
View Single Post
  #2   Spotlight this post!  
Unread 06-04-2006, 22:03
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
Re: ATMEGA16 PWM

Here is a pwm module I wrote. It is currently set up for an ATMega8, so the register names may need to be changed slightly, but I have used a version of this code on an ATMega16.

This does direct motor control PWM, 0 - 100%, not RC servo PWM. If that is what you want, you need to adjust the period and limit the range.
Attached Files
File Type: h pwm.h (787 Bytes, 2239 views)
File Type: c pwm.c (2.2 KB, 3702 views)
__________________
Don Reid