n qwerty
- 16th April 2008, 19:42
im using a pic16f77 and am using the ccp in pwm to generate a 1khz square wave by the following
DEFINE CCP1_REG PORTC
DEFINE CCP1_BIT 2
HPWM 1,127,1000
this works fine until the main program starts (which uses the timer1 module for a counter) when the frequency changes to around 8Khz and i have no idea. Is there some port i need to set to keep it in hpwm mode or am is there something else going on
thanks
DEFINE CCP1_REG PORTC
DEFINE CCP1_BIT 2
HPWM 1,127,1000
this works fine until the main program starts (which uses the timer1 module for a counter) when the frequency changes to around 8Khz and i have no idea. Is there some port i need to set to keep it in hpwm mode or am is there something else going on
thanks