lloydi12345
Member level 4
I've just started playing around with MPLAB C18 but I can't seem to make it work. I'm using this code.
I'm encountering this error. I might have missed somethin'.
Regards,
lloyd
Code:
#include <p18f4620.h>
#include <delays.h>
#pragma config OSC = XT
#pragma config WDT = OFF
#define LEDpin LATDbits.LATD1
#define LEDTris TRISDbits.TRISD1
void main()
{
LEDTris = 0;
LEDPin = 1;
while(1){
LEDPin = ~LEDPin;
Delay10KTCYx(25);
}
I'm encountering this error. I might have missed somethin'.
Code:
----------------------------------------------------------------------
Debug build of project `C:\Documents and Settings\Administrator\Desktop\C18\tutorial4.mcp' started.
Language tool versions: MPASMWIN.exe v5.32, mplink.exe v4.32, mcc18.exe v3.32
Preprocessor symbol `__DEBUG' is defined.
Tue Mar 27 15:26:46 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4620 /i"C:\MCC18\h" "main.c" -fo="main.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\Documents and Settings\Administrator\Desktop\C18\main.c:17:Error: syntax error
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\Documents and Settings\Administrator\Desktop\C18\tutorial4.mcp' failed.
Language tool versions: MPASMWIN.exe v5.32, mplink.exe v4.32, mcc18.exe v3.32
Preprocessor symbol `__DEBUG' is defined.
Tue Mar 27 15:26:46 2012
----------------------------------------------------------------------
BUILD FAILED
Regards,
lloyd
Last edited: