This is what i get when i use pickit2 as a debugger and try to program it
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready
Programming Target (11/3/2009 5:13:31 AM)
PIC16F877A found (Rev 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x77)
Programming Program Memory (0x118 - 0x7FF)
Verifying Program Memory (0x0 - 0x77)
Verifying Program Memory (0x118 - 0x7FF)
Programming Debug Executive (0x-1F00 - 0x1FFF)
Verifying Debug Executive (0x1F00 - 0x1FFF)
Programming Debug Vector
Verifying Debug Vector
Programming Configuration Memory
Verifying Configuration Memory
PK2Error0028: Unable to enter debug mode
PICkit 2 Ready
when i use it as a programmer, it programs the controller perfectly
Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready
Programming Target (11/3/2009 5:13:55 AM)
PIC16F877A found (Rev 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x77)
Programming Program Memory (0x118 - 0x7FF)
Verifying Program Memory (0x0 - 0x77)
Verifying Program Memory (0x118 - 0x7FF)
Programming Configuration Memory
Verifying Configuration Memory
PICkit 2 Ready
PICKIT2 as a programmer works fine but when i try it as a debugger, its giving me error.
I have attached the settings for PICKIT2 as well.
kindly check and suggest some possible solution and the ground pins are properly connected. i just checked it.
The Pickit2 and/or ICD2 do not need external power to debug and so I think you may have damaged it. It does however need the ground connected. Have you checked that there isn't a break in the ground line?
You could also try disconnecting the power from the board to the pickit2 and let MPLAB believe it is powering the board even though it isn't. You should then be able to debug your project. If you can't I would suspect the debugger. What error message is it coming up with?
If you are still having problems can you post the complete output from the assembler/compiler.
Mike.