I'd like to be able to explain the search engines..... but I can't.
Good thing there's People around.
https://www.picbasic.co.uk/forum/showthread.php?p=37805
<br>
I'd like to be able to explain the search engines..... but I can't.
Good thing there's People around.
https://www.picbasic.co.uk/forum/showthread.php?p=37805
<br>
DT
A PIC can't do 10 bit PWM to 500Khz, since it would need a counter running at 500KHz * 1024 = 512MHz.
Charles Linquist
Absolutely Correct!
As the frequency increases, the resolution decreases.
Follow that all the way to the highest frequency, and with OSC=16, you should have 2mhz PWM at 1-bit resolution (essentially on or off).
@ 500 khz, you should have 4-bits. And if all you ever want is 50% dutycycle, then it's a piece of cake.
<br>
DT
Hi Darrel & Charles.
I need 50% duty cycle at 32767 Hz on CCP2 to drive an Intersema pressure sensor - easy - even I can do that with 8 bit HPWM.
I also need a variable duty cycle to drive an AGC circuit. With 8 bit HPWM, my AGC is sudden death and one count goes from not quite enough to a little bit too much. 10 bit HPWM would be much less sensitive. The frequency must stay at 32767 Hz to suit the Intersema sensor.
Can I get 10 bit HPWM at 32767 Hz?
Cheers
Brian
Last edited by BrianT; - 8th January 2008 at 10:20.
As long as your OSC is 20 or more, then Yes.
@ 4mhz OSC you only get 8-bit resolution with that freq.
HPWM10 should work fine with it.
<br>
DT
Bookmarks