I'd like to use the Raspberry Pi to measure AC frequency. To keep the circuit as simple as possible, I wonder how much abuse the GPIO pins will handle.
PIC and AVR microcontrollers have protection on all their inputs, in the form of a pair of diodes from ground to pin, and pin to Vcc. This is from the ATmega328P:
These diodes make it safe (if unadvisable) to connect the pin directly to a higher voltage AC supply, with just a single high-value resistor.
I would still limit the voltage with an external zener, but that leaves the waveform in the range -0.6 to +5.1 V. I'd rather not divide it down with resistors, as this would lower the input impedance and make it less sensitive.
Does the Raspberry Pi have clamping diodes on each GPIO pin? If so, what is the maximum current that they can take? If not, what is the safe input voltage range - is it only 0 to 3.3 V, or can it be -0.5 to 3.3 V?