Ian Chapman wrote: > It occurred to me that I could use a spare input (which I don't have at > the moment :-) to allow my code to sense that a programmer is connected > and therefore keep the output lines at a high-impedance state. I don't > think there's an automatic way of doing this, though -- as far as the > PIC is concerned, if the code is running then it isn't in programming > mode (although Vdd may be raised to +5V, which is the issue here). No, programming doesn't work that way. The programmer should never allow the code to execute. This means Vpp will always be 0V or 13V (or whatever the programming voltage) whenever Vdd is on. For this very reason, PICs that require Vdd before Vpp have a maximum rise time spec on Vpp. This guarantees that Vpp is not in the normal operating transition region long enough for any code to execute. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist