PDA

View Full Version : max frequency on pwm channel 16f88



queenidog
- 31st May 2013, 00:37
What is the max frequency output on a 16F88 MCU on PB3 (ccp1), the PWM output? Tell me I can go to 38000Hz.

In the PBP3.0 manual there's a table that shows max frequencies for given oscillator frequencies. For 8Mhz oscillator, this is 489 Hz. Is this true?

I had 38000Hz output from a LabX1 using a 16F887 MCU. I THINK I had 38000 Hz: my hardware circuit was running (and it's supposed to work at 38000 Hz) but I DID NOT measure the frequency.

I want to trigger an IR LED and detect the signal with a standard IR detector chip like a TSOP 18. If I can't do it with PWM, should I, can I, just toggle a IR detector at 38000Hz? (I know, detectors have a certain protocol to understand the signal, but there are some that simply detect a 38000 Hz IR signal without any fancy modulation.

My 16F88 should be putting out 38000 Hz now...it isn't.

rmteo
- 31st May 2013, 02:05
What is the max frequency output on a 16F88 MCU on PB3 (ccp1), the PWM output? Tell me I can go to 38000Hz.

Very simple, just check the data sheet Table 9-3.

HenrikOlsson
- 31st May 2013, 05:13
Hi,

In the PBP3.0 manual there's a table that shows max frequencies for given oscillator frequencies. For 8Mhz oscillator, this is 489 Hz. Is this true?
No, the table in the manual lists the lowest possible frequency obtainable using the HPWM command at the given oscillator frequency.

/Henrik.

queenidog
- 1st June 2013, 14:57
Thank you all! I can't believe I've been misreading the PBP3.0 manual wrong all this time regarding the LOWEST usable frequency. It is NOT highest. And there in the spec sheet, in table 9-3 which I've not seen before (because I was just letting the HPWM command take of stuff), is a table of frequencies.

I'm on a roll.

Thanks again guys.

rmteo
- 1st June 2013, 15:47
BTW, the numbers in table 9-3 are not the highest PWM frequency that the PIC can attain. It can reach much higher frequencies than those stated - depending on the resolution you want.