> It is VERY bad to ground the person, it involves risk of electric shock > from anything not connected through a fault current breaker, including the > project's power supply. As far as I know, the only place where you can > ground the operator safely is in a production environment where the units > are not powered.... The common thing is a wrist strap connected to ground through a 1 meg resis- tor. This will let through enough current to prevent electrostatic charge from building up, but will limit current to well under a miliamp in case of accidental line contact (even with 250VAC, the RMS current is only 1/4mA). > There are chips that protect IO pins. Check MAXIM MAX336 and co. Such devices can be useful in some cases; in many cases they can be avoided with careful design. I personally like optoes for protecting I/O, but they aren't free; pretty oops-proof, though. > One thing ppl. keep forgetting when using PICs with external connections, > is the fact that the same bulk and protection diodes that allow a PIC to > be powered by its IO pins (featured elsewhere in this list), still work > when there is power applied to the Vcc and GND pins as it should. Since > most regulators cannot sink current, this can easily lead to a PIC being > powered by its (incorrectly designed) load, which can bring the VCC RAIL > TO FAR MORE THAN +5v. This can be a problem; even in cases where the PIC doesn't mind the extra voltage, other devices may squawk and cause bad things to happen. Also, an overly-high VDD is one of the few ways I've seen to destroy PICs while run- ning close to their specification (I accidentally ran a PIC 16F84 off 7.5 volts; oddly, it now works at higher voltages but won't run or program at 5V any more). > The cure is a zener connected between Vcc and GND > after the regulator, directly at the PIC power pins (Z5V6 or such), AND > the usual limiting diodes/networks at every concerned IO pin... else the > limiting diodes only supply power to the PIC... Depending upon the application and the number of I/O pins, I sorta like using a 5.1V zener on the I/O pins. That one component provides both ground and VDD clamping while avoiding the overvoltage-VDD problem. Otherwise, I just use a series resistor on inputs and make sure VDD goesn't get pulled too high (ex. power enough stuff from VDD that a minimal current draw is assured; on at least one occasion I used a dumping resistor from VDD to ground). 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.