What the Hex???

Status
Not open for further replies.

wittywop

New Member
Hey all.

I am hoping you guys might be able to help me figure this problem I am having out. I learned to program a pic16F84a back in school, but that was 8 years ago. Sadly it is true that if you don't use it, you lose it.

Most of it is slowly coming back and I have found some good tutorials out there, but I am having trouble with the burning process.

I have MPLAB IDE v8.56 on my machine but can't seem to get it to export a .hex file that I can burn into my chip. I have one of those lil Do it yourself kits. Kit 81 v4.
It comes with a lil burning program.

It seems to work fine because I was able to load the sample hex files that came with it and get the pic to preform properly. But when ever I make changes to the .asm, (nothing major, just added an extra delay to the flashing steps) and try and export the chips does nothing.

I have attached the sample hex and asm file that came with the burner (binarylr) and then the hex code for the modified one i tried ( binarylr2xB)

Am I doing something wrong in MPLAB? Is there an easier way to convert a asm to hex?

THanks so much in advance for your help. I think once I can figure out the workflow for this part, I can start testing the program I have designed.
 

Attachments

  • binarylr.asm
    2.3 KB · Views: 116
  • binarylr.HEX
    309 bytes · Views: 118
  • binarylr2xB.hex
    2.8 KB · Views: 113
It's something you're doing within MPLAB. You can export compiled ASM code to a HEX file from MPLAB. From when I first used MPLAB to now they've changed a few things. I'd say the same applies to you. Create a new project, select all of the pertinent information and load your code. Compile it, then export it in Intel 8 HEX format, I8HEX. Then program as normal with your Kit 81 v4.
 
Just use MPASM to create your .hex file.
If you need more info just look on talking electronics site and see the PIC Programmer article for all the files you need.
 
Hi,

Not sure about what programmer the kit81 is or its software, but going on how most of them work, there is no need to 'export' your .hex file from Mplab.

Simply build your code and the .hex file is saved in your project directory.
When you open your Programmer software there should be a File, Load box where you should be able to Browse for your Microchip/ Your Project and simply select the .hex file from there.
Even if thats not available simply copy the .hex file across with My Computer.

Have just built the .asm file and that runs fine, though I assumed a clock / RC of 1mhz.
The original .hex file also runs ok, but your modified one does not, would assume its down to a code error but without seeing it cannot say for sure.
 
Thanks All!!!

I got it to work! I used the MPASM and it converted my asm file to the hex file.

At first it didn't work, I compared the hex file that was created to the sample hex file that came with the burner and found that there was a line hex characters at the top of the hex code that wasn't on the sample one. One I deleted that line, I was able to burn it to the chip and get it to run my program. (hope that line wasn't anything important)


Thanks so much for your replies and help.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…