Problemas al cargar un programa con PIC18F452

Hola a todos! Antes de nada agradeceros a todos el servicio divulgativo que haceis, es formidable.
Me estoy iniciando en el mundo Pic, en concreto con el P18F452 (clock de 20MHz). Estoy programando en C18 y usando el MPLAB ICD3 para debuggear este programa, :

#include "p18f452.h"
#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;

while (1)
;
}

Se compila sin problemas con el "Build all", y a la hora de debuggear conecto el ICD3 y primero se queja enviandome un mensaje como:
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

Cuando en efecto estoy trabajando con 5V y con el propio PIC18F452. Evidentemente no me carga el programa, renuevo el debugueo y al final me dice lo siguiente:

Running...
ICD3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.


Y me habla de la configuración de los bits, que es uno de los menus MPLAB configure>configuration bit, aunque ya está seleccionado que lo estoy haciendo desde el código.

Entonces chic@s, que opinais, he revisado el circuito miles de veces ademas de que los pines del debuggeador esten bien conectados, AYUDA PLEASE!
MUCHAS GRACIAS A TODOS.
 
Atrás
Arriba