ADC reading higher voltage than Vdd?

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

ADC reading higher voltage than Vdd?

Post by hyperion007 »

Hi,

Just a quick question. If a PIC has 5.02V at Vdd, what value would the 12-bit ADC show if the voltage on the ADC pin is 5.08V?

The problem is that I don't have a constant supply of 5.08V to use as reference on the +Vref pin
Last edited by hyperion007 on Sun Nov 03, 2013 10:09 pm, edited 1 time in total.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: ADC reading higher voltage than VCC?

Post by kersing »

You need to check the device data sheet to see if an input voltage above 5V (or Vdd) is actually allowed. If so, the value would be 4095 (there are 12 bits for values, so 2 ^ 12 values starting at 0, means 2 ^ 12 - 1 is the max)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: ADC reading higher voltage than Vdd?

Post by hyperion007 »

VDD + 0.3V
VSS - 0.3V
So I am well within the limits. And for the record, the ADC value does NOT roll over if the voltage read is slightly higher than VDD.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ADC reading higher voltage than Vdd?

Post by medelec35 »

hyperion007 wrote:DC value does NOT roll over if the voltage read is slightly higher than VDD.
ADC never rolls over, it only reaches maximum value or 0.

It is anly when variables are used in calculations they can roll over or roll under< Could be a made up word :p

Martin
Martin

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: ADC reading higher voltage than Vdd?

Post by Brendan »

Just came across this thread while browsing.

For general future reference, the +0.3V above Vdd and -0.3V below Vss relate to absolute maximum limits governed by protective diode input structures, and has nothing to do with functional performance.

To guard against input spikes and ESD in general, MOS inputs commonly employ two reverse-biased diodes in non-RF applications. Consider the 'upper' diode with cathode to Vdd, the 'lower' diode with anode to ground, and the junction between the two connected to the input in question. To cut a long explanation short, the absolute maximum ratings above Vdd or below Vss relate only to the voltage where the natural forward-voltage characteristics of the protection diodes limits the forward current to within safe boundaries (at the quoted max/min voltage) and avoids diode damage.

At best the ADC range will apply to the available supply voltage, where the diode-based input limitations have no bearing whatsoever on designed input function.

Hope this helps :)


All the best,

Brendan

Post Reply