[snip] > By the way, does anyone have any idea how much current it takes to > damage a > PIC with excess VDD? For example, if a PIC were connected to a +24 > supply > through a 1meg resistor, would it fry or would it safely clamp the > voltage > to something reasonable? > > > I've seen many such designs in mags, and it's scary. You have this > PIC > > running at 5 V from a 78L05, and an input or output going through a > > resistor to +12V or whatever. The resistor is dimensioned to limit > the > > current into the PIC input pin. However, if the PIC sleeps then the > design > > current flowing through the resistor raises the VCC to almost the > level of > > the higher voltage, due to the low current drain of the part.... the > > regulator opposes absolutely no resistance to this. > > Some regulators do offer some sinking capability; others don't. Any > design > which relies upon that behavior, however, may fail when a "drop-in > replace- > ment" regulator is substituted. > It is not uncommon to connect a reverse-polarity diode across the regulator in order that any bypass capacitors connected to the regulated side don't discharge through the regulator when power is turned off. If the regulator is powered from a transformer and a bridge, then this will sink voltage quite nicely. The protective diodes ought to be able to handle several milliamps quite nicely without a problem so a 1M resistor to 24V will not even remotely damage them. In fact, there are mains-powered circuits which connect 4.7M from 240V to the PIC - this will cause around 50uA of current which is well within specification.