I have a programmer and it works fine with PICKit2v2. As you see in the below images, I read my PIC16F877A memory and write to it successfully :
But the problem appears when I want to use my programmer in MPLAB-X-IDE :
As you see above, It say that The programmer could not be started : Failed to program the Device! Why?
Contents of Project loading warning tab :
Warning: Project "FirstProject-FlashingLight" refers to file "C:\Users\Amir Ebrahim\MPLABXProjects\FirstProject-FlashingLight.X/myMain.c" that contains spaces or odd characters in its name or its path.
Some of the files in this Project "FirstProject-FlashingLight" contain spaces or odd characters in their name or their path. This could potentially cause issues during the build process. This is a limitation of GNU Make tool that we use as part of our build process. Removing spaces from all file and folder names included in this project will eliminate this potential issue.
Contents of PIC Kit2 tab :
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.99V)
2015-01-01 20:40:36
PK2Error103: Unexpected device ID: Aborting as requested
PK2Error103: Unexpected device ID: Aborting as requested
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.99V)
2015-01-01 20:40:57
PIC16F877A found (rev = 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x7)
Programming Program Memory (0x7f8 - 0x7ff)
Verifying Program Memory (0x0 - 0x7)
Verifying Program Memory (0x7f8 - 0x7ff)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.99V)
2015-01-01 20:41:19
PIC16F877A found (rev = 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x7)
Programming Program Memory (0x7f8 - 0x7ff)
Verifying Program Memory (0x0 - 0x7)
Verifying Program Memory (0x7f8 - 0x7ff)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.99V)
2015-01-01 20:43:35
PIC16F877A found (rev = 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x7)
Programming Program Memory (0x7f8 - 0x7ff)
Verifying Program Memory (0x0 - 0x7)
Verifying Program Memory (0x7f8 - 0x7ff)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.99V)
2015-01-01 20:56:45
PIC16F877A found (rev = 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x7)
Programming Program Memory (0x7f8 - 0x7ff)
Verifying Program Memory (0x0 - 0x7)
Verifying Program Memory (0x7f8 - 0x7ff)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.99V)
2015-01-01 20:57:42
PIC16F877A found (rev = 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x7)
Programming Program Memory (0x7f8 - 0x7ff)
Verifying Program Memory (0x0 - 0x7)
Verifying Program Memory (0x7f8 - 0x7ff)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
PK2Error0027: Failed verify (Address = 0x7f8 - Expected Value 0x3fff - Value Read 0xbf2)
Note that the project that I tried to program it to my MCU, is an empty project (I mean it has only an empty main() and nothing else- I just did the primary steps to create a project as mentioned in Quick start section of MPLAB X IDE). I also tried another project that was worked fine in another computer with another reader, But I received the same error (So there is no problem with the project.)
I appreciate your time and your consideration.