# AREF above operating voltage of the microcontroller

I’m operating an ATMega32 at 3v3 through USB and a LDO.

Is it possible to connect the AREF pin directly to the USB voltage of 5V so that I can read voltages between 0 and 5V when reading from the analog pins?

• What does the datasheet say? – Elliot Alderson Jan 8 at 15:22
• The microcontroller definitey can operate at 5V same applies to AREF it can operate under 5V, it is unclear to me if it can have a higher voltage than the one being fed through the VCC pins. – Ned Jan 8 at 15:28
• Indeed this information will be in the datasheet, but since it might be difficult to find I'll help a bit: The datasheet will state that the voltages at the uC's inputs/outputs cannot exceed the voltage on the VDD pins. The reason for this is the ESD protection diodes. As soon as the voltage at AREF becomes higher than VDD + 0.5 V the AREF's ESD diode will start conducting. If you want a 5 V input range either power the uC with 5 V or use a voltage divider to lower the input voltage to the ADC. – Bimpelrekkie Jan 8 at 15:28
• Thank you! I’ll use a voltage divider as it’s the best solution in my case. – Ned Jan 8 at 15:31
• To learn more about what issues the ESD diodes can cause, watch this EEVBlog video: youtube.com/watch?v=2yFh7Vv0Paw Making this and comment above an answer because, well it is. – Bimpelrekkie Jan 8 at 15:32

Indeed this information will be in the datasheet, but since it might be difficult to find I'll help a bit:

The datasheet will state that the voltages at the uC's inputs/outputs cannot exceed the voltage on the VDD pins.

The reason for this is the ESD protection diodes. As soon as the voltage at AREF becomes higher than VDD + 0.5 V the AREF's ESD diode will start conducting.

So if you connect 5 V to AREF, the VDD supply of the uC will be pulled up to about 4.4 V ! But you supplied 3.3 V via an LDO. Yes, then the LDO will do nothing.

If you want a 5 V input range either power the uC with 5 V

or

use a voltage divider to lower the input voltage to the ADC.