I had the same problem recently with the same error message. I spent =20 hours troubleshooting the causes listed in the MPLab and Pickit3 =20 manuals. Somehow I had been using the "Program" selection under the =20 "Programmer" pull down rather than the the "Program" selection under =20 the Debugger pulldown. Dave On Oct 22, 2011, at 10:58 AM, jana1972@centrum.cz wrote: > I have this very simple program > > > > #include > CONFIG FOSC =3D INTIO7 > =09 > org 0 > Start: > BSF STATUS,1; select Register Bank 1 > BCF TRISD,0 ; make IO Pin RD0 an output > BCF STATUS,0; back to Register Bank 0 > BSF PORTD,0 ; turn on LED RD0 (DS0) > > END > > I use PICkit3 for programming and also I would like for debugging > > Program works, LED is ON, but I can not debug it. > I receive the error > > PK3Err0040: The target device is not ready for debugging. > Please check your configuration bit settings and program > the device before proceeding > > Can anyone help? > Thanks > > L. > > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .