PDA

View Full Version : Code programming error at 0000



goldscott
- 18th June 2005, 01:04
I've been trying to program the 16f84a with the epic plus and the zif adapter.
i'm using a 19.3V DC power supply with plenty of current.
I have a previously programmed chip that somebody gave me, and a blank chip as well. when i "blank check" the programmed chip, EPICwin says it's blank.
i get the "Code programming error at 0000" error when i try to program the blank one.

the only problems i can think of is that i'm using a 25 to 9 pin cable, and then and adapter from 9 to 25 because i don't have a male to female 25 cable.

also, there are 3 pairs of jumper pins on the zif, the bottom 2 are jumped, 8-18 pin, exactly how the zif adapter came in the mail.

i've tried programming the chips on the epic board without using the zif, but i get the same results...

any suggestions or help?

Darrel Taylor
- 18th June 2005, 02:12
The EPIC plus uses the parallel port (printer), and must have a 25-pin cable.

9-pin cables/adapters can only be used on serial (RS-232) ports.

You can purchase the proper cable from melabs for about 10 bucks.

http://www.melabs.com/products/accessry.htm#25

best regards,
Darrel

yasser
- 23rd August 2005, 07:53
i have a problem to erase 16F877A.I programmed the pic and worked well but i wanted to change the code.when i wanted to programe 16F877a again with EPIC software this message show :" this is not blank " and when i chose erase from menu, show "erase completely" but when i check the pic is blank or not , show " this is not blank at 0000=248B"
and i couldent program again.
pls help me.

" my english language isnt very good.excuse me if i have some mistakes in the sentences."

JDM160
- 12th March 2006, 22:22
I am programming 100+ 16F767 and about 10% I am getting the Code programming error at 0000. Sometimes if I try several times, it will finally program successfully. Some of the pics just won't take the program and repeatedly give me this error. Does anyone know what the problem might be?

sayzer
- 13th March 2006, 13:24
Use an external power supply for the PIC.

By external I mean a separate power supply just for the PIC. Ex: 7805.

JDM160
- 14th March 2006, 06:42
Use an external power supply for the PIC.

By external I mean a separate power supply just for the PIC. Ex: 7805.


Thank you for your input. I am a little confused though. I am programming with the serial programmer using the latest software. The pic is not "in circuit," it is in the zif socket. The programmer is being powered by the 15V power supply that was provided with the programmer.

Melanie
- 14th March 2006, 08:42
I don't use an EPIC so don't ask me questions about it...

However, I have on several occasions come across batches of PICs (these are factory new) that NEED to be erased prior to programming. Some PICs will program straight out of the tube, some will fail. But if an ERASE operation is performed first, they all program first time.

By default for the last year, I've preset 'Erase before Programming' and I've not had any such programming errors since.

btw... a forum SEARCH on "error 0000" brings up this topic which has been discussed several times. Perhaps there is something in an old thread which may help.

sayzer
- 14th March 2006, 08:51
IF you decide to bend the power pins of the PIC up in the air and apply the voltage as what I call “in space” with the help of some crocodiles, it may work.

You must make sure that you have the ground pin of PIC common with the ground of PCB board (programmer).

Whatever you do just make sure that you power the pic with a separate power supply and have the ground common.

JDM160
- 15th March 2006, 04:56
Thanks again guys...

The pics are all new and I do blank check before programming. I added the 1uF capacitor to the power pins (as per information on melabs.com) but it made no difference at all. This fix was for another problem, but customer support recommended that I gave it a try.

Erasing the chips first has no effect. The same chip will fail to program 10 times and then all of a sudden, it will work fine.. Very strange behavior. It seems to be related to the Pics though, not the programmer. I say that because some chips are just troublesome, and others (most) work on the first shot.

Does anyone know of a good low-cost commercial programmer that can program all of the Pics?

mister_e
- 15th March 2006, 16:09
EPIC is certainely one of the best lowest-cost programmer anyways.

I use Microchip PICSTART Plus and BK Precision 844a (relabeled of an Elnec)
Microchip ICD-2 seems to be another great one.

milestag
- 15th March 2006, 16:26
I just sent an email to MeLabs yesterday to see if they know a solution.

I'm having a problem programming about 10% of my brand new 18F2525 chips. Very annoying to have 10% "bad" chips at $6.11 each!!

Some fail at 0000 and some make it almost to the end before failing. Like I said, 90% program with no problems. All using the same hex file and settings.

Erasing is no help. Also using latest software with MeLabs Serial Programmer.

I just want to know, is it the programmer or Microchip quality control??

mister_e
- 15th March 2006, 16:32
Well i didn't had any bad chip as now. And it's not because i didn't wanted ;)

I'd some bad experience, but as Melanie said, i set Erase before programming... and as now (finger crossed) i never had any bad experience. MAYBE a programmer problem. I don't have the EPIC so can't really be sure of it.

Is this the serial or the parrallel model?

If it's the parrallel, I saw kinda patch about XP printer polling blah blah...

Same problem on another Computer?

milestag
- 16th March 2006, 05:06
Jeff Schmoyer at MeLabs returned my email. He pointed me to a capacitor mod for the serial programmer:

http://melabs.com/support/cap_mod.htm

This solved my problems.

Kudos to MeLabs for the prompt reply!

JDM160
- 17th March 2006, 06:35
I added the 1uF capacitor to the power pins (as per information on melabs.com) but it made no difference at all.

Hmmm, I hate when I feel like I'm talking to myself. LOL.

Anyway, glad it worked for you, it didn't work for me...

Melanie
- 17th March 2006, 09:58
> Does anyone know of a good low-cost commercial programmer that can program all of the Pics?

Unfortunately your use of the two words "low cost" excludes giving any sensible answers... all the programmers I can recommend omit that from their feature list.

However, given the fact that you have some success with your PICs leads me to suspect that there is something 'marginal' in your setup. I don't know your programmer at all, but I would suggest in the first instance you put a scope on your PSU and ensure you have a constant and steady DC supply. Check the programming pin MCLR on the PIC... you should have some 13.5v on it (unless you're using Low Voltage Programming) - if this varies or drops it will cause the PIC not to program correctly. Plug-in a PIC, hit 'program' and make with the multimeter or scope...

milestag
- 17th March 2006, 13:53
JDM,

Did you ever replace that cable? M to F 25-pin, straight thru (not null-modem cable).

I would fix that FIRST. Even though the "hillbilly cable rig" works on some/most chips, the longer cable run might be a problem for others. Additional noise, voltage drop, etc.

Demon
- 8th August 2006, 04:52
I've just started getting this error too. I am using the MeLabs serial programmer on a 16F628A in circuit (which has a 0.1uF cap).

Odd, I can program a 18F2550 on the same circuit over and over again without any problem.

I have Erase Before Programming but I keep getting the same 0000 error. I must have tried at least 20 times just now.

I'll try soldering PGC/PGD real close to the PIC and see if the length of the leads (along with trace length) is at fault.

Robert
:shrug:

Demon
- 8th August 2006, 05:11
I've soldered PGC/PGD right at the 16F628A in-circuit with the same 0000 error.

I'm also using an external power supply for the circuit, the same supply I used when this was on breadboard.

I don't think this is a configuration problem either 'cause I made sure to breadboard this circuit beforehand. This was the 1st time I upgraded a 16F628 to a 16F628A and I wanted to be sure of the configuration settings.

Frustrating, and I'm sure it's not hard to fix this either...

Robert
:(

Demon
- 8th August 2006, 05:44
> ... Check the programming pin MCLR on the PIC... you should have some 13.5v on it (unless you're using Low Voltage Programming) - if this varies or drops it will cause the PIC not to program correctly. Plug-in a PIC, hit 'program' and make with the multimeter or scope...


I couldn't check MCLR so I tricked the PIC. I did READ first then PROGRAM. I got the error again, but this time it programmed after I clicked YES. I didn't really care what it programmed, as long as it went through the routine. I had something like 12.35V on MCLR according to my multimeter.

I've even tried to Erase manually first before Program, same error.

I've always used my MeLabs serial programmer, bought it new and never had problems before. Is it possibly fading? I wouldn't mind upgrading to the USB version, but I don't want to spend the money yet if that's not the problem.

I never a problem for many many PICS; 16F628, 16F877, 18F4550, 18F2550 and 16F628A, all in-circuit too. This is the 1st PIC to give me this error.

I'm not using low voltage programming either.

Robert
:(

Demon
- 8th August 2006, 06:01
After reading the HELP from the programmer, I checked PGM and it does have 0V.

I also checked the configuration and see nothing wrong:

__config _BODEN_ON & _CP_OFF & _DATA_CP_OFF & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _MCLRE_ON & _HS_OSC

This excerpt of the Help file is exactly what is happening to me:

The device programmed once, but subsequent attempts return a Code Programming Error. - The configuration setting "Low-Voltage Programming" is Enabled. This leaves the device sensitive to a signal or high condition on the low-voltage programming pin (see the Microchip datasheet). To recover from this condition, you must tie the low-voltage programming pin to ground and reprogram the device. Or the device may need to be erased before reprogramming.

Oh poop...

Robert
:(

Demon
- 8th August 2006, 06:27
I had been using a 9V wall adapter so I upped to 12V and 15V and still had the same error.

They seemed to top at 12.9V on MCLR.

Robert
:(

Demon
- 8th August 2006, 14:26
I tried a 10K pull-up on MCLR as stated in the programmer Help file instead of a 4K7 as in the PBP manual, same error.

I added 4K7 pull-up on PGD as described on p. 111 Figure 14-18 of the 16F628A datasheet, same error. I wasn't sure where the pull-up was supposed to go for PGC (what is 'normal connections'?) I tried a 4K7 pull-up on PGC with no difference anyways.

Robert
:(

Demon
- 8th August 2006, 14:52
I've recently downloaded the latest firmware for the MeLabs serial programmer. Now I always get a splash screen to see MeLabs.com for licensing, could this be related with my problem?

Robert
:(

Bruce
- 8th August 2006, 15:07
The splash screen is on all the download versions of MeLabs programmer software. It shouldn't affect operation.

Can you program the device you're having problems with in the programmer zif socket?

mister_e
- 8th August 2006, 15:57
how about the PGM pin... should be loaded to GND. 1-10k resistor works. ok i saw you already done
how about if you disconnect what is on PGD, PGC,PGM pins then, use a 100-1K resistor to gnd on PGM?

Try to place your Programmer far of your PIC...

Demon
- 8th August 2006, 19:06
The splash screen is on all the download versions of MeLabs programmer software. It shouldn't affect operation.

Good, one hting less to worry about. I'm so confused I can't even remember how I got rid of that last time I upgraded.



Can you program the device you're having problems with in the programmer zif socket?

I would have, but this is SOIC.



how about if you disconnect what is on PGD, PGC,PGM pins then, use a 100-1K resistor to gnd on PGM?

I will try straight to 0V, I think that is what I read last night in the Help, gotta check up on that.



Try to place your Programmer far of your PIC

I think you meant close, and I did, no difference.


Robert
:(

mister_e
- 8th August 2006, 19:55
No i really meant far... not a mile away.. few inches 6-12 inches. i had some issue like that before on breadboard when a programmer was to close of the PIC... kind of interference or sort of...

Demon
- 8th August 2006, 20:33
At first it was about 6-12 inches of combined cables and traces, now 4-6 inches, no difference.

So I got another unit and soldered thru-hole components directly onto the legs and everything worked fine for several programming cycles. At least I know the programmer can indeed program a 16F628A SOIC in-circuit (not that it should make any difference from a PDIP unit).

I will replace the oscillator and capacitors on the circuit. If that doesn't make a difference I will solder this 'working' unit onto the circuit.

Robert
:)

Demon
- 8th August 2006, 21:24
By the time I removed the 'working' 16F628A from the temporary circuit I totally forgot about the plan to replace the oscillator first.

I removed the unworking 16F628A from the circuit and put in the tested unit and everything fired up as expected. I was able to reprogram it several times too, so no idea what was the exact cause of the problem.

Robert
:)

shahidali55
- 12th August 2006, 16:26
I'm having the same problem.
The IC (16F628A) sometimes refuses to get programmed...
Then after 2 to 3 tries it kicks back to life...
I tried fixing this problem, but now i've got so used to the "BUG" that i don't really mind it...

prizepony
- 27th February 2008, 00:44
I'm having the same issue programming a 16F877 PIC chip.
I'm using MicroCode Studio and EPIC Parallel Port Programmer.

I tried two different programmers and yet both the same issue.

Has there been any new info on this topic?

tenaja
- 27th February 2008, 00:49
Use a bootloader and never see the error again.

prizepony
- 27th February 2008, 03:19
Well, I've yet to have a successful program so I don't image programming a bootloader would be successful also.

Either way, what are some recommended bootloaders?

srspinho
- 27th February 2008, 14:07
Hi friend,

I´m using the MicroCode Studio circuit which is shown in their Bootloader´s help file, and it works perfect with my really old notebook.

regards

Sérgio

mvs_sarma
- 27th February 2008, 17:26
I'm having the same issue programming a 16F877 PIC chip.
I'm using MicroCode Studio and EPIC Parallel Port Programmer.

I tried two different programmers and yet both the same issue.

Has there been any new info on this topic?
the length of cable between the DB25 connector and the EPIC programmer matters. while the 7407 (better 74HC07) chip could be powered from the programmer board, it is preferable to shift it in to the body of DB25 connector. Thereafter take only those wires that are needed by the programmer. Thereafter the length of the few wires can also be optimized for proper functioning of the programmer.

Another observation- of course not related to but applicable to PICs as well, is to use a small resistor in series to the clock signal and have a 0.001(1KpF) capacitor to ground (or pin5)at the PIC socket.

Third issue is to have a 0.1uF capacitor across Vdd and Vss across the PIC socket.
With above mods, the programming becomes consistent & easier.

Ed Kribbs
- 29th October 2009, 15:37
I had the same problem using 16F688 and 16F876. The solution is to modify the memory burning time factor, "ProgTime".
go to:
http://www.melabs.com/support/epicini.htm
Read the general directions.
The directions say to modify epic.ini
I could not find any file by that name, but I did find a whole lot of files, one for each type of PIC chip in: C:\Program Files\melabs Programmer
named:
PIC16F84.EPC
PIC16F84A.EPC
PIC16F688.EPC .....
Choose the file corresponding to the particular type of PIC you are using. Edit the file using wordpad or whatever editor you like.
Modify the parameter ProgTime to a higher value. The directions in the URL named above say not to raise the time above 20000. I set mine to 10000 and that solved my "code programming error" problems. Trouble is, you have to edit every file for whatever PICs you are using. Pain in the ***, but it solves the problem.

Cheers and 73's
Ed Kribbs :D

miragabe
- 4th May 2012, 22:23
Hi there,
I'm a new user to the EPIC WIN software and previously thought I was successful in uploading a number of different programs from my windows XP computer to a PIC18F458 MCU using the software obtained from melab. However, after repeated use, I now encounter the error message: "code programming error at 0000", which, on checking the readme text information, refers to power supply issues to an actual programmer, or a low voltage pin not grounded. I grounded RB5 via a 100k resistor, unchecked the enable low voltage programming option, and the power supply to the board sits at the required 16VDc, but I notice the voltage on the MCLR pin is down to around 5V. I know this is the programming pin. What do you think could perhaps be causing this? Another thing, do you think modifying epic.ini as you have done, would assist my problem?

shahidali55
- 7th May 2012, 17:09
Hi miragabe,

In most programmers the MCLR pin will go to about 13 volts only during programming (for just a few seconds after clicking the program button). Are you able to program any other PIC or is it just a particular PIC18F458 giving trouble?

miragabe
- 8th May 2012, 00:10
Hi Shahidali55,
Thanks for your response. Been on this project now for quite some time, and needless to say it has been very frustrating. This is the first PIC I've been given to work with, to get a noritake VFD to come on. When I downloaded the EPIC WIN program and set the board and port voltages to 16V and 5V respectively, the programs uploaded, according to the run response; now it doesnt. The program bar tells me it erases and blank checks, but this error pops up on programming. Is there some kind of limit to the number of times the chip can be programmed? I would think not. I mean like I even rewired everything from scratch according to the program, powered up and still nada.
What do you make of that?
Dave.

miragabe
- 8th May 2012, 00:18
...Another thing, I monitored the MCLR pin while the blankcheck was taking place during programming, and it never got up to the 13 V expected; it stayed at about 5V.

Demon
- 9th May 2012, 02:38
I doubt you have hit a limit count, never heard of one for 16F or 18F PICs. You can always check the datasheet for your particular model. If there is a limit, it will be mentionned.

Totally wild guess, could this have anything to do with a write-protected chip? The first write went well and any further write is refused?

Robert

shahidali55
- 9th May 2012, 05:16
Hi Dave,

According to the datasheet, the number of erase/write cycles this chip can take is 100,000. So this cannot be as to why you are seeing the error.
Can you check if the MCLR pin goes to about 13v on clicking the program button without the chip in the programmer ?

There are three common reasons as to why you could get the error:
1) Damaged serial cable
2) Damaged PIC
3) The PIC was programmed the first time selecting Internal Oscillator with MCLR pin function disable.

The third one may be the one causing the trouble for you.

Also, write protecting a chip will not prevent it from erasing and re-writing.
Just to eliminate any programmer faults, you can try with a new (never programmed before) chip.
If this works, then your programmer does not provide VPP before VDD during programming.