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

problems protecting mi PIC18

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



Joined: 17 Nov 2004
Posts: 26
Location: University of Cantabria -SPAIN

View user's profile Send private message Send e-mail MSN Messenger

problems protecting mi PIC18
PostPosted: Thu Jul 07, 2005 1:44 pm     Reply with quote

I've put this in my code

#fuses PROTECT, NOWDT,WDT128,XT, NOOSCSEN, BROWNOUT, BORV20, NOPUT, STVREN, NODEBUG, LVP, NOWRT, NOWRTD, NOWRTB, NOWRTC, NOCPD, NOCPB, NOEBTR, NOEBTRB

I've my pic18f452 working at 3.3v. I'm trying to program the last version with code protection.

After I've programmed my PIC with code protection I can read his firmware and If I read configuration fuse protect= NO_PROTECT.

What's happens?
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Thu Jul 07, 2005 2:07 pm     Reply with quote

I dont think you can clear fuse settings at 3.3 volts. I think fuse settings may only be set at 3.3 volts. The ICD should be poping a window up mentioning this when you attempt to program.
valemike
Guest







PostPosted: Thu Jul 07, 2005 3:09 pm     Reply with quote

I've compiled by 18F458-based program after cutting and pasting your #fuse statement.

In the MPLAB IDE environment, the configuration bits summary shows your code protect fuse bits enabled.

So it can't be your program. I also see that popup warning that Neutone mentioned, but my Vcc is 5V.
Ttelmah
Guest







PostPosted: Thu Jul 07, 2005 3:22 pm     Reply with quote

A few of the fuses seem 'odd'. You enable brownout reset, but disable the power up timer (check the data sheet, the latter is _required_ if the former is selected). You disable boot-block protection (which is one of the ones that really should be on), and do not enable any of the table read protections. This potentially means that even if the protection is enabled, it could largely be bypassed by uploading a replacement boot block, which then dumps the memory...
You also turn off in circuit LVP, yet talk as if you may be trying to program the chip this way. This fuse cannot be changed except using high voltage programming.
Generally, you can set any fuse at low voltage, but cannot clear the protection fuses, except by a full erase at high voltage. This should not be your problem.
How is your programmer connected?. Is this ISP, or are you working with the chip out of the board?. If the programmer supports high voltage programming, and it is being used in-circuit, are you sure the connections allow MCLR to reach the required voltage?.

Best Wishes
bertronicom



Joined: 17 Nov 2004
Posts: 26
Location: University of Cantabria -SPAIN

View user's profile Send private message Send e-mail MSN Messenger

enabling protection code
PostPosted: Mon Aug 01, 2005 1:50 pm     Reply with quote

HI Ttelmah

I'm using last version from CCS PCW & ICD-U and programming by ICD-U 40Mhz at 3.3v.

After I've programed this, I've verified fuses and no one was changed.

CODE_Protect was off again!!!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 01, 2005 2:04 pm     Reply with quote

Did you read Neutone's post ? He said:
Quote:
I dont think you can clear fuse settings at 3.3 volts
bertronicom



Joined: 17 Nov 2004
Posts: 26
Location: University of Cantabria -SPAIN

View user's profile Send private message Send e-mail MSN Messenger

CODE_PROTECT
PostPosted: Mon Aug 01, 2005 2:28 pm     Reply with quote

Yes I did.

I know I can't clear fuses at 3.3v,

Even in order to set only CODE_PROTECT bit in fuses????

Then I only can program fuses at 5v????
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Mon Aug 01, 2005 2:44 pm     Reply with quote

From what I understand, you can't clear/change/set/whatever any fuse at 3.3V. You can only change them at 5V. There are lots of posts on this subject.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 01, 2005 3:11 pm     Reply with quote

What programmer are you using ?

Also, what software are you using to run your programmer ?
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