View previous topic :: View next topic |
Author |
Message |
bertronicom
Joined: 17 Nov 2004 Posts: 26 Location: University of Cantabria -SPAIN
|
problems protecting mi PIC18 |
Posted: Thu Jul 07, 2005 1:44 pm |
|
|
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
|
|
Posted: Thu Jul 07, 2005 2:07 pm |
|
|
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
|
|
Posted: Thu Jul 07, 2005 3:09 pm |
|
|
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
|
|
Posted: Thu Jul 07, 2005 3:22 pm |
|
|
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
|
enabling protection code |
Posted: Mon Aug 01, 2005 1:50 pm |
|
|
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
|
|
Posted: Mon Aug 01, 2005 2:04 pm |
|
|
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
|
CODE_PROTECT |
Posted: Mon Aug 01, 2005 2:28 pm |
|
|
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: 1908
|
|
Posted: Mon Aug 01, 2005 2:44 pm |
|
|
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
|
|
Posted: Mon Aug 01, 2005 3:11 pm |
|
|
What programmer are you using ?
Also, what software are you using to run your programmer ? |
|
|
|