Hi All,
Can anyone suggest an "easy" way to generate 10KHz to 200KHz in 1KHz steps from 12MHz clocked 18F87J50?
I tried the code sample "Using PWM with Swordfish" and found I could nicely get anything up to 65KHz.
Do I have to resort to look up tables?
Thanks for any suggestions.
How to generate 10KHz to 200KHz with 18F87J50 ?
Moderators: David Barker, Jerry Messina
Solved
Solved by clocking PIC at 48MHz and using timer3 and interrupt
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
1KHz Steps
As I think you are guessing they weren't exactly 1KHz steps, just 12MHz divided by the values in 16bit counter.
With external 48MHz clock instead of original 12MHz crystal the steps at the 200KHz end were tolerable for my app.
With external 48MHz clock instead of original 12MHz crystal the steps at the 200KHz end were tolerable for my app.