Olin Lathrop wrote: >You may be right about how it works on a PIC 18. I was thinking of the DE >directive, which always put the EEPROM data into the low bits of an entire >instruction word. This is also how the EEPROM data is written to the HEX >file. That means that every other byte of EEPROM data in a HEX file for a >PIC 18 is ignored and set to 0. This is just not correct. This matter was discussed on the PICLIST recently with regard to the IC-PROG software as the author of that software also got it wrong. The PIC18 hex output does not store PIC18 EEPROM bytes in 16-bit words. They are written to the HEX file as single bytes with one address per byte. list P = 18F452 Org 0xf00000 DE 0,1,2,3,4,5,6,7,8,9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f end Produces this standard INHX32 Hex file: :020000040000FA :0200000400F00A :10000000000102030405060708090A0B0C0D0E0F78 :10001000101112131415161718191A1B1C1D1E1F68 :00000001FF The PIC18 family architecture was designed for "Byte wide" memory access to facilitate using them as extended microcontrollers or as microprocessors with configurable memory width for the external data bus. (8-bit or 16-bit.) This is why BOTH the code and data EEPROM for a PIC18 have byte wide addressing in the hex file (unlike the PIC16 family that has word wide addressing and this family does pad the data EEPROM with '0' every other byte.) Regards, Jim Robertson NEWFOUND ELECTRONICS --- http://www.piclist.com/member/newfound-pipeline- PIC/PICList FAQ: http://www.piclist.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads