PDA

View Full Version : Maximum HPWM freq. 12F683



Ryan7777
- 12th August 2008, 15:51
I need to know the maximum HPWM frequency I can run on a 12F683 using the internal 8 MHz osc. I know that the manual says "32 point whatever" is the max for HPWM on any chip, but reading some posts with mister-e's pic calc it looks as though it can do 38 kHz for IR modulation.
I'll be doing some IR modulating as well, but I have some 56 kHz detectors that i'd like to use,
which would require that i output a 56 kHz signal on the HPWM output while i read the detector on another port. I really need this to be a one chip solution, insted of having a 56 kHz osc using logic chips AND having a pic to read the detector....

so to recap.. ONE pic12F683 driving a IR led on the HPWM at 56 kHz while using the same PIC to read the IR detector on a different port. can this be done?

Also.. I cannot install the pic calc on this computer, I don't have admin rights.....

skimask
- 12th August 2008, 15:55
Page 79 of the PIC12F683 datasheet (DS41211D), Paragraph 11.3.1, Equation 11-1.
Do that math, then do a 1/x on the calculator, and you have your freq for PWM.
You also have to realize that with higher frequencies, you lose PWM duty cycle resolution. (See the tables right below that equation). For instance, you could run the PWM at 2Mhz, but you can only turn it on and off (1 bit resolution).