View previous topic :: View next topic |
Author |
Message |
smersh
Joined: 27 Feb 2004 Posts: 10
|
ICD firmware update question |
Posted: Fri Feb 27, 2004 11:46 am |
|
|
Hi!
I have a home-built ICD, repeating a Microchip AN schematics. I've teared out a hex from the "icdfirmware-xx-xx.fw" file for the first run. It works just fine, but I could never perform a firmware upgrade. The code in 877 gets corrupted, when I try to upgrade it for PIC18 operations or downgrade. When I read it with a ProPic programmer it seems like first several words are shifted, and the very first word is 0000. The second is one that should be at first etc.
When updgrading, ICD shows an error window "Byte XX received instead YY"
If anyone has the same problem, give me a hint please. |
|
|
agrj
Joined: 26 Sep 2003 Posts: 48
|
Re: ICD firmware update question |
Posted: Fri Feb 27, 2004 12:08 pm |
|
|
smersh wrote: | Hi!
I've teared out a hex from the "icdfirmware-xx-xx.fw" file for the first run. |
Hi,
how did you do it?
thanks
Dinho |
|
|
smersh
Joined: 27 Feb 2004 Posts: 10
|
Re: ICD firmware update question |
Posted: Fri Feb 27, 2004 4:02 pm |
|
|
If you open the file in a text editor it becomes obvious.
You will see pieces of a hex code, separated by several text stirngs. That's the way CCS has packed all versions of their firmware in one file. Let's say you have an USB version of ICD running at 20MHz and you want to program it to use for PIC16. You have to search for a "ccsicdu20A-pic16.hex" string. Fot Serial 20MHz PIC18 version search for "ccsicd20A-pic18.hex"
The piece of code AFTER it up to "PIC16F876" is the code you need. Mark and copy it to a file. Then program this file into 16F876 with any programmer you've got. Don't forget to remove texts. You will not need even to set up fuses manually - everything's there.
That worked perfect for me except a firmware updating which does not work - I don't know why. |
|
|
Gary Smithson
Joined: 13 Feb 2004 Posts: 22
|
|
Posted: Fri Feb 27, 2004 7:03 pm |
|
|
It is possible that when you program the firmware into the 877 it works but you don't actually have the bootloader for updating. Some people (including me) do not integrate their bootloader into their firmware. Look into using the file booloadr.hex (not sure of exact name) and then put the firmware in with a firmware update.
Hope that helps,
Gary |
|
|
smersh
Joined: 27 Feb 2004 Posts: 10
|
|
Posted: Sat Feb 28, 2004 6:24 am |
|
|
I don't think so. First of all there must be at least two versions of the bootloader- for 20 and 4 Mhz. And maybe even more for USB versions. Second, code of bootloader.hex and the firmware are overlapping, they use same addresses. |
|
|
smersh
Joined: 27 Feb 2004 Posts: 10
|
|
Posted: Sun Feb 29, 2004 7:13 am |
|
|
Ok, I've found a solution.
First of all, MPL867.hex from MC MPLAB has to be programmed. Then a firmware update from ICD should be executed. After that, everything works just fine. The only negative is that chip runs at 3.68 MHz. By the way, it does not work with a 4Mhz crystall. For a 20 MHz operation it needs a specific bootloader . "bootloder.hex" from the ICD directory is not the right one, unfortunatelly. I have no idea whre the right one could be obtained, maybe someone could read it out from the original ICDS-20 module?
Regards! |
|
|
|