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:
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?