VTK-51  
  home     thefroemmings.net 

AT89LP Pulse Width Modulation Calculator

Device 
Frequency   
Requested PWM Rate   Hz
Requested Duty Cycle   %
Use Prescaler 
 
Timer 0/1
Max. Rate
 Hz
Min. Rate
 Hz

Reload
 
TPS
 
Actual Rate
 Hz
Error
 %

Duty Value
 
Actual Duty Cycle
 %
Error
 %

Note: The Timer Prescaler (TPS) on the AT89LP213/216 can increase the lower range of the PWM. However, TPS will affect other parts of the system in addition to Timer 0/1. If TPS is constrained by other system requirements, use this calculator instead.

Note: PWM Mode 2 will generate a 50% duty cycle at the specified reload value. Use the Mode 2 duty cycle pair to define the high/low portions of the output to achieve the requested duty cycle at the specified frequency.