CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ICD firmware update question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
smersh



Joined: 27 Feb 2004
Posts: 10

View user's profile Send private message

ICD firmware update question
PostPosted: Fri Feb 27, 2004 11:46 am     Reply with quote

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

View user's profile Send private message

Re: ICD firmware update question
PostPosted: Fri Feb 27, 2004 12:08 pm     Reply with quote

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

View user's profile Send private message

Re: ICD firmware update question
PostPosted: Fri Feb 27, 2004 4:02 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Fri Feb 27, 2004 7:03 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Feb 28, 2004 6:24 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Feb 29, 2004 7:13 am     Reply with quote

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? Smile

Regards!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group