Electronic – reversed bias diode on GPIO

atmegadiodesgpio

I was looking more into the GPIO pins of the ATmega328p and came across the simplified schematic of a I/O pin. The schematic includes two reversed biased diodes, one to the ground and one to the VCC. I/O Pin Equivalent Schematic

I could identify the use of the reversed biased diodes on the I/O pin.
What is the use of these diodes?

Best Answer

The diodes are protection devices against short transients and ESD.

If the pin is pushed higher than system voltage the diode clamps the pin to about 0.7v above system voltage. Same goes for the diode to ground. If the pin is pulled lower than ground then the diode clamps the pin to -0.7v.

In both cases the internals of the processor can withstand 0.7v above VDD and 0.7v below VSS and are protected. This does not mean that you can apply 10v to a 3.3v processor and expect it to survive.