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 CCS Technical Support

Protected Code Even When Using NOPROTECT?

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



Joined: 05 Jul 2010
Posts: 129

View user's profile Send private message

Protected Code Even When Using NOPROTECT?
PostPosted: Tue Jul 13, 2010 4:11 am     Reply with quote

Hi,

I'm trying to program a PIC18F4520 and despite having fuses set to:

Code:
#fuses INTRC_IO,NOWDT,NOPROTECT,BROWNOUT,PUT,NOLVP,NOCPD,NOWRT


My programmer (PICKIT2) is still displaying 'All Protect' and displays zeros when reading from the device.

I've looked through all the fuses for teh device and can't find any further ones I'd have to include.

Any ideas?

Cheers,

EDIT: Compiler Version PCWH 4.087
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Tue Jul 13, 2010 5:01 am     Reply with quote

You probably need to perform a full erase.
If the erase fuse is set, it can _only_ be cleared by completely erasing the chip (makes sense if you think about it....). Hence if the fuse has been set in the past, a full erase is needed. On many programmers there is an option to 'erase only memory needed', and if this is set, and the protect fuse has been set in the past, because a 'full erase' is not automatically done, you get the behaviour you are seeing.

Best Wishes
Geps



Joined: 05 Jul 2010
Posts: 129

View user's profile Send private message

PostPosted: Tue Jul 13, 2010 5:08 am     Reply with quote

Excellent thanks.

For anyone else who has this problem:

Erase button (next to verify)
Untick Tools -> Enable Code Protect
Untick Tools -> Enable Data Protect
Reload HEX
Write
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