Hi,
I got PIC18f4520, Pickit3, and MPLAB X IDE + XC8 Compiler installed.
I'm trying to debug the program but can't get the PIC into debug mode.
That is how I configured the PIC in my empty program:
#include <stdio.h>
#include <stdlib.h>
#include <p18f4520.h>
#include <xc.h>
// CONFIG2H
#pragma config WDT = OFF // Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
#pragma config WDTPS = 32768 // Watchdog Timer Postscale Select bits (1:32768)
// CONFIG4L
#pragma config LVP = OFF // Single-Supply ICSP Enable bit (Single-Supply ICSP disabled)
/*
*
*/
int main(int argc, char** argv)
{
return (EXIT_SUCCESS);
}
But, it ends with:
Programming/Verify complete
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding.
Could you please share how to enable debug mode?
Thanks.