Hi Nick,
As per the datasheet, PWMPeriod = (PR2+1) * 4 * Tosc so with an 8MHz oscillator and PR2=0 the maximum PWM frequency would be 2MHz (1/(1*4*0.000000125)Henrik, based on your prior experience with CCP module I have few questions that you might be able to answer:
1. What will be the maximum frequency out that can be achieved from a given master clock?
Yes, that's what the PWM module does, however the number of available dutycycle ratios depends on the selected output frequency. At the maximum output frequency you have 2bits of resoultion, ie the dutycycle can be 0%, 33%, 66% or 100%.2. Can the output be turned ON and OFF at some predetermined intervals (let's say 15 mS ON, 5 mS OFF)?
You keep saying that you want 1MHz output frequency with 15ms on-time and 5ms off-time. That's a period of 20ms which equals a frequency of 50Hz - not 1MHz. If you mean 15us on-time and 5us off-time it'll be 50kHz, still not 1MHz.
No, not really.3. What other requirements are there for the PIC (other the CCP module) to be able to get that?
I think it might, I'll have to look into it a bit further though.4. Will PIC12F683 do the job?
/Henrik.
Bookmarks