HELP- Problems loading a program with MPLAB ICD 3.
Hello everybody and thanks.
I just bought the MPLAB ICD3 for debugging programs in a PIC18f452.My first program is very simple, not much mystery:
#pragma config WDT = OFF
void main (void)
/* Make all bits on the Port B (LEDs) output bits.
* If bit is cleared, then the bit is an output bit.
TRISB = 0;
/* Reset the LEDs */
PORTB = 0;
/* Light the LEDs */
PORTB = 0x5A;
Build all and perfect. I want to load the program to the PIC and I conect MPLAB ICD 3 and I get a message like:
-VOLTAGE CAUTION- Check that the device selected in MPLAB IDE (PIC18F452) is the same one that is phisically attached to the debug tool. Selecting a 5v device when a 3.3V device is connected can resul in damage to the device when debugger checks the device ID
And ICD3Err0040: The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding.
I have reviewed the circuit thousands of times. Pins circuit debug MPLAB ICD 3 are well connected, the 5 (6 is LVP), target VDD=5V direct to the PIC, VSS = 0, and 20MHz clock / MCLR is connected to VDD to 4K7 ohms. The configuration bit is set in code.
I'm desperate because I do not understand is happening
Sorry for my english