-
100KHz pwm
Hi folks, not visited the site in a while. I see this place is much more livelier!
I'm still using old skool v2.43 and 18F1320's. I need a 100KHz pwm, but the data sheet is saying max is 30 something KHz.
How can I get a 100KHz pwm out of a 1320, or if I cannot, what is a decent replacement part these days?
-
PBP's HPWM command is limited to 32767 Hz, but you can easily get 100khz (and much higher) from the CCP module.
You just need to set the registers manually.
-
Not sure how to use the ccp yet - never needed to use it so far.
Is there a ccp tutorial with pbp sample code anywhere? A quick search dosent reveil too much.
Heads off to locate the manual.
-
Bruce has a good explanation here.
It's for 38khz, but you just change the numbers for higher freqs. ...And for easy PWM calculations ...<br>
-
If you look at the "special use" label about 3/4 of the way down in this program, you can see how it is done.
http://www.picbasic.co.uk/forum/show...onitor+program