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.

16F84A programming error using P16PRO40

Status
Not open for further replies.

rizzy

New Member
I'm just starting out with PICs and having some problems with programming. I'm working with the PIC 16F84A and a P16PRO40 programmer under PICALLW v0.14 software. When I attempt to program a chip, I get the following error:

"Program Error:
Program: address=0000 buffer=2805 device=3FFF"

The buffer value is different depending on the HEX file used, but the address and device values are mostly the same (sometimes I get address=0003). Very rarely, it will program, but verify fails and the chip is blank afterwards anyway. Some things I've tried:

- checked hardware connections. Voltages seem fine.
- program voltage is 13V or a bit over.
- cable is only 3ft
- tried with different chips; same result
- tried different program delays

What does the error message mean? I don't know what else to check.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
This is almost always caused by too little voltage on the MCLR pin, the message is normally caused by the PIC not switching to programming mode. What are you using for a PSU?, if it's an unregulated 'wallwart', it may have too much ripple on the supply - so while it may read 13V on MCLR with a meter, the ripple causes it to drop below that.
 

rizzy

New Member
The P16PRO40 has two onboard regulators used to acheive the voltages; a 78L05 (+5V) and a 78L08 (+8V). Input voltage to the regulators is 18.5V and the regs are cascaded to acheive the 13V programming voltage. The voltage is pretty stable.

I could try using a benchtop supply in place of the 78L08 to boost the voltage a bit. What is the max I can put on the MCLR pin for programming? I don't want to damage the chip.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
rizzy said:
The P16PRO40 has two onboard regulators used to acheive the voltages; a 78L05 (+5V) and a 78L08 (+8V). Input voltage to the regulators is 18.5V and the regs are cascaded to acheive the 13V programming voltage. The voltage is pretty stable.

Is the 18.5V regulated?, although I would expect that to be plenty, even if it has high ripple content. I'm fully conversant with the P16PRO40, I use it myself, and even have the circuit available on my website - I fed mine from two 9V batteries in series for years.

I could try using a benchtop supply in place of the 78L08 to boost the voltage a bit. What is the max I can put on the MCLR pin for programming? I don't want to damage the chip.

The spec from MicroChip calls for 12V on MCLR, personally I've always found that a little unreliable, so most programmers aim for 12.5-13V. If you've got 13V on it, without any ripple, there's no point increasing it further.

Has the programmer worked previously?, or have you only just built it?, if so, have you built it from a kit, or from scratch?.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
rizzy said:
The P16PRO40 has two onboard regulators used to acheive the voltages; a 78L05 (+5V) and a 78L08 (+8V). Input voltage to the regulators is 18.5V and the regs are cascaded to acheive the 13V programming voltage. The voltage is pretty stable.

Is the 18.5V regulated?, although I would expect that to be plenty, even if it has high ripple content. I'm fully conversant with the P16PRO40, I use it myself, and even have the circuit available on my website - I fed mine from two 9V batteries in series for years.

I could try using a benchtop supply in place of the 78L08 to boost the voltage a bit. What is the max I can put on the MCLR pin for programming? I don't want to damage the chip.

The spec from MicroChip calls for 12V on MCLR, personally I've always found that a little unreliable, so most programmers aim for 12.5-13V. If you've got 13V on it, without any ripple, there's no point increasing it further.

Has the programmer worked previously?, or have you only just built it?, if so, have you built it from a kit, or from scratch?.
 

rizzy

New Member
The programmer I'm using came as a kit (#96, from www.picallw.com) with a pre-printed PCB and parts, including a sheilded straight through paralell cable. I just got it and have never used it successfully. The 18.5V power supply i'm using is for a laptop computer and completely stable.

The set/clear buttons in the hardware testing menu affect the following pins (as tested with a multimeter):

Data Out: Pin 13 (RB7). Set=5V
Clock: Pin 12 (RB6). Set=5V
VDD: Pin 14 (Vdd). Set=5V
VPP: Pin 4 (MCLR). Set=13V
VPP1: Pin 1 of 40 pin ziff (doesn't affect the 16F84)
Reset: No Connection (is this for the PICALL programmer?)

Ground also has a good connection.

I'm pretty sure this is correct. If not please let me know. All voltages seem to be adequate and stable, and the pins respond as listed above to set/clear commands in the hardware testing menu.

If I don't have any code loaded, I can read, erase, blank check and even program the chip without an error. Could there possibly be an error with the HEX files, or does it just pass because it's reading all zeros? I use the MPASM assembler in MPLAB (v 5.70.40) to compile my code.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
rizzy said:
If I don't have any code loaded, I can read, erase, blank check and even program the chip without an error. Could there possibly be an error with the HEX files, or does it just pass because it's reading all zeros? I use the MPASM assembler in MPLAB (v 5.70.40) to compile my code.

With a blank file you won't have any problems for a couple of reasons, firstly the blank PIC is already all $3FFF, just as your blank file is - so it will verify correctly. Secondly, my software WinPicProg doesn't even attempt to write blank bytes, so with a completely blank file it won't write anything anyway.

Have you access to another computer you could try?, some computer ports just don't work - laptops are particularly poor in this respect.
 

rizzy

New Member
So, I tried my programmer on another computer and it works perfectly. I Don't really understand why it wouldn't work on mine; it's a good desktop and the port works alright for my printer... but whatever, it's working.

Thanks to everyone who helped out.
 

k7michal

New Member
I just bought a new programmer 149Bkit, instead of jerking aroud with that problem (stated above). Besides I needed the USB port for my laptop.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
rizzy said:
So, I tried my programmer on another computer and it works perfectly. I Don't really understand why it wouldn't work on mine; it's a good desktop and the port works alright for my printer... but whatever, it's working.

It's very difficult to know why some don't work (I've never had one to try, all mine work!) - one reason I have heard is that some computers (again, particularly laptops) may have something already accessing the parallel port.
 

muddy

New Member
Hi everyone!

I'm new here and in fact, new to PIC programming. Anyways, I have the exact same problem as rizzy. Could anyone help? :( I've tried making sure the MCLR pin is at least 13V.. doesn't help.

Unfortunately, I can't afford to buy another programmer and I've tried my present Kit 119 from Kitsrus.com on 2 differnent computers already. One running a win 98 and the other running win XP.

I'm hooking two 9V batts together to power the programmer and I'm programming a P16F84A.

Desperately needing help!!! :(
 

Imprezzive

New Member
P16Pro40

I wish I could help, but I got the same problem with kit 96 that I ordered from www.electronickits.com.

I'm using the PICALL program. I keep getting the "address...buffer....device" errors. I guess I'll try to run the programmer on a different computer.

What are people using for compilers?...I'm using PICC-Lite.
Any other advice would be appreciated.
 

dave_euser

New Member
bios settings?

I've gone through all of the above suggestions on my own....tried several different programming software - all can read, none can write. I've got a second machine that works 100% using the same software. Not quite sure what to do from here....my MCLR is 13V flat (read from a scope)....

The only thing I can think of now is that things aren't being read back properly....what mode should my parallel port be in (EPP, etc)?

Thanks,
Dave
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Re: bios settings?

dave_euser said:
I've gone through all of the above suggestions on my own....tried several different programming software - all can read, none can write. I've got a second machine that works 100% using the same software. Not quite sure what to do from here....my MCLR is 13V flat (read from a scope)....

If it works on one computer, then the hardware and software are obviously OK, it looks like a problem with your computer - some computers just don't work in this way :(

One thing to check is that another program isn't accessing the parallel port, I've heard of laptops that have this problem.

The only thing I can think of now is that things aren't being read back properly....what mode should my parallel port be in (EPP, etc)?

The port is used as a standard parallel port, I've never found the settings to actually affect it.
 

xpembedded

New Member
I am having the same problem now

program verify error when programming a 16f84a chip

glad that i am not the only one having the problem


anyone can help me?
 

Noy-P

New Member
Same Problem but got fixed.

.

I thought I am all alone... I'm actually about to give up on this.

I had the same problem... And also did all the testing
and everything checked out ok... but the PICALLW program
that I claimed fully supportted Pic16PRO doesn't
even work on my computer.

I'm running WinXP, AMD Barton processor (AMD XP 2500+)

I have a MakINterface LP using ic-prog and pony prog,
doesn't even work on this computer. And I'm kinda frustrated.

Just today, I tried using IC-Prog 1.05C with PIC16PRO
https://www.ic-prog.com/kit96_119set.html

It works like a charm...
Only mine is set to Interface:Windows API

My Settings
Programmer: Pic2Programmer
Interface: Windows API
Invert All: DataOUT, DataIN, CLOCK

Works Great!

Now I'm able to read and write pic16f84a, haven't tried other MCU yet on this fast computer... But I think they should work.

Give me an update if this solves your problem.

Hope this help you guys...
 

Henrico

New Member
A sugestion, try selecting a different port setting in the pc's CMOS....
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top