0

i need to make the Microcontroller read an analog value that has range min=0.1 to .25 volt max. I'm using AVR Microcontroller "ATmega32" , i know that the ADC in this uC has configure called "differential input" with "gain" option -that is what i understand from the datasheet in the table 26-4 page 276 and 277 from the datasheet in the A link or attached picture picture1kindly correct my information if I'm wrong-

  • I ask if the gain for the differential channels is a solution to amplify the small range analog volt ? if not kindly list a solution.
  • what is the effect of "reserved" if i used the configure ADC1 positive differential , ADC0 negative and gain 10x. the highlight config in the picture in other word what is reserved mean here .

    MUX[4:0]=01001

i read the answers of this question but it doesn't seem to be an answer to my second confused about reserved here?

Community
  • 1
  • 1
Hussein
  • 41
  • 4

2 Answers2

1

Yes, you can use differential mode to amplify the voltage by 10 or 200 times. It looks like you want the 10x option. You need to choose a reference voltage to measure against. The mcu has an internal 2.56 V reference that will work for you with 10x.

From the table, there are two 10x options to choose from. ADC0 as negative and ADC1 as positive, or ADC2 as negative and ADC3 as positive. Connect your leads to the right pins.

There are also 10x options where the positive and negative leads are the same pin. This looks impossible, as this should always be 0. It actually measures the offset error that the internal circuitry could not eliminate. The manual describes how to use this offset to correct your measured values a few pages earlier. Take a reading with the negative pin chosen twice, then use that value to correct the differential readings.

The table lists some values as reserved. These are values used for Atmel testing of the chip, or left open for future use. This is just saying that the three reserved values in the table might be used for single-ended input by Atmel, or on a future version of the chip, as a warning to you so your code won't break when you upgrade to a new chip later.

uncleO
  • 7,997
  • 2
  • 20
  • 37
  • - your words mean that i can use differential mode in this configure `MUX[4:0]=01001` without worrying about "REVERSED" in the single mode column - i read it reserved but i have typed it wrong i fixed it – Hussein Mar 29 '16 at 20:58
0

Reserved means that if you configure your ADC into Single Ended Input mode you cannot use the bit patterns when setting the MUX[4:0] bits.

RedX
  • 13,656
  • 1
  • 46
  • 69