I am trying to program a very simple hello world program to blink a light onto a PIC18LF14k22 with a Pickit 3. It builds fine, and then I program it and I get:
PICkit 3 detected
Connecting to PICkit 3...
Running self test...
Self test completed
Firmware Suite Version...... 01.26.05
Firmware type......................PIC18F
PICkit 3 Connected.
Target Detected
Device ID Revision = 00000003
Programming...
Programming/Verify complete
However, I am not able to 'Release from Reset'
And the program does not function on the chip.
This is the code:
#include <p18lf14k22.h>
#include <delays.h>
#pragma config FOSC = IRC
#pragma config WDTEN = OFF
#define LEDPin LATCbits.LATC6 //Define LEDPin as PORT D Pin 1
#define LEDTris TRISCbits.TRISC6 //Define LEDTris as TRISD Pin 1
void main ()
{
LEDTris = 0;//Set LED Pin data direction to OUTPUT
LEDPin = 1;//Set LED Pin
while(1)
{
LEDPin = ~LEDPin;//Toggle LED Pin
Delay10KTCYx(25);//Delay 250K cycles (1 second at 1MHz since each instruction takes 4 cycles)
}
}
PICkit 3 detected
Connecting to PICkit 3...
Running self test...
Self test completed
Firmware Suite Version...... 01.26.05
Firmware type......................PIC18F
PICkit 3 Connected.
Target Detected
Device ID Revision = 00000003
Programming...
Programming/Verify complete
However, I am not able to 'Release from Reset'
And the program does not function on the chip.
This is the code:
#include <p18lf14k22.h>
#include <delays.h>
#pragma config FOSC = IRC
#pragma config WDTEN = OFF
#define LEDPin LATCbits.LATC6 //Define LEDPin as PORT D Pin 1
#define LEDTris TRISCbits.TRISC6 //Define LEDTris as TRISD Pin 1
void main ()
{
LEDTris = 0;//Set LED Pin data direction to OUTPUT
LEDPin = 1;//Set LED Pin
while(1)
{
LEDPin = ~LEDPin;//Toggle LED Pin
Delay10KTCYx(25);//Delay 250K cycles (1 second at 1MHz since each instruction takes 4 cycles)
}
}
