Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC16F627A will not program?

Status
Not open for further replies.

i_build_stuff

New Member
Sorry if this has been discussed before, but I'm still fairly new to the PIC series, so here goes:

I'm programming PICs using a PICkit2 and pk2cmd (since I'm using Linux, and piklab doesn't seem to support my firmware version yet).

I have no problems at all programming the 16F887 or the 18F2450, but for some reason the 16F627A will not take a program. I've tried with 5 different chips, each time completely re-doing the connections to the chip, but the verify stage always fails on address zero. It never fails to identify, read, or blank-check though.

Also, I think I remember being completely unable to program this chip using a parallel port programmer with WinPIC800 a few years ago, and that setup also had no problems with any other PIC that I tried.

Maybe there's something about this part that I don't know, like a requirement that's different from the rest?
 
If the chip has been programmed to use the internal oscillator you can have problems reprogramming it, depending on the programmer type and connections. If the oscillator starts running, it means you can't access program mode.
 
Hmmm... I've been using the internal oscillators every time lately, since I'm working on a GPIO device (a little box that plugs into a serial port, and provides digital and analog I/O, plus capture and waveform generation functions).

Is this the reason why the programmer gives an option to pull up the VPP pin first, and then VDD?
 
Hmmm... I've been using the internal oscillators every time lately, since I'm working on a GPIO device (a little box that plugs into a serial port, and provides digital and analog I/O, plus capture and waveform generation functions).

Is this the reason why the programmer gives an option to pull up the VPP pin first, and then VDD?

One of the reasons, how are you programming the chip, and how is it powered?.
 
I'm programming using a PICkit2 and pk2cmd, with this line:

pk2cmd -P -I -M -FDIO_16F627A.hex

I've tried it with and without the -X option (VPP first), and with slower programming speeds, with the same result.

During programming, I'm disconnecting VCC from the rest of the circuit and letting the PK2 power the device.

It will be really great if I can get these things to program, mainly so I don't run into this same surprise again with another part. I'm about to order a tube of 16F887, though, just to be completely sure that I'll have something to finish my project with...
 
The VPP option should program the chip if it is powered up. I would try leaving the 16F627A already powered (from your PCB) and then try to program it. That's how I do all my ICSP these days, in fact I put an extra plug on my programmer to provide +9v DC so I can use it to power the target board(s) specifically for ICSP.
 
I'm programming using a PICkit2 and pk2cmd, with this line:

pk2cmd -P -I -M -FDIO_16F627A.hex

I've tried it with and without the -X option (VPP first), and with slower programming speeds, with the same result.

During programming, I'm disconnecting VCC from the rest of the circuit and letting the PK2 power the device.

It will be really great if I can get these things to program, mainly so I don't run into this same surprise again with another part. I'm about to order a tube of 16F887, though, just to be completely sure that I'll have something to finish my project with...
Enable Vpp first
the erase the chip and try to program.
however, the connections on pins RB6, RB7 and RB3 may have to be disconnected for a while. RB3 not to force the chip to LVP.
Also the connections if used on Osc1 and Osc2 pins.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top