0
\$\begingroup\$

I'm a newbie trying to write an Intel hex file to a PIC 16F886 using a MiniPro TL866A. When I try, I get the message:

$ minipro -p PIC16F886 -f ihex -w downloaded-file.hex
Found TL866A 03.2.86 (0x256)
Chip ID OK: 0x2062 Rev.0x2060
Found Intel hex file.
Incorrect file size: 3145742 (needed 16384)

Looking at the hex file in the parser at Nordic Semiconductor, I can see that there are two parts that are outside the range of the PIC:

Block starting at 2097152 (0x200000), 8 (0x8) bytes long
Block starting at 3145728 (0x300000), 14 (0xe) bytes long

What are these 8 and 14-byte values, and how do I write them to the PIC?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ You may need to consult the source of the file. I believe I once saw a local tradition of putting fuse settings at implausible addresses in a file to keep them associated with the code, but such a scheme only works if the user of the file shares that tradition. \$\endgroup\$ Commented Dec 24, 2019 at 21:05
  • 1
    \$\begingroup\$ The ID and configuration bits for that chip are supposed to be at 0x2000-2003 and 0x2007-0x2008 which is already outside the program memory space. What's the hex file saying should be in those very high locations? Where did the file come from? \$\endgroup\$ Commented Dec 24, 2019 at 21:27
  • \$\begingroup\$ This is what's in my file: :020000040020DA :08000000FFFFFFFFFFFFFFFF00 :020000040030CA :0E000000FF38193CFF3580FF08800FE00F40ED. The file came from an antenna tuner manufacturer who no longer supports the model I have with the bad PIC. \$\endgroup\$ Commented Dec 24, 2019 at 21:31

1 Answer 1

2
\$\begingroup\$

Microchip assembler seems to set the configuration and ID locations using those very high addresses. For example, from the manual:

enter image description here

So it appears there is some incompatibility between the third-party programmer and Microchip's hex files. Maybe you can update the programmer firmware, or if it's an illegal clone use some tool like a Pickit.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ The problem was indeed the MiniPro TL866A programmer. Even using the latest firmware available, it had issues - apparently this isn't uncommon. Switching to a PICKit 2 and using Microchip's pk2cmd, I was able to write just fine. \$\endgroup\$ Commented Jan 9, 2020 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.