I'm currently using MPLAB's C18 compiler to build a hex file from a
simple "hello world" program to flash onto the program memory of a
PIC18F2620 in order to see if I can perhaps create a program to toggle
a pin to get started. However, I have been getting the following error
in the pastebin link from the Build window: http://www.yqcomputer.com/
I'm using a PICKIT 2 programmer from Microchip, which is preliminarily
supported in MPLAB v7.62.
Below is my sample code modified from the C18 compiler example files.
I have remembered to include a linker file for building the hex file,
although I couldn't find the output hex file.
/* Compile options: -ml (Large code model) */
#pragma config WDT = OFF
void main (void)
printf ("Hello, world!\n");
I have also ensured that the pins are connected properly, matching
every pin of the programmer header to the corresponding pins on the
microcontroller. Does anyone have any idea where should I start