At 03:09 PM 7/14/00 -0600, you wrote: >References: > >Brian Gregory wrote: >> > After many hours of looping I been _unable_ to erase the damned code >> > protect bits to be able to update the devices (already mounted on >> > boards). >> >> Just press the ERASE button on the MPLAB-ICD options dialog. > >Tried that, many many times. No effect. > >The devices WERE fine, and had programmed several times, up until >the code protect bits got set by whatever glitch. > I do not have a ICD so I cannot give exact directions but... The ICD most certainly does have the ability to break the code protection of a 16F876, there is code in the firmware to do this. I would expect that MPLAB would read the config word first and send commands to break the code protection if required. This is certainly how the MPLAB/PICSTART PLUS combo works. If this is not working the reason might have something to do with the LVE bit being set in the config word and RB3 being held high by the target system. If this is the case then you will not be able to write anything to the target pic because it enters a lock-up state if RB3 is high during power-up. A solution would be to isolate RB3 on power-up and try again. Another possibility is that the WRT bit is programmed and this will prevent any new code being updated. The possible solution here is to enable all code protection fully ON and program the config word. Then turn all the code protection options OFF and reprogram the target as required. This will force MPLAB to issue commands to break the code protection and erase the entire device. This proceedure works for the picstart plus in the case of the data memory protection being enabled. It may have some use here. Regards, Jim Robertson NEWFOUND ELECTRONICS ________________________________________ Email: newfound@pipeline.com.au http://www.new-elect.com MPLAB compatible PIC programmers. ________________________________________ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.