0% found this document useful (0 votes)
192 views2 pages

PIC PWM Value Calculator

Uploaded by

YankuSa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
192 views2 pages

PIC PWM Value Calculator

Uploaded by

YankuSa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 2

Sheet1

F
OSC
8 MHz PIC master oscillator frequency
T
OSC
0.125 s Time for one cycle of F
OSC
TMR2 pre-scaler 1 Pre-scaler ratio assigned to timer 2
PWM frequency 31250 Hz Desired PWM output frequency
PWM period 32 s
PR2 63
TMR2 pre-scaler 1 Pre-scaler ratio assigned to timer 2
PR2 63 Timer 2 reload value
PWM period 32 s
PWM frequency 31250 Hz
Duty cycle value 24 (CCPR1L:CCPCON<5:4>)
TMR2 pre-scaler 1 Pre-scaler ratio assigned to timer 2
High time 3 s Length of time PWM output is high
Low time 29 s Length of time PWM output is low
Duty cycle 9.375 % PWM output duty cycle
Resolution 8 bits Theoretical duty cycle resolution
Usable resolution 8 bits Usable duty cycle resolution
Maximum Resolution
Created by Philip Pemberton: [email protected] / www.philpem.me.uk
PIC PWM Value Calculator
PWM Period Calculations
Solve for PR2
Solve for PWM period
PWM Duty Cycle Note: period taken from Solve for PWM
Page 1
Sheet1
Created by Philip Pemberton: [email protected] / www.philpem.me.uk
PIC PWM Value Calculator
Page 2

You might also like