HankMcSpank
- 14th July 2010, 18:10
Now I'm sure this ought to be simple, but I'm getting unfeasibly confsued wrt register settings on the 16F690 ECCP module.
Firstly I've got HPWM working with my 16F690 (& got the right PICBasic command too!).
This seem to do the job...
CCP1CON = %00001100 'Select PWM Mode
CCPR1L = 0
PR2 = 255
HPWM 1,350,20000
The thing is, because of easier (intended) PCB track layout, I'd much rather the HPWM came out of Pin 7 (vs the default pin 5 from that code above), my problem is associated with the CCP1CONN register explanation on p129 of the datasheet...
http://ww1.microchip.com/downloads/en/DeviceDoc/41262E.pdf
...it's not clear to me how to actually select P1C (PIN 7) as the pin for the HPWM stream to output on - Is it even possible to have the PWM stream come out of P1C in single output?
Any help greatfully received!
Firstly I've got HPWM working with my 16F690 (& got the right PICBasic command too!).
This seem to do the job...
CCP1CON = %00001100 'Select PWM Mode
CCPR1L = 0
PR2 = 255
HPWM 1,350,20000
The thing is, because of easier (intended) PCB track layout, I'd much rather the HPWM came out of Pin 7 (vs the default pin 5 from that code above), my problem is associated with the CCP1CONN register explanation on p129 of the datasheet...
http://ww1.microchip.com/downloads/en/DeviceDoc/41262E.pdf
...it's not clear to me how to actually select P1C (PIN 7) as the pin for the HPWM stream to output on - Is it even possible to have the PWM stream come out of P1C in single output?
Any help greatfully received!