PDA

View Full Version : help with HPWM on 16f684



kimvellore
- 23rd May 2006, 06:25
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

Melanie
- 23rd May 2006, 07:02
Are you using PICBasicPro from MeLabs or someone elses compiler?

I ask this because...

Declare CCP1_PIN PORTC.2

DECLARE is not a PICBasicPro statement. Actually neither is XTAL or ALL_DIGITAL = TRUE, so methinks you're on the wrong forum...

kimvellore
- 23rd May 2006, 08:05
I am using Proton IDE. from Crownhill and thought it is the same as picBasicPro, I guess it is another fourm.

Thanks
Kim