Hi ,

I want know because using the Picbasic Pro function HPWM the max frequency at any oscillator speed is 32.767 kHz, but and using manual register setup, using 20 MHz Xtal can get 2 MHz.

manual register setup for 1 mhz PWM PIC 16F873

PR2 = 4
T2CON = %0000100
CCPR1L = 2
CCP1CON = %00011100

Freq out 1.0 MHz 50 % Duty Cycle


interesting link :http://www.micro-examples.com/public...alculator.html

regards

sunny