At 05:10 PM 2/4/2003 -0800, you wrote: >I hope this isn't embarrasingly simple. > >I need to have a PIC port drive a signal, referenced to ground, at 5V or >-5V, either sourcing or sinking up to 20 ma (per bit, 8 bits). >Furthermore, it would be prudent, but not necessarily required, to have >galvanic isolation between the input and output, as the output may be >subject to static electricity. > >This would be easy to build with discrete parts, using two FETs arranged >similarly to a CMOS output, but with the lower one connected to -5V >instead of ground. Depending on which FET is conducting, the driver >output gets "hooked" to +5V or -5V. (And opto FETs could be used for >isolation if needed.) > >To save parts count (16 FETs!) and $$$, I'd rather go for an integrated >approach. There are many quad 1:2 analog multiplexers out there, which >is what the discrete circuit above really is. A couple of these could >switch eight outputs between +5V and -5V inputs very easily. >Unfortunately, none seem to be able to handle the -5V swing on an analog >input port. The TI SN74CBT3257, for example, has absolute max ratings >of -0.5V to 7V analog input swing: You could consider 3 74HC4053s. No isolation, but < 80 cents total. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body