Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how much maximum freqency from pwm??

Status
Not open for further replies.

rky

Junior Member level 1
Joined
Nov 13, 2009
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,380
hi......
i want 5Mhz frequency from pic pwm....
and if 5 mhz freqency isnt possible so plz tell me how much maximum frequency a pwm can generate?? and how??
so plz help me out...
thank you
---rky
 

If you are using an 8-bit Pic, 5MHz will not be possible.
You set the pwm period by writing to the timer period register, normally timer 2. The faster you go, the lower the duty cycle resolution becomes. If you write a 5 bit value to the timer period register, ie. PR2 = 0x1f, and you have a 20MHz oscillator, the pwm period is:

PWM Period = [(PR2) + 1] • 4 • TOSC
PWM_Period = 32 * 4 * 0.00000005
PWM_Period = 0.0000064

Then
PWM Frequency = 156250Hz.
 

but can i put PR2=0x01???
so may i will get 5MHz!!!
 

Not really. The resolution of the duty cycle is related to the period counter.
With a value of 0x1f in the timer period register, the resolution of the duty cycle is down to 7 bits, with a value of 0x09 in the period register, the duty cycle resolution is 5 bits.
If you put 0x01 in the period register, you would not be able to vary the duty cycle.
Microchip do make high speed PWM modulator chips, such as the MCP1631.
That will run at up to 2MHz. You might be able to find similar devices that meet your needs?
 

    rky

    Points: 2
    Helpful Answer Positive Rating
but can we use pll for high frequency(e.g. 3Mhz) generation from pwm???
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top