ATtiny25 Bipolar Input Selection

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According to the errata, the pin definitions for positive and negative differential inputs was corrected in the data sheet, however on revision 2586Q, Page 123 says ADC0 or ADC2 can be selected as positive and ADC0, ADC1, ADC2 or ADC3 can be selected as negative which gives four combinations of inputs. Page 124 further states that if ADC0 or ADC2 is selected as both the positive and negative input then the offset in the gain stage can be measured directly. So it appears the possible combinations are:

ADC0/ADC0 -> offset measurement

ADC2/ADC2 -> offset measurement

ADC0/ADC1, ADC0/ADC2, ADC0/ADC3 -> differential measurement

ADC2/ADC0, ADC2/ADC1, ADC2/ADC3 -> differential measurement

Table 17-4 shows for differential measurement:

ADC2/ADC2 (1x)

ADC2/ADC2 (20x)

ADC2/ADC3 (1x)

ADC2/ADC3 (20x)

ADC0/ADC0 (1x)

ADC0/ADC0 (20x)

ADC0/ADC1 (1x)

ADC0/ADC1 (20x)

With eight MUX combinations taken up by single polarity inputs there are not enough MUX combinations left for the other possibilities. It appears there actually only two combinations (ADC2/ADC3 and ADC0/ADC1) useable for differential pinputs. Page 122 states "the differential input (PB3, PB4 or PB2, PB5) (that is ADC3, ADC2 or ADC1, ADC0) is equipped with a programmable gain stage ...". I presume Page 123 should have stated "ADC3 or ADC1 can be selected as negative input to the differential ampifier", yes?

A secondary question, since one bit is taken up by the sign in a differential measurement, if measuring a bridge output where one side of the bridge is always positive relative to the other (absolute pressure measurement) the 10 bit accuracy could be maintained by using single conversion on both sides of the bridge and subtracting the result, yes?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According to the errata, the pin definitions for positive and negative differential inputs was corrected in the data sheet, however on revision 2586Q, Page 123 says ADC0 or ADC2 can be selected as positive and ADC0, ADC1, ADC2 or ADC3 can be selected as negative which gives four combinations of inputs.

I'm losing you a bit.  What "errata" is this?  I have the rev. Q datasheet open.  That appears to be the latest listed on the Atmel Web site.  On the first page:

ewline"> – 10-bit ADC
• 4 Single Ended Channels
• 2 Differential ADC Channel Pairs with Programmable Gain (1x, 20x)
• Temperature Measurement

 

... so only two pairs indicated there, as in the ADMUX description.  Table 17-4 corresponds, doesn't it?

Channel 2 vs. 3 (or itself); channel 0 vs. 1 (or itself).

 

So no, I don't think you can do channel 0 vs. 2 or channel 0 vs. 3.

 

 

ADC2 or ADC0 can be selected as positive input and ADC0, ADC1, ADC2 or ADC3 can be selected as negative input to the differential gain amplifier.
 

I think you are reading too much into that sentence.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The errata in the "sticky" on the mega/tiny forum page where the ADC and pin designations were wrongly associated. So ADC0 and ADC2 can only be used as the negative input when measuring the gain offset, not differential measurement. You are right, I read too much into the sentence. They all can be used as the negative input but not differential and when used for offset measurement there is no external input.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That was corrected in the datasheet 9 years ago, right?

Device: ATtiny25/45/85
Summary: Error in pin assignments for ACD inputs.

Table 19-4 on page 137 of the ATtiny25/45/85 Preliminary Complete (Revision C) data sheet shows (in several places) that ADC2 is on PB3, and ADC3 is on PB4. The port bit assignments are reversed.

That is, in all cases in the table ADC2 (PB3) should be replaced with ADC2 (PB4) and ADC3 (PB4) should be replaced with ADC3 (PB3).

Pin assignments are shown correctly elsewhere in the data sheet.

Edit: Has been corrected (as of Rev D?).

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.