On Sun, Jun 24, 2001 at 07:29:37PM +0200, =C5ke Neehr wrote: > Hello! Hi. I thought I just answered this question less than a week ago.=20 >=20 > In Microchips directions of programming > for PIC16F87x devices can You read > following: >=20 > "To disable low voltage ICSP mode, the > LVP config bit must be programmed to'0'. > This must be done while entered with high > voltage entry mode (LVP config bit=3D 1). > RB3 is now a general purpose I/O pin." >=20 > I don=B4t understand exactly what they say, > therefore I=B4m asking the autority on the > PIC-list before I destroy the chip, It's very unlikely that you'll destroy the chip in any case. > Could it be like that: > If the chip is programmed with LVP ON > from the factory so must the pin RB3 > beconnected to VDD (+5V) under the > programming before it can change from > LVP on to LVP OFF? No. Here are the rules: 1) The chip can always be programmed in HVP mode. Always. 2) The chip can be programmed in LVP mode only if the LVP config bit is s= et. 3) The LVP config bit can only be changed in HVP mode. LVP mode cannot ch= ange=20 the LVP config bit. This prevents an LVP programmer from making the ch= ip=20 not programmable with said LVP programmer. 4) When LVP config bit is set, RB3 must be held low except during LVP=20 programming. So that means that RB3 must be held low during program=20 execution and that RB3 is unavailable during execution. It's the only=20 design mistake I see in the whole process. LVP should have been assign= ed to=20 a end pin of a port instead of a middle pin. 5) There is an errata sheet that stipulates that RB3 should be held low during HVP programming even if the LVP config bit is off. It implies t= hat=20 the chip could be put into a weird mode if RB3 is high (or floating) w= hen=20 trying to program in HVP mode. Essentially the chip tries to go into L= VP programming mode before it makes it to HVP mode. You can find that errata sheet here: http://www.microchip.com/Download/lit/suppdoc/errata/80076b.pdf As a precaution I always tie RB3 to ground through a resistor even if = I'm building a HVP programmer for 16F87X parts. That's it. That's all there the rules for HVP/LVP programming on 16F87X p= arts. So here are the issues in answer to your specific question. 1) If it's an LVP programmer (setting RB3 to +5 as you propose) you canno= t=20 change the LVP config bit according to rule #2 above. 2) If it's an HVP programmer, you should ground RB3 through a resistor=20 (10k recommended in the errata sheet) so you would not set it to +5. An H= VP programmer would be able to change the LVP config bit. So there is no way to change the LVP config bit if RB3 is set to +5. Hope this helps, BAJ -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body