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.

P16F628A w/ P16PRO programming problem

Status
Not open for further replies.

micro571

New Member
Hi,

I'm programming 16F628A chips using the P16PRO programmer and the picallw software. I programmed a bunch of 16F628s no problem, but the 16F628A's are giving me a headache.

First they wouldn't program at all. Then I figured out that erasing them first will let me program them.

Now I've come to a recurring problem. The chip will program once, the code will be on the chip ... but the chip can no longer be programmed, read or erased. I know the code is on the chip because it tests ok in the circuit.

Any suggestions? This is driving me nuts and I only have 1 unused PIC left. At first I thought I was frying them, but the I realized the code is working. No code protection is set.
 
Ok. Problem identified and solved.

After the chips were programmed, when they were re-inserted into the programmer, they started executing the code before going into program mode. Once the code started executing, it was impossible to get them into program mode.

Solution: The positive side of R4 on the P16PRO40 has 13V on it. I took an aligator clip and a wire and directly applied 13V to PIN4 of the 16F628. That forces it into program mode on power-up before the code can execute. Then the chip can be erased, jumper removed and the chip can be programmed. I was able to resurect 6 chips that I thought I'd fried.


Question to the community:
How do I prevent this in the future? I've read it has something to do with MCLR?
 
micro571 said:
Ok. Problem identified and solved.

After the chips were programmed, when they were re-inserted into the programmer, they started executing the code before going into program mode. Once the code started executing, it was impossible to get them into program mode.

Solution: The positive side of R4 on the P16PRO40 has 13V on it. I took an aligator clip and a wire and directly applied 13V to PIN4 of the 16F628. That forces it into program mode on power-up before the code can execute. Then the chip can be erased, jumper removed and the chip can be programmed. I was able to resurect 6 chips that I thought I'd fried.


Question to the community:
How do I prevent this in the future? I've read it has something to do with MCLR?

I've posted about this several times in the forums, if you're using the internal oscillator you have to switch to programming mode BEFORE the oscillator has time to start running.

The sequence to initiate programming mode goes like this:

1) Turn ON Vdd (5V)
2) Delay a little while
3) Turn ON Vpp (13V)

The problem is the delay between Vdd and Vpp, if the oscillator starts in that time, programming mode can't be reached.

WinPicProg has this value adjustable on the Hardware setup page, it's possible that your software might do the same? - if not contact the author and ask him about the problem, as the program requires an update.

Or you could use WinPicProg, or IC-Prog works fine as well.
 
There are two different methods for placing a device into "high voltage program/verify mode"... One method is "VDD First" and the other method is "VPP First"... The 16F628A requires the "VPP First" method where VPP (+13v) is applied to the MCLR pin first and then VDD (+5v) is applied to the VDD pin...

The "VPP First" method is important if MCLR has been disabled in the configuration fuses on the 16F628A (MCLR pin configured as an input) or if it is configured to use INTOSC... If your programmer hardware and software only support the "VDD First" method then it will turn on VDD (+5v) first and then apply VPP (+13v) to the MCLR pin, but the PIC may already have started running and it may not go into program/verify mode...

Your P16PRO40 programmer uses transistor switching of both the VDD (+5v) and the VPP (+13v) signal lines so I suspect it's capable of both "VPP First" and "VDD First" methods... It's more likely your programmer software doesn't support the "VPP First" method...

Regards, Mike
 
Mike said:
There are two different methods for placing a device into "high voltage program/verify mode"... One method is "VDD First" and the other method is "VPP First"... The 16F628A requires the "VPP First" method where VPP (+13v) is applied to the MCLR pin first and then VDD (+5v) is applied to the VDD pin...

Interesting! - I wasn't aware of that?, although I've just confirmed in on the 628A programming datasheet.

However, it does work perfectly well raising Vdd first as normal, as long as you raise Vpp very quickly afterwards.

I suspect the datasheet was written that way to prevent the problems that occurred when using the internal oscillator on the original 628. I have no reason to imagine the 628A is any different, just that MicroChip have altered the spec in the datasheet.
 
ic prog

I have recently been using ic-prog which is free software that supports your programmer. I had the same issues with the 628A. This fixes it. Here is the download page. http://www.ic-prog.com/ Note that PIC16F88 is not listed. If you select the PIC16F819 device, you will be able to program the F88.
 
Bonny's IC-Prog version 1.05d seems to have 16F88 support (but doesn't support changing the 2nd configuration word yet)...

Regards, Mike
 
Help me with PIC I2C

Hello!
Fisrt I sorry about my English, I'm from Viet Nam. About PIC, I'm just a newbie. So i had a problem when using PIC.
I want to connect two PIC: F877A and F876A via I2C bus. PIC16F877A using in Master-Mode and 876A is Slave. Connect via I2C, fisrt i send one byte from 877A to 876 via I2C, and then when 876A recieved this byte, it send this byte return to 877A. All data display on LCD module.
For control LCD module I had the code, but i have some problem with I2C bus. I'm using CCS for program PIC.
Please help me the code for this problem.
Thank!
Mail to:linhnc308@yahoo.com
 
Status
Not open for further replies.

Latest threads

Back
Top