Jan-Erik , Thank you for your reply. > Program first, then debug. > You can not debug if there is no program in the processor to debug. Sure.I first programmed it but from the Debuggger menu of MPLAB IDE and ch= oice=20 Program. That was my experience,when using PICkit3 and to debug PIC18F44K20, I had = to program it=20 , first but not from the Programmer menu but from the Debugger menu. If I programmed PIC18F44K20 from the Programmer menu, I was unable to debug= it. But when I programmed it from the Debugger menu ( choice Program)I was able= to debug it. The same I try to do now when I use ICD3 and header with PIC16F648A-ICD. But NO success yet L. >=20 >=20 > jana1972@centrum.cz wrote 2011-11-08 08:25: > > Hi Isaac, > > Thank you for your reply. > > So I used 1k resistor to ground RB4,also use 5V( direct power from ICD3= debugger menu in > > MPLAB) but still the same.I can not debug this very short program ( fo= r programming I use > > Programmer choice in the Debugger menu). > > Or must I programm it first via a programmer from Programmer menu ( not= Debugger menu) > > in MPLAB IDE? >=20 >=20 > Program first, then debug. > You can not debug if there is no program in the processor to debug. >=20 > > > > #include "P16F628A.INC" ; Include header file > > __CONFIG _CP_OFF& _LVP_OFF& _BOREN_OFF& _MCLRE_ON& _WDT_OFF > > &_PWRTE_ON& _INTOSC_OSC_NOCLKOUT > > ;__config _XT_OSC&_LVP_OFF& _WDT_ON& _PWRTE_ON& _BODEN_OFF > > > > org 0 > > NOP > > movlw 0x07 > > movwf CMCON > > bsf STATUS,RP0 ;bank1 > > BCF TRISA,2 > > bcf STATUS,RP0 ;bank0 > > BSF PORTA,2 > > END > > > > Do you have any other idea? > > Thanks > > ? > > > > > > > >> Em 7/11/2011 17:05, jana1972@centrum.cz escreveu: > >>> Hi Jim, > >>> Thanks a lot for your time and help( my thanks to others who replied = too) > >>> > >>> Unfortunatelly, I can NOT still use PIC16F648A - ICD > >>> for the debugging of PIC16F628A. > >>> > >>> I can program code into PIC16F628A( using PICkit3) and it works as it= should. > >>> > >>> But I can not > >>> program code ( using debugger ICD3 ) into PIC16F648A - ICD header and= debug the code > >>> with ICD3. > >>> > >>> I receive the error > >>> ICD3Err0040: The target device is not ready for debugging. > >>> Please check your configuration bit settings and program > >>> the device before proceeding. > >>> > >>> Stepping target failed > >> > >> > >> > From the MPLAB ICD2 help, section "Limitations": > >> > >> " > >> PIC16F648A Family Limitations > >> PIC16F648A, PIC16F628A, PIC16F627A > >> Headers are required for debug when using these devices. See the "Debu= g > >> Header Specification" for details. Header limitations are as follows: > >> > >> General Debug Limitations > >> General Programming Limitations > >> You cannot single step through an interrupt > >> Due to hardware restrictions the debugger/emulator cannot jump to the > >> interrupt vector memory location in single step or animate mode. > >> > >> Program Memory standard flash > >> Program memory not enhanced flash. You cannot program in low voltage > >> mode (Vdd<4.5V.) See device programming specification for more informa= tion. > >> > >> RCIF is cleared when RCREG is interrogated by software, except when > >> Freeze on Halt is enabled. > >> RBIF is cleared when PORT is interrogated by software. > >> When driving a clock oscillator of more than 4 MHz into OSC1 in HS > >> oscillator mode, the device will not go into debug mode. Therefore > >> crystal caps will be required. The 32 kHz to 4 MHz range does not have > >> this issue. > >> Above 16MHz, in EC mode, a Reset executes the first few instructions > >> instead of only 1 instruction. The workaround is to add 3 NOPs at the > >> reset vector. > >> Freeze on Halt Limitations > >> This device family requires a header for debug. Header limitations are > >> as follows: > >> > >> Timer0 will not freeze using the internal clock. > >> Timer0 will not freeze using external clock. > >> CMOUTx Pins do not freeze, status bits and interrupt flags do freeze. > >> " > >> > >> > >> Most important in my opinion: > >> > >> - You cannot program in low voltage mode (Vdd<4.5V.) > >> - When driving a clock oscillator of more than 4 MHz into OSC1 in HS > >> oscillator mode, the device will not go into debug mode. > >> > >> > From another section in the help: > >> > >> " > >> If your code makes use of port pins that correspond to clock and data > >> pins* in programming mode, you may not be able to reprogram your devic= e. > >> When Internal MCLR is used with the debugger/emulator for programming, > >> both Vpp and Vdd are powered together, and then Vpp is pulled high to > >> Vihh to enter programming mode. This means that your code will be > >> running before Vpp goes to Vihh. If that code makes use of port pins > >> that correspond to clock and data pins in programming mode, there is a > >> chance their values may not be 0, as necessary to enter programming > >> mode. Therefore, the device could not be reprogrammed. > >> " > >> > >> > >> Isaac > >> > >> -- > >> 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 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .