Atmega328P resilience to spikes (negative and positve)

I'm struggling to find anything on the data sheet about this, although I may not be looking in the right place:

I am using a couple of digital input pins, to take digital readings in the loop (in the standard way). However the input signal isn't necessarily digital. This isn't an issue though. I do want to only receive digital results, regardless of the input.

However there's a chance the input signal may have small transients below 0V and above 5V. This is because the power rails for the input signal aren't 0-5V (they're -12 to 12).

What is the tolerance of the Atmega328P to transients outside 0-5V. I know that it can handle a steady voltage up to 5.5V.

I want to avoid a LPF to remove transients if poss, as under normal conditions there will be a square wave input and don't want to smooth the edges.


  1. Electrical Characteristics – (TA = -40°C to 85°C)

29.1 Absolute Maximum Ratings*

Voltage on any Pin except RESET
with respect to Ground ................................-0.5V to VCC+0.5V

*NOTICE: Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

So that would be -0.5V to +5.5V otherwise permanent damage may occur. -12V to +12V is well outside that range.

This seems germane... Protection

Perfect! Thanks for the info :slight_smile:

Recommend using schottky diodes to limit the excursion to less than 0.5V. An absolute maximum
is not a value you want to reach at all.

Alternatively if you are only sensing a signal a series resistor will limit the current through
the protection diodes, which will automatically prevent out-of-range voltage excursions. 4k7
will protection pretty well if your signals aren't too high-speed.

Similar discussion here about my garage door open detector.