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