Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 18th January 2004, 11:27 PM   (permalink)
Default 16F84A programming error using P16PRO40

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.
rizzy is offline   Reply With Quote
Old 19th January 2004, 06:20 AM   (permalink)
Default

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.
Nigel Goodwin is online now   Reply With Quote
Old 19th January 2004, 06:40 AM   (permalink)
Default

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.
rizzy is offline   Reply With Quote
Old 19th January 2004, 08:15 AM   (permalink)
Default

Quote:
Originally Posted by rizzy
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.

Quote:
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 is online now   Reply With Quote
Old 19th January 2004, 08:22 AM   (permalink)
Default

Quote:
Originally Posted by rizzy
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.

Quote:
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 is online now   Reply With Quote
Old 19th January 2004, 09:40 AM   (permalink)
Exo
Default Re: 16F84A programming error using P16PRO40

Quote:
Originally Posted by rizzy
- cable is only 3ft
Is it shielded? I've had problems programming pic's and it was all caused by a 15cm unshielded cable...
Exo is offline   Reply With Quote
Old 20th January 2004, 12:43 AM   (permalink)
Default

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.
rizzy is offline   Reply With Quote
Old 20th January 2004, 05:56 AM   (permalink)
Default

Quote:
Originally Posted by rizzy
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.
Nigel Goodwin is online now   Reply With Quote
Old 21st January 2004, 02:38 AM   (permalink)
Default

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.
rizzy is offline   Reply With Quote
Old 21st January 2004, 02:51 AM   (permalink)
Default

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.
k7michal is offline   Reply With Quote
Old 21st January 2004, 05:58 AM   (permalink)
Default

Quote:
Originally Posted by rizzy
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.
Nigel Goodwin is online now   Reply With Quote
Old 20th February 2004, 12:43 AM   (permalink)
Default

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!!!
muddy is offline   Reply With Quote
Old 8th March 2004, 12:27 PM   (permalink)
Default 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.
Imprezzive is offline   Reply With Quote
Old 12th March 2004, 06:05 PM   (permalink)
Default

Hi

I too am having the adrtess...buffer..device error

I have been able to program a 12c508a but when i try to write to a 16f877a it comes up with that error.

How annoying
2camjohn is offline   Reply With Quote
Old 12th March 2004, 06:25 PM   (permalink)
Default

Also I just tried using two 9v batteries but still no luck
2camjohn is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 02:45 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.