Sean Breheny wrote: > Hi all, > > I have a small production run of 60 boards using 16LF88s. Most are > working fine but after several firmware updates, I now have three or > four which can no longer be programmed, they always read all zeros for > the program memory. Examining the config word, I find the following: > > Normal (programmable) PIC config word: 3F 35 3FFC > Abnormal PIC config word (on the few that will not program): 1E 35 3FFC > > That is, there are two bits altered: flash AND data memory code > protect has been turned on. > > There are two programmable devices on this board which are programmed. > The procedure is to erase the PIC, leave the board powered up > (including the PIC), program the other device (it is a Maxstream radio > module and IS connected to the PIC's pins but uses no high voltages in > programming), then program the PIC using MCLR (high voltage > programming - LVP is turned off in the config word). > > Other than some weird bug with the PIC or a static problem, the only > thing I can think of is that somehow programming the Maxstream affects > the PIC sometimes, even though it doesn't place high voltage on MCLR. > > Are there any known bugs which could cause this? Any ideas? > > Thanks very much as always, > > Sean > I do a lot of work with the F88; I have 6 active production designs running. The F88 and LF88 are very sensitive to the level of the LVP pin, regardless of the state of the configuration bits. I'd try that first. A 10K resistor to GND seems to solve that, in addition to whatever else is connected to that pin. This is probably your problem. I place a 10K to GND on the LVP pin of ALL products I design. And I never have programming problems (any more). I realize that Microchip says this isn't needed, but in this case they are wrong ("Pay no attention to the man behind the curtain"). Another thing is that the F88 (like some other nanowatt PICs) require running timers during powerup, and if the devices are not bypassed while being programmed, sometimes there are problems because the oscillators are having trouble starting. 0.01uF is plenty (10nF). Try that and let us know. --Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist