I am using microchip's programmer PICKIT2 to program PIC16F628A but it fails the verification process. And I when blank check the microcontoller, it says it is not blank. Then I read the Program memory and EEPROM and it returns all 0000 instead of 3FFF. I have used the same programmer for PIC16F690 before and it works. Could it be that the microcontroller is dead when I bought it? When I read the manual it says if the Program memory is 0000 it means the microcontroller is code protected but this is a brand new microcontroller I bought from FARNELL. Have anyone experience this before? If you have probably you can shed some light on this issue. Thank you so much in advance.
I have connected the following PINs for Programming
MCLR/VPP
VDD
VSS
ICSPDAT
ICSPCLK
if your using old firmware it won't program 628a's.make sure youv'e got the latest.make sure you have code protection turned off in the config fuses because it can't verify what it can't read
I have downloaded the latest firmware which is 1.21. And the code protection is unchecked in the programmer. I am not sure what you mean by config fuses. I agree that it can not verify what it can't read but can it be programmed?
The PIC PGM pin is used to enable low voltage programming on some PICs. Even though this is not one of the programming lines and is not connected to the programmer, it should be held low during programming. According to the documentation the PGM input should not matter during high voltage programming, but we have seen cases where it does anyway. A 100K ohm resistor to ground is a simple fix in most cases.
Whilst assisting others with this same problem, I have had the question posed
to me, why should the PIC16F628A be different from the PIC16F628 which does program OK and they both use the same process.
Well I believe that one of the major differences between the two processors , which is not well documented, is that the PIC16F628A is a nanoWatt technology device whereas the the PIC16F628 is not. The inputs will be a much higher impedance and it will be easier for noise on RB4 to cause ut to go into LVP programming mode.
In the PIC16F88 which is also a nanoWatt technology , they are a little more specific about pulling down RB3 ( RB3 used instead of RB4 in F88).