I enclose an attached schematic of the circuit i am using.
Below is some of the code i am using:
The following are the declarations for the set up:
Device 18F452
XTAl = 20
'CCP Module configuration for HPWM
DECLARE CCP1_Pin PortC.2 'HPWM Set up for Channel1
DECLARE CCP2_Pin PortC.1 'HPWM Set up for Channel2
To output the PWM I am using:
HPWM 2, Alpha, 1250
HPWM 1, Bravo, 1250
Where alpha and bravo are declared variables.
I am also using an AD converter on port A, using the FRC oscillator, could this be interfering with the CCP module?
I look forward to hearing any suggestions
Bookmarks