be80be
Well-Known Member
I cant get the naming right for some reason
it give me this error
Code:
#include <xc.h>
#define _XTAL_FREQ 800000 //Used by the compiler for the delay_ms(x) macro
#define __delay_ms(x) _delay((unsigned long)((x)*(_XTAL_FREQ/4000.0)))
void main(void) {
OSCCON = 0b01110110; //8mhz clock speed based on internal oscillator block
ADCON1 = 0b01111111;
TRISBbits.RB0 = 0; //using pin as output
LATBbits.LATB0 =1;
__delay_ms(1000) //
LATBbits.LATB0 = LATBbits.LATB0 ^ 1; //toggle the LED
__delay_ms(1000); //reassign since it has been decremented to 0 from the delay loop
}
Code:
"C:\Program Files\Microchip\xc8\v1.42\bin\xc8.exe" --pass1 --chip=18F1220 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/newxc32_newfile.p1 newxc32_newfile.c
newxc32_newfile.c:59: error: (195) expression syntax
make[2]: *** [build/default/production/newxc32_newfile.p1] Error 1
make[1]: *** [.build-conf] Error 2
(908) exit status = 1
nbproject/Makefile-default.mk:106: recipe for target 'build/default/production/newxc32_newfile.p1' failed
make[2]: Leaving directory 'C:/Users/USER/Desktop/test1220/tes1220.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/USER/Desktop/test1220/tes1220.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 784ms)
Last edited: