I have been trying to get HPWM to work for a while on the 16F684 and wiith no luck. I have browsed through this fourm and still cannot find my answers.
Here is my program:
Device 16F684
Config CP_OFF , CPD_OFF , BOD_OFF , PWRTE_ON , WDT_OFF , INTRC_OSC_NOCLKOUT , MCLRE_OFF , FCMEN_OFF , IESO_OFF
XTAL = 4
ALL_DIGITAL = TRUE
Declare CCP1_PIN PORTC.2
CMCON0 = %00000111
CCP1CON = %00000000
TRISA = %00001000
TRISC = %00000000
MainProgram:
HPWM 1,205,1000
GoTo MainProgram
I am checking portc.2 for PWM. I am sure I am missing something here I have tried all combinations of CCP port pins and HPWM 1...4. And Yes I modified the .inc file so it can compile.
I appreciate any help.
Thanks
Kim
Bookmarks