Help sought on this issue. Working on a 18F252 based programmer/ICD Need to switch 5V on/off from a PIC. Off means Hi-Z Need 50mA min though switch. In the Hi-Z state the switch circuit must be able to isolate the PIC from 13V that may appear on the output of the switch from other sources. Use as few components as reasonable (3-4 range if possible.) My idea is to use a PNP transistor wired as a Common Emitter (that is Emitter to 5V.) Between this and the pic will be a base buffer resistor of around 4.7k nominal. Pull the base 0.6-0.7 lower than 5V to switch 5V to the collector. All fine so far, this idea has been standard for years. Now here's the rub. Put 13V on the collector and it will forward bias the base-collector junction and the 13V will appear at the base lead (less junction drop.) My proposed solution is to put a 3.3V zener between the buffer resistor (PIC side) and the 5V supply. The I/O pin on the PIC will be RA4 as this is an OC type and will not mind the 3.3V clipping at all. See http://users.pipeline.com.au/newfound/proposed.gif I know I could just use a different I/O line and use the internal diode to clip the excess voltage but this does not sit easy with me. Would rather use an external diode and keep the voltage on the pic I/O to less than its supply, not 0.65V higher. Nice in theory so far. Now the questions that fill my head. Firstly is it considered bad design to cause a forward bias condition in the PNP transistor like this does? If so why? (Pardon me if I'm in complete ignorance, I have no formal EE qualifications.) Could this destroy the transistor eventually? Is there a better way? An NPN emitter follower would work as the 13V reverse biases the base-emitter junction but I do not want the 0.65 volt drop. Could compensate with a 5.6V zener on the base and wire the collector to 13V but then would need a buffering stage between the base and the PIC. Nice circuit (used to switch VPP on the parallax/techtools picwriter and the WARP-17,BTW) but would rather keep component count down. See http://users.pipeline.com.au/newfound/voltsw_w17.gif I do not have knowledge of FETs etc and maybe there is a ready made solution by using a more exotic type transistor? Anyone with comments? Regards, Jim Robertson NEWFOUND ELECTRONICS NEWFOUND ELECTRONICS mailto:newfound@pipeline.com.au http://www.newfoundelectronics.com MPLAB compatible PIC programmers. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body