> I have a problem programming the Boot sector of PIC18LF6720.
I don't know about that particular chip, however there are definitely
some PICs which can't be bulk erased at low voltages, and a bulk erase
is the only way to clear the protection bits. Is there any way that you
can arrange, at least temporarily, to run the PIC at 5V? Try erasing it then.
Jason Harper
Hi.
I can't really say I know anything about this,
but might it be that the "3.3V" is the problem ?
Does your device support a full erase at the level ?
It seems from the (rather old) data sheet that I have
that the device needs between 4.5 and 5.5 V to make
an "external timed erase", params D132, D132A and D132B.
I'm not sure if bulk erase is functional at 3.3V. The data sheet for ICD
does mention that it will operate down below 3.3V
but I have not yet seen reference to whether some functions are not
available (such as bulk erase)
Supplying 5V to the micro is a problem as I would need to do quite a bit of
scalpel work to isolate the micro and ICSP
header from 3.3V and connect to 5V.
I suppose if I cannot erase the device on the 2 units I programmed, I will
need to lift the IC out and replace it.
Then program the bootloader without the Code Boot Protect enabled ??
It is probable that the config bit that protects the boot sector is still
set as if I disable the protection in config
and then read from the micro, the Boot Protect bit is set again in MPLAB
after reading the device.
Any other ideas (I noted a mod for ICD2 REV r15 upwards that shorts the
series resistors for PGD and PGC inside
ICD when some users had trouble programming DSP IC at low voltage but I am
not sure if this would also apply to
r13 tat I am using).
If the device is a dip it should be fairly easy to cut the Vdd
pin solder on a wire and apply 5volt to it
a piece of wire little glob of solder after erasing and its as
good as new
> Thanks for the prompt responses.
>
> I'm not sure if bulk erase is functional at 3.3V. The data
> sheet for ICD
> does mention that it will operate down below 3.3V
> but I have not yet seen reference to whether some functions are
> not
> available (such as bulk erase)
>
> Supplying 5V to the micro is a problem as I would need to do
> quite a bit of
> scalpel work to isolate the micro and ICSP
> header from 3.3V and connect to 5V.
>
> I suppose if I cannot erase the device on the 2 units I
> programmed, I will
> need to lift the IC out and replace it.
>
> Then program the bootloader without the Code Boot Protect
> enabled ??
>
> It is probable that the config bit that protects the boot
> sector is still
> set as if I disable the protection in config
> and then read from the micro, the Boot Protect bit is set again
> in MPLAB
> after reading the device.
>
> Any other ideas (I noted a mod for ICD2 REV r15 upwards that
> shorts the
> series resistors for PGD and PGC inside
> ICD when some users had trouble programming DSP IC at low
> voltage but I am
> not sure if this would also apply to
> r13 tat I am using).
>
The Chip is a TQFP 64 soldered directly to the PCB. Many of the IO pins are
driving 3V
logic.
I replaced the micro with a new one and it then programmed ok but I again
tried the bootloader
but some code in the loader must have set the Boot Code Protect again as I
have the same problem again.
I used this same bootloader on a PIC18LF252 and it works fine. I am not sure
what part of the bootloader is
switching the Config bit.
Would anyone be prepared to look at the bootloader code for me and advise
where this is happening ?