I have a PIC project, and am wondering how to condition some of the inputs to the PIC. Some of the inputs are well behaved, but others come from sources which have voltages which go outside the PIC's supply rails.
The PIC is a 16HV785 (datasheet at
The inputs in question will be at 5 volts when high, but will be between -4 and -12 volts when low. (they will be read as digital inputs)
My question is how to connect these inputs to the PIC
The easiest solution seems to be just to hook them to the PIC via a somewhat high value resistor and let the protection diodes keep the voltage near enough to Vss This is shown in the first drawing. This is the easiest method, and I would prefer to use this if it is good enough If this would work, what value resistor would you recommend?
The next easiest idea is to parallel the internal protection diode with an additional one. I don't know if this really buys me anything, since the voltage will still be a diode drop below Vss
My third idea was to maybe put a voltage divider after the diodes to raise the low voltage by around .7 volts this is the third drawing.
or rather than a voltage divider using 2 resistors, to use a resistor and a 2nd diode as in drawing four
Or should I do something totally different.
Martin Bakalorz
___ Source -|___|---------- to PIC
___ Source -|___|--+------- to PIC | - ^ | Vss -------+
___ Vdd - -----------|___|---+ | ___ ___ | Source -|___|--+----|___|---+-------+ to PIC | - ^ | Vss --------
___ Vdd - -----------|___|---+ | ___ | Source -|___|--+------|