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.

Problem when loading hex file

Status
Not open for further replies.

zachtheterrible

Active Member
I'm almost all the way through writing my first program to the PIC. It's nigel's blinking LEDs program. I'm having some trouble though: I get this message when I load the .hex file with winpicprog:
Program verify failed at Program address 0x000, programming aborted!
When I build the file on MPLAB, it builds just fine.

One more question: I'm looking for prefferably a book on programming PICs. I would also like the book to use the PIC16F628A as it's microcontroller since I have a couple already.

If there is no book that uses the 16F628A I guess I'll just get a different microcontroller and learn with that. Thanks :lol:
 
Hiya Zac,
Eh mate that problem has come up a thousand times and if you check Nigel's response on his forum under FAQ it explains it very well. Now the book 'easy pic'n', from square1 are a bit dated as they concentrate in the 16f84 but thats the first book I bought when getting into pic's and it's a very well written introduction to pic's. As you know the 16f628 can easily accomodate 84 code with minor changes so that's the book I can recommend to you. I also bought the 'easy steppin' and pic'n up the pace' from them and eventually I'll buy all the pic books they have as they are a top learning tool, the only bad thing is over here in Oz there expensive.

Hope this helps Bryan :D
 
zachtheterrible said:
I'm almost all the way through writing my first program to the PIC. It's nigel's blinking LEDs program. I'm having some trouble though: I get this message when I load the .hex file with winpicprog:
Program verify failed at Program address 0x000, programming aborted!

The error has nothing to do with MPLAB but the hardware programming setup.

Check 16F628A pin 10 "RB4/PGM" pin. This pin should be pull down to 0V during programming.
 
This is by far the most common fault report I get, this error message usually means the PIC isn't being switched to programming mode. This can obviously be caused by a fault or mistake in the programmer, but is almost always caused by too low a supply voltage. To switch a PIC to programming mode requires slightly more than 12 volts on the MCLR pin, often 'wall warts' don't supply a stable clean voltage and fall short of this under load.

To check, select 'Hardware' from the 'Options' menu, then turn Vpp 'On' and measure the voltage on the actual MCLR pin (on some programmers you may need to turn 'Vdd' on as well).

This makes absolutely no sense to me! the MCLR pin is pin 1 on the schematic, but the schematic tells me to put an 18 pin IC with pin 9 on pin 20 on the programmer, so that pin 1 on my pic is lined up with pin 12 on the programmer. In other words, pin 1 on the IC and pin 1 on the programmer aren't lining up.

Something doesn't add up :lol:
 
Without knowing what programmer and software you are using, it's hard to be of any help.

I have 2 programmers, a PicStart Plus which aligns pin 1 whatever size the pic is, and a silicon chip JDM type programmer. This only takes 18pin chips and you build adapters for the other ones.

When I am using the JDM type programmer with IC-PROG, I ignore the device position information contained in menu view/device position as this is wrong. (it advises to position the pic as you describe above)

So, if you are using IC-PROG don't believe the positioning information. Refer instead to your hardware description.

HTH

Mike.
 
zachtheterrible said:
so that pin 1 on my pic is lined up with pin 12 on the programmer.

Yes. The position is correct.

MCLR pin of the 16F628X PIC is on its pin4, not pin 1.

If you place the PIC with its 9th pin in the 20th pin of the 40-pin socket, the PIC's MCLR will then be located on the 15th pin of the 40-pin large socket.

Look back at the schematic of P16Pro40, pin 15 of the large socket is Vpp controlled by transistor T1 via Vpp On/Off signal.
 

Attachments

  • 18-pos.gif
    18-pos.gif
    13 KB · Views: 537
Why does everything have to be so difficult!? I'm still getting the same error.
The MCLR pin is @ 13.5V, so everything is fine there. Pin 10 though is at .5V, is something wrong there?
 
What is the operating system on your PC? I never could get my P16PRO40 working on the parallel port of a Win2000 or WinXP system, even after trying several port control add-on programs... If this is the case on your PC, do you happen to have an old Win98SE system that you could try it on?

Regards, Mike
 
No I don't.

Are there any programmers that will work with linux? What other programmers are there for xp?
 
For Linux, you might look here; https://www.gnupic.org/

For XP I have an melabs serial programmer (expensive), a home-brew 18F230 based serial programmer (about $10), and a serial ICD2 clone (about $10)...

Good luck on your project... Regards, Mike
 
zachtheterrible said:
Are there any programmers that will work with linux?

Exclusively working on linux (slackware current) and **broken link removed** site has been invaluable on that front. Even using the underlying pkp command line programming engine with a tait classic, out of a make file.
 
the picall version

also works very fine!

i have an board lying arround..the problem is i don't have the Chip!

once my programmer broke down sow i orderd the kit again.
It came with the chip and an clean board.

Tks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top