17
\$\begingroup\$

If I use the internal 1.1V reference for the ADC, and my Analog input exceeds 1.1V, lets say 2.5V, is that harmful to my microcontroller? Or will ADC value simply clip (to 0x3FF) at 1.1V?

For convenience, I am including an excerpt block diagram from the ATMega328 datasheet.

enter image description here

\$\endgroup\$
  • 3
    \$\begingroup\$ Speaking from experience alone, not from datasheet references, so be careful: I've used internal ref and accidentally connected ADC pin to 4 Volts+ for hours. It'll clip, but won't kill the MCU. \$\endgroup\$ – Anindo Ghosh Dec 11 '12 at 19:42
12
\$\begingroup\$

The datasheet has your answer in section 24.5.2:

The reference voltage for the ADC (VREF) indicates the conversion range for the ADC. Single ended channels that exceed VREF will result in codes close to 0x3FF. VREF can be selected as either AVCC, internal 1.1V reference, or external AREF pin.

A voltage reference in a microcontroller is not the same as a voltage limit. The voltage reference (in this case) is used by the ADC to perform a comparison, and the microcontroller appears to be designed to allow you to exceed this amount.

You never want to exceed the voltage limit (in this case, that would be AVcc, the ADC's analog power supply). Microcontrollers have built-in protection diodes to save your bacon if that happens, but generally speaking, one should design the external circuit so that it does not exceed the voltage limit. (This is a best practice; in some cases, one may have reasons to ignore it.)

\$\endgroup\$
  • 1
    \$\begingroup\$ Some very clever designs actually do rely on those protection diodes. I've seen an RFID tag that was powered by a coil connected to VCC through the protection diodes. \$\endgroup\$ – NickHalden Dec 11 '12 at 20:14
  • 2
    \$\begingroup\$ In the section "Electrical Characteristics" it lists the Absolute Maximum voltage on any pin except reset as being Vcc+0.5V. Then however, in the subsection on ADC, it states ADC VinMAX = Vref. So while I agree it seems as though maybe it's okay to exceed Vref, the datasheet is far from clear on the issue... \$\endgroup\$ – Peter Gibson Feb 16 '15 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.