You have your microswitch connected to the LVP pin. The PIC isn't entering programming mode unless the LVP pin is held low. Yes, yes, I know you have LVP turned off, but still, there it is. Mike H. On 4/20/06, Peter Todd wrote: > I've got a minor project using a 16lf88 running at 3V with some LEDs > attached to PORTA and PORTB and a microswitch to cycle between display > patterns. Dead simple thing, a client just needed a mockup of a bike > light. The circuit is equally simple, LEDs connected to ground and the > pins, all LEDs setup to consume 5ma (white or red w/ resistor) The power > source is two fresh 3V lithium's in parallel. Finally the normally open > microswitch is connected between ground and RB5. I have the weak pullups > enabled. > > The problem is that ICSP doesn't work unless the microswitch is pressed > *down*. This happens even when the PIC is completely out of the circuit, > and the only thing connected is the ICSP pins and my microswitch via > jumper cables. (and the capacitor, I just soldered it on directly) This > has happened with two seperate PIC chips and seems very reproducable. > The programmer works fine on different code, but once I program the > firmware in, I simply have to have that switch pressed down for ICSP to > work. > > My quite short firmware is attached. I got everything working for the > client, but I'd love to figure out what the root cause of this was. > > > Incidentally, I think this is the first post I've made to piclist about > pic chips rather than tricked-out scooters or very large numbers... I've > been subscribed for about 6 months I think... > > -- > pete@petertodd.ca http://www.petertodd.ca > > > -- > 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