The maximum input voltage of a MSP430 is Vcc+0.3V. What is the result of the ADC if I provide Vcc+0.3V as input? Is the digital output of the ADC just the maximal value?


4 Answers 4


The \$V_{CC} + 0.3V\$ is Absolute Maximum Ratings. It's an often made error, but you're never supposed to operate your device under these conditions. Even if the numbers suggest that these are acceptable values, continuous operation at those values may damage the device.
That said, most types of ADC, including MSP430 sigma-delta, will give a maximum reading if the input voltage is higher than the reference. The reason is that the ADC will compare a voltage derived from the reference (either through integration, like in sigma-delta, or through charge redistribution, like in SA) against the input voltage, and since this will be higher than the reference this voltage will never reach the input's level.

It's good design practice to have a keen eye for such maximums. If you know that the input voltage may go higher than the ADC reference, you better scale it down a bit using a voltage divider. Not only do you prevent damage, but you'll also be sure to be able to measure over the full range. If the reference voltage is 3.6V, then an input voltage of 3.6V and one of 3.7V would give you the same reading, but you won't be any wiser.

  • \$\begingroup\$ Ok I understand. The cell shouldn't have a voltage 3.9V anyway. I'm just thinking about some failure events, not continuous operation. The thing is, now I can probably get away with using a divider if I set Vcc to 3.6V. \$\endgroup\$
    – duedl0r
    Jul 7, 2011 at 10:31
  • 5
    \$\begingroup\$ @duedlor - I understand your question has been answered, but you're too quick accepting this answer! Others may have good answers too, but not be motivated to post them once an answer has been accepted. Give it some time, the question has only 4 views! \$\endgroup\$
    – stevenvh
    Jul 7, 2011 at 10:36
  • \$\begingroup\$ ok, removed it hehehe :) and thanks for your replies..more questions are coming :) \$\endgroup\$
    – duedl0r
    Jul 7, 2011 at 11:17
  • \$\begingroup\$ @Stevenvh, I think that is in general good advice, but if answer their question completely and accept it they can always accept another. I think your advice is good but some users want an answer just like yours. In this case I know this well, but competing your answer is not worth it. If I had notes I would give them to you in a comment and allow you to incorporate the small amount and give the reward to the poster that did the work. \$\endgroup\$
    – Kortuk
    Jul 7, 2011 at 12:49

I'll add an answer because this topic is one of my crusades in life.

This is "rather long +++", as having a full background to this MAY persuade people to NEVER do it. It hasn't worked so far :-)

Applying a voltage above or below the specified range for normal operation MAY result in random unexpected events occurring. This is something that you should NEVER do without a good appreciation of what can happen and why it can happen and a willingness to accept the potential consequences.

Because: Most pins on most microcontrollers are protected against over or under voltage by having an "intrinsic" diode between the pin and the relevant supply rail. This diode is usually reverse biased in normal operation but will conduct current to Vdd for voltages above Vdd and an equivalent diode will conduct current to ground for pin voltages below ground. In the following discussion I will refer only to the diode from the pin to Vdd - the same principle applies for the pin-to-ground diode.

As noted above, this intrinsic-diode or body-diode or protection diode is usually reverse biased. When it is reverse biased it has essentially no effect on operation. As the pin voltage is raised above Vdd the diode starts to become forward biased and starts to conduct. The diode is called an intrinsic diode as it is formed as a natural part of the mechanical architecture of the IC. It is possible to make pins that do NOT have this intrinsic diode but they require an additional processing step so take room and cost money and the pin is then unprotected so pins are liable to have this diode unless there is a special need to not have it. An example is if a pin has high voltage applied during programming (say 12V applied to a pin on a 3V or 5V product. Also, there are construction methods that do not have this intrinsic diode (such as silicon on Sapphire) but these are expensive niche processes.The reason that it is important that the diode is "intrinsic" is because this means it is not well defined in position on the IC die and it's precise electrical connection to surrounding pins and parts is not well defined - all this is almost completely irrelevant when reverse biased. However, when it is forward biased current will flow to Vdd BUT the path that it gets there by is not formally known or designed.

So - If excessive external voltage is applied to the pin the diode will conduct and clamp the pin to a diode drop above Vdd. Or try to. This is its "protection" function. When this happens you are usually not too concerned about whether the processor is operating properly as you have a significant fault condition that needs fixing. The processor may malfunction as it is being operated grossly outside spec, but as long as it is not damaged by the clamped over voltage and can be restarted OK when the fault is removed then there is no great problem. So far so good.

If the diode is biased into low level conduction some extremely small currents will flow. These may be well below the level that a pin will handle usually and well below what it will handle without damage. BUT where they flow is unknown. They may flow into the ADC reference circuit and reduce ADC accuracy. They may charge or discharge floating circuitry nodes which cause designed or spurious MOSFETS to turn on unintentionally or may cause them to stay turned on seconds or minutes or even hours after the current has been removed.

If you look at the formula and a plot of diode junction Voltage against current you'll see that, while a diode is never off at any applied voltage, it starts to get noticeable (albeit tiny) from about 0.3 V on. I have seen silicon transistor circuits which operate with Vbe (diode junction) voltages in the 0,4 ~ 0.5 V range. Noticeably below the expected 0.6 + V range.

So, because of the undesigned and unknown current paths, injecting currents in the uA to mA range into a body diode can lead to some function of a processor being compromised, or of a system "very occasionally, faulting in apparently random ways.

MANY people will tell you that say 0.5 mA injected into a body diode will never cause problems. They are wrong. In a given example the processor may never 'fault' - but equally easily may lead to utterly arcane, non repeatable symptoms which defy logical explanation or analysis.

I qualified all this at the start with comments on understanding why and what and a willingness to accept consequences. If this is a one off hobby project and your time is utterly valueless and you remember this post then a pin rise of 0.3V MAY be acceptable with due testing and burn in. And it may not. 0.4V is well into the danger area. If this is a commercial product then "just don't do it", unless you are large enough to be able to derive trustworthy empirical data - essentially making your own data sheet. YMMV - but almost certainly wont.

  • \$\begingroup\$ Maybe it's easier to persuade people if you cut the story a bit shorter :-) \$\endgroup\$ Jul 7, 2011 at 15:39
  • \$\begingroup\$ Thanks, interesting read. I guess I have to build a divider which lowers the voltage a bit. I calculated the possible inaccuracy using 2% or 5% resistors, and it's not that bad, so I probably go for it. \$\endgroup\$
    – duedl0r
    Jul 7, 2011 at 15:46
  • 3
    \$\begingroup\$ 1. I'm (almost) always excessivley verbose 2. BUT no, alas, the less you tell people about the subject the quicker they forget why it's a bad idea - based on too many decades of trying to "sell" this to people. \$\endgroup\$
    – Russell McMahon
    Jul 7, 2011 at 15:51
  • 2
    \$\begingroup\$ @Russell: do you mind if I edit for typos? +1 for giving a very good perspective. \$\endgroup\$
    – Jason S
    Oct 9, 2011 at 22:59
  • 1
    \$\begingroup\$ @BernhardHofmann - An edit 42 months on! :-). And well worth while. Many thanks. I looked at your edit and was astounded to see how many typos there were. Obviously an early a.m. hours post (as is this comment - 3:20am). On this occasion I'm up after 1.5 hours sleep to finish a job - and will check for typos. \$\endgroup\$
    – Russell McMahon
    Feb 3, 2015 at 14:21

You will get the maximum 10Bit answer if you put Vcc+ onto your ADC pin. As stevenh pointed out that these are the maximum rating and not the recommended operating Voltages. From the data sheet, the input voltage should be 0V to Vcc

And direct from the data sheet P27

The analog input voltage range must be within the selected reference voltage range VR+ to VR– for valid conversion results.

this is assuming that you have a msp430f2012 or msp430g2x31


For what it's worth, some manufacturers actually do tell you what happens if there is current flowing through the intrinsic diodes of the part. Microchip's dsPIC33EP256MC506, for example, has electrical specs DI60a-DI60c that state that individual I/O pins can take 5mA of "injection current" as long as the total in all pins is less than 20mA, and there's a note that says

Non-zero injection currents can affect the ADC results by approximately 4-6 counts.

You'd have to check the specific datasheet for your part. If they don't give a spec, then technically you shouldn't allow any current to flow through the intrinsic diodes. (though in practice, under a microampere is probably ok in most cases)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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