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----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of Jan-Erik Soderholm Sent: Thursday, 30 December 2004 10:36 AM To: piclist@mit.edu Subject: RE: [PIC] Help needed - Cannot program Boot Sector in PIC18XX 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. Best Regards, /Jan-Erik. > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] > Sent: den 29 december 2004 23:40 > To: piclist@mit.edu > Subject: [PIC] Help needed - Cannot program Boot Sector in PIC18XX > > 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) > Verifying... > ...Program Memory > ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = > 0xEF0E, Val Read = 0x0) > ICD0275: Programming failed. > MPLAB ICD 2 Ready > > 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 > ...Connected > Setting Vdd source to target > Target Device PIC18F6720 found, revision = a4 > ...Reading ICD Product ID > Running ICD Self Test > ...Passed > MPLAB ICD 2 Ready > 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 > Verifying... > ...Program Memory > ...EEPROM > ...Debug Executive > ICD0161: Verify failed (MemType = Program, Address = 0x1FDD4, Expected Val = > 0xD015, Val Read = 0x15) > ICD0275: Programming failed. > MPLAB ICD 2 Ready > > 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 : http://www.orbitcoms.com > PO Box 4474 Lakehaven > NSW 2263, AUSTRALIA > Phone: 61-2-4393-3627 > Fax : 61-2-4393-3685 > Mobile: 61-413-715-986 > > > > > > << File: ATT225163.txt >> -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist