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

After write_program_memory(), PIC18F4320 invis to ICD-U40

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







After write_program_memory(), PIC18F4320 invis to ICD-U40
PostPosted: Wed Jun 23, 2004 9:11 am     Reply with quote

If I do a write_program_memory(..) on a PIC18F4320, the chip can no longer be detected by an ICD-U40.

Subsequent calls to read_program_memory verify that writes execute correctly. In fact, everything continues to work normally, except for the interface to the ICD-U40.

I have tried using the WRTB, WRTC fuses to protect the configuration words, to no avail.

The problem occurs on a simple program with only three lines:

int8 workspace[64];
write_program_memory(1024, workspace, 64);
while (true);


Help!

Gordon
ghanka
Guest







more info and lousy workaround
PostPosted: Fri Jun 25, 2004 9:19 am     Reply with quote

I have further refined my diagnosis.

A PIC18F4320 will *permanently* lose contact with an ICD-U40 when:

1) The NOMCLR fuse is set.
2) A call to the PCWH subroutine WRITE_PROGRAM_MEMORY(..) is executed.

Afterward, any attempt to reprogram the chip results in a "Could not detect target chip" error.

The chip otherwise continues to function normally, and can perform multiple read_program_memory(..) and write_program_memory(..) instructions correctly.

The only workaround I have found is to set the MCLR fuse. This means, among other things, no use of the MCLR line for IO.

This problem happens with:

1) The latest (June 25, 2004) versions of PCWH, ICD.exe, and ICD firmware.

2) ICSP circuitry as specified by CCS, including 50K MCLR pullup, which has functioned flawlessly for hundreds of chip reprograms.

3) A program that contains only one statement, a call to write_program_memory(..) to write a block of 64 bytes to an unused memory area.

4) Fuses set to protect the config and ID memory areas.


gordon
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