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.

exporting hex file w/ pickit2

Status
Not open for further replies.

MrDEB

Well-Known Member
attempted to locate a hex file to program 8 pics but could not locate.
Luckily I have an extra chip that was programmed w/ hex file needed BUT!!
I import the hex file from the pic and a yellow error message says that the file is too large. Went ahead and programmed the pic anyway and it says a successful write to the pic. Powered the pic w/ test board and all seems to work.
Wonder why it had an error about being too large of a file?? or perhaps has something to do with the hex file import??
 
There are so many things wrong with the above, it makes my head hurt.

"attempted to locate a hex file to program 8 pics but could not locate." - I presume this is YOUR hex file. It should be in the same directory as your source code. If you deleted it or something, why not recompile from your source code? Or didn't you save the working version?

"I import the hex file from the pic and a yellow error message says that the file is too large." - If you get an error message, Do Not Pass Go. Do Not Collect $200. Something is wrong and unless you can explain it, it absolutely will come back to bite you in the ass...or more likely the guy you conned into this project.

When you say import, do you mean you read the code from the programmed PIC? There is no option to import from a PIC.

What you could do is read the file from the original chip, and then click Verify on the PICkit 2 GUI. This verifies the file against what's in the chip. If it verifies, it's ok.

MDIAI-PICKIT2 Shot.jpg
MDIAI-PICKIT2 Shot.jpg
 
I looked in the folders with my original code but having several different versions and nothing looked right.
The error message was in yellow so yellow is caution. I programmed the pics and each one says successful programmed.
I ran each pic on a board and no issues arose, everything worked as planned.
Hopefully it all works as planned installed. Wonder if importing the hex file from one pic has some extra code or ??
Time will tell after it is all installed. Thinking of experimenting with a different pic combo on a tap28 board and maybe it is something to do with using a clone pickit2??
 
....What you could do is read the file from the original chip, and then click Verify on the PICkit 2 GUI. This verifies the file against what's in the chip. If it verifies, it's ok.....

I know you think I type this stuff because I can't sleep or I'm tired of I Love Lucy reruns, but no, the words have specific meanings.

I explained exactly how to tell that tbe code read by the PICkit matches what's in the chip. I would strongly suggest you do this rather then just shrugging and sending the guy crap that may fail under some condition you haven't tested.

But this isn't my clown show......
 
Mr D , would not the date on the .HEX file show the last build you did, or perhaps the "source" .asm file , just build it again.
 
I looked at all the source files and none of them have the entire code I am wanting. not sur if I can do a search with using the last date it was opened in Swordfish??
Going to do a better search but wondering if the pic needed to be erased before loading a different hex file??
 
Sigh. You really have a great immunity to extrapolating knowledge MrDEB. Truly magnificent.
 
If it's to big there something wrong. You can get the hex
Code:
pk2cmd -PPIC16Fxx -GF/home/my_user/my_program.hex
PPIC16Fxx change for your chip
 
the chip is a 18f4321. connected up with 15 leds running on 5v and ran for 10-15 minutes. NO issues arose and the program selection rotary switch worked as did the ACD speed selection pot.
I am still perplexed but it runs with no problems. The hex file shows 91KB
 
In posts 2 and 4, i outlined how you could verify that the code received by the PICkit matchs what's in the PIC. This minute-long process would let you be certain the code matches exactly.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top