PDA

View Full Version : Output hex file and Microchip direct



enigma
- 15th May 2006, 18:38
Hi All!

I suppose slightly off topic but for want of a better place to post I`ll put it here. Microchip direct are offering a reasonable priced bulk programing service for PIC's when ordered off their site. Since I need to program 1.5K in a batch shortly and don`t have a gang programmer or time I like the idea of this. Now the question, The device is programed from an uploaded hex file. The site requires a check sum for the hex file, I know MPLAB can generate this thanks to MCtechnical but is there another way to generate the checksum without having to run MPLab?. Second question is does the hex file generated by PBP contain the fuse settings (Int osc etc) and contents for the EEPROM area assuming that these are already declared in the PBP program?. I`ve always programmed my own PIC's via a Warp or MeLabs programmer so this bits new to me!.

Cheers Pete

BigWumpus
- 15th May 2006, 20:34
PBP generates a .hex-file with the fuses and EEPROM. This informtions are placed on special adresses (which are known for each device).

In an Intel-Hex-file, each line has it own checksum.

Browsing the MC-site I can't find any hint of a checksum for your upload...

enigma
- 15th May 2006, 21:25
Hi Try

https://www.microchipdirect.com/Programming/Default.aspx

thats reached from www.microchipdirect.com. You will have to register first bit when you follow the project set up through the last question asked is checsum for your uploaded hex file.

Cheers Pete

BigWumpus
- 15th May 2006, 22:06
OK,
I give up !

It is to complicate for me to reach the site. Please use this tools or copy the text...

ftp://ftp.bigwumpus.de/CHKSUM.EXE
ftp://ftp.bigwumpus.de/crc.exe
ftp://ftp.bigwumpus.de/crc.doc
ftp://ftp.bigwumpus.de/FILECRC.COM

This are old utils out of my fundus.

enigma
- 16th May 2006, 15:16
Many thanks, I`ll give these a try

Cheers Pete

ErnieM
- 17th May 2006, 20:28
MPLAB can be your friend here!

First, set Configure | Set Device to the PIC you use.

Next, load your hex file into it via File | Import.

Now, you get the hex checksum top left corner. To insure the "fuse bits" are correct, drill down Configure | Configuration Bits and have a look at them.

I've used Digi-Keys programming service a few times, they also require the config bits to be sent, I screen-shot them right from MPLAB.

enigma
- 18th May 2006, 20:35
Hi All


OK I imported the hex file into MPLAB and it generated the check sum fine. Sent the hex file plus the checksum to Microchip but it failed to pass. Heres the relevent part of the message from microchip:

The Programming Team advises the Checksum value submitted: "de73" does not match the actual Checksum value of the program.
The file submitted is in non-MPLAB standard format. Headers within the file are uniquely different than those produced by MPLAB and the memory map is incomplete.

Its generated using Microcode studio and PBP. I compile using the PBP compiler. Any clues whats wrong here?.

Cheers Pete

ErnieM
- 19th May 2006, 16:07
Interesting. Try this:

Change the MCS View | Compile and Program | Assembler Options tab to have it use MPASM as the assembler. That way, you have a Microchip product generating your hex code.

I bet that will help some.

enigma
- 26th May 2006, 21:22
Hi

Altered MCS to use MPSM and I get an error on my code which isnt there when I compile through MCS without MPSM. Seems to dislike this line:
@ device protect_on, pwrt_off, bod_off, INTRC_OSC_NOCLKOUT
particulary the error states protect_on to be illegal opcode. Device is 16F648A

Cheers Pete

mister_e
- 26th May 2006, 22:54
Do a search in the FAQ for a thread name "How to set Config fuse" or something like that.

MPASM don't use the same Directive as PM.