Searching \ for '[PIC] Help needed - Cannot program Boot Sector in' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Help needed - Cannot program Boot Sector in'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Help needed - Cannot program Boot Sector in '
2004\12\29@175156 by Groups

part 1 2530 bytes content-type:text/plain; (decoded 7bit)

I have a problem programming the Boot sector of PIC18LF6720.

Setup is MPLAB 7, ICD2 - R13, HI-TECH C, Windows 2000 Professional

The ICD is attached via USB cable and powered from Target (3.3V)

The problem occurred after I programmed a bootloader into the micro with the
Code Protect Boot Enabled.

The bootloader ran OK but when I went to re-program the IC using the ICD, I
cannot write anything between
0x000 and 0x0200.

If I erase the IC and read back and look at program memory all locations
above 200h are set to ffffh but all locations
from 0x00 to 0x200 are 00h.

I have disabled all protect bits in config settings but cannot get access to
the boot area any more.

This has occurred on 2 target devices but if I program a target that has not
had bootloader put into it
the unit programs fine.

Programming Target...
...Erasing Part
...Programming Program Memory (0x0 - 0x2DF)
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val =
0xEF0E, Val Read = 0x0)
ICD0275:  Programming failed.

When I read back the memory. 0x00 to 0x200 are set to 0x00 but valid code
exists from 0x200 to 0x2df

If I then switch over to Debugger, I get the following report (I did not
enable the Code Protect Boot, it was disabled)

Connecting to MPLAB ICD 2
Setting Vdd source to target
Target Device PIC18F6720 found, revision = a4
...Reading ICD Product ID
Running ICD Self Test
Programming Target...
ICDWarn0042:  Protect bit (CPB : Code Protect Boot) is enabled.  MPLAB ICD 2
will not enter debug mode in this configuration.  Do you wish to disable
this setting?
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x2DF)
...Loading DebugExecutive
...Programming DebugExecutive
...Programming Debug Vector
...Programming RSBUG
...Program Memory
...Debug Executive
ICD0161: Verify failed (MemType = Program, Address = 0x1FDD4, Expected Val =
0xD015, Val Read = 0x15)
ICD0275:  Programming failed.

Thanks in advance for any help.

Kind Regards

David Huisman (CEO)
ORBIT COMMUNICATIONS Pty Ltd - Wireless Solutions that Work
(Telemetry, Control, Monitoring, Security, HVAC ...)
A.C.N. 107 441 869

Website :
PO Box 4474 Lakehaven
Phone: 61-2-4393-3627
Fax  : 61-2-4393-3685
Mobile: 61-413-715-986

part 2 2917 bytes content-type:application/ms-tnef; (decode)

part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2004\12\29@183434 by Jason Harper

picon face
> 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

2004\12\29@183619 by Jan-Erik Soderholm

face picon face
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.

Best Regards,

>  {Original Message removed}

2004\12\29@194712 by pic

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).

{Original Message removed}

2004\12\29@225253 by Peter van Hoof

picon face
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

Peter van Hoof

----- Original Message -----
From: "pic" <>
To: "Microcontroller discussion list - Public." <>
Sent: Wednesday, December 29, 2004 7:35 PM
Subject: RE: [PIC] Help needed - Cannot program Boot Sector in

{Quote hidden}

> {Original Message removed}

2004\12\30@041509 by pic

The Chip is a TQFP 64 soldered directly to the PCB. Many of the IO pins are
driving 3V

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 ?

Thanks in advance.

{Original Message removed}

'[PIC] Help needed - Cannot program Boot Sector in '
2005\01\07@155409 by alan smith
picon face
Try programming ONCE with 5V...betcha that will fix
it.  Then you can program with 3.3V.  Seen it many a

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...