You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| megaAVR 0 | 8-bit | 10-bit | 0.2-1.5 | 1-1.25MHz| 13-bit | (1) This is the last piece of text in this document known applicable to the mega0. We don't have a core for those nor do we plan one. Use MegaCoreX
| AVR DU | 8-bit | 10-bit | 0.125-2 | 1-1.4MHz | 13-bit | Single ended. Single ADC. Text makes references to ADC1, which does not exist - looks copied from SD. Or 1-series.
17
-
| AVR SD | 8-bit | 2x 10-bit | 0.125-2 | n/a | 13-bit | Single ended, Dual ADC, looks like 2 copies of the one they gave the DU. Support **not** planned due to irrelevant niche features which impede normal development.
| AVR EC | 8-bit?| 12-bit?| 2/6 ? | 2-2.5MHz | 17-bit | 100% speculation, but considering rumors of it's niche, this Ex looks likely to get the Ex ADC
25
-
| AVR LA | 8-bit | 10-bit | 0.125-2 | 1-1.4MHz | 15-bit | It's getting the DU version, but they've extended accumulation to 1024 samples, and it's getting prescaler settings of /2 to /32, instead of the selection with less granularity between /2 and /64
26
-
27
-
`*` 6 MHz with external or Vdd reference, 3 MHz with internal.
28
-
`**` - "After the USB natives were done with him, you could barely recognize him. They'd cut TCD clean out of his chest, torn off and roasted his MVIO for a villiage feast in honor of the 3.3v logic levels of USB data lines... and ah - removed two bits from his "analog-to-digital converter" *damn... I tried to tell him they weren't friendly, and that negotiations wouldn't go well.... but he just had to give peace a chance* "Well, to his credit, they do seem to have avoided an outright war with the USB natives" *But at what cost? Rsze their primitive hovels, execute the relevant designers and use a tried and true USB stack from any of the several lines of...!*
29
-
"Remember what they did to the Atmellists! The u6 tried to go in and negotiate... They let the U4 out, the U2 - only after taking off his A/D converter, and the u6 himself... well... He was in no condition to go into production after that."
30
-
*These uppity peripherals! We need to get tough*
31
-
32
-
Notes:
33
-
1. This part has a very awkward set of reference voltages (4.3, 2.5, 1.1, 1.5, 0.55). For the ultra low reference voltage, use analogSetClock() to ensure that the clock speed is within the much lower sped'ed range of 65-200 kHz. You may also want to lower sample duration since that's what it's denominated in. All other parts have 1.024/2.048/4.096/2.5
34
-
2. No external reference on 0-series and 1-series below 16k.
35
-
3. 16k (1+series) parts are blessed with a number a boons. One of them is a second ADC. I think the intent was to provide a way to approximate having a differential ADC by triggering both at once (well, one of the intents, another one was because the ADC0 is taken over by the PTC if that is in use.
36
-
5. The Dx "differential" is still limited to voltages below Vref. It's thus much like startig two ADCs simultaneously and subtracting the result, which is what I think it does
37
-
6. This is a REAL differential ADC. Max V<sub>Ain</sub> = Vdd + .1 or .2V and for useful readings their difference must be smaller than VREF. The tiny2 has some mysterious tunables, proper tuning of which is unclear. Offset error is disappointingly high, which Microchip noticed and introduced sign chopping (and removed a mysterious tunable or two) in the EA series, which should help significantly.
38
-
39
-
The differential ADC on the Dx-series is disappointing.
40
-
41
-
42
-
### Crystal Ball Gazing
43
-
I predict a bright future for both the 10-bit ADC used in the DU and the 12-bit one used in the Ex.
44
-
45
-
I'm less optimistic for the DA/DB/DD, which I think was a stopgap to give something like a differential ADC before the Ex ADC was ready.
11
+
12
+
13
+
14
+
| Part family | Min. Res. | Max. Res. | CLK Max | CLK used |Ext| Max Ovrsamp Res. | Extras
| megaAVR 0 | 8-bit | 10-bit | 0.2-1.5 | 1-1.25MHz| | 13-bit | (1) This is the last piece of text in this document known applicable to the mega0. We don't have a core for those nor do we plan one. Use MegaCoreX
| AVR DA | 10-bit | 12-bit | 0.125-2 | 1-1.4MHz | X | 15-bit | (5) "Differential" ADC
21
+
| AVR DB | 10-bit | 12-bit | 0.125-2 | 1-1.4MHz | X | 15-bit | (5) "Differential" ADC
22
+
| AVR DD | 10-bit | 12-bit | 0.125-2 | 1-1.4MHz | X | 15-bit | (5) "Differential" ADC more pins can be ADC pins.
23
+
| AVR DU | 8-bit | 10-bit | 0.125-2 | 1-1.4MHz | X | 13-bit | One single-ended ADC. Contains references in datasheet to non-existent ADC1, implying crossfertilization with the SD-series, which has 2 ADCs of this design.
| AVR EC | 8-bit | 12-bit | 2/6 | 2-2.5MHz | X | 17-bit | (6) Looks likely to be getting the good one from the EA-series.
27
+
| AVR LA | 8-bit | 10-bit | 0.125-2 | 1-1.4MHz | X | 15-bit | A slight upgrade from the DU-version, with more prescaler granularity, downgrade from other Dx or Ex.
28
+
| AVR SD | 8-bit | 2x 10-bit | 0.125-2 | n/a | X | 13-bit | Single ended, Dual ADC, looks like 2 copies of the one they gave the DU. These parts are not supported and no support is planned, wrong niche for us.
29
+
30
+
Ext = External Reference
31
+
32
+
33
+
### Types of ADC
34
+
There is one difference between how the parts with the new Ex-series ADC, and the Dx-series one.
35
+
36
+
On parts with true differential ADC (the Ex and 2-series), when making diffferential measurements, the analog voltage requirement is:
37
+
```
38
+
-0.1V <= Vin <= (Vdd + 0.1)
39
+
```
40
+
41
+
On the parts without the new ADC, if they do have a differential mode, the analog voltage requirement is:
42
+
43
+
```
44
+
0V <= Vin <= Vref <= (Vdd - 0.4)
45
+
```
46
+
47
+
That means that a Dx-series measuring two voltages above 2.048 v differentially, even if they're very close to each other, can only use the 4.096v reference, because Vin must be below VRef. The accuracy is limited.
48
+
49
+
On an Ex-series, you don't need to use a VRef larger than the largest voltage being measured - so since you may be measuring a very small value (for example, across a current shunt). In the same situation, the Ex can use the 1.024v reference, getting 4 times finer resolution, **without even enabling the programmable gain amplifier**
50
+
46
51
47
52
## Reference Voltages
48
-
Analog reference voltage can be selected as usual using analogReference(). Supported reference voltages are listed below. The references available on the Dx and Ex parts are chosen from the same list as the tiny2's got to pick from, but somehow they wound up in a different order on these parts. You should never have to use the numbers (though that's all those constants are), unless your code loses track of what reference it has selected
49
-
In some cases the voltage determines the maximum ADC clock speed. Call analogReference() before analogClockSpeed() to ensure that the analog clock speed is appropriate when any of these apply:
50
-
* You are switching between internal and external/VDD reference on an Ex/2-series
51
-
* You are using the half volt reference on the 0/1-series, or switching from that to another reference
52
-
* You are on a Dx-series with an external reference of less than 1.8V
53
-
54
-
55
-
| tinyAVR (0/1) | Voltage | Minimum Vdd | Number | Notes
| `EXTERNAL` (Dx-series) | 1.8-VDD | VREF +0.5V | - | 6 | | Dx: Normal limits apply (see this document for DxCore for details)
76
-
77
-
78
-
You can test like `if(getAnalogReference()==INTERNAL2V500)`, but if you try to say, print them, you just get a number. That's what is shown in the last column: contains the numerical value of the constants representing these references. Don't use those, then nobody will understand your code - including yourself in two weeks. However, if you are printing the results of `getAnalogReference()` or `getDACReference()`, these are the numbers you will see.
53
+
Analog reference voltage can be selected as usual using analogReference(). Supported reference voltages are listed below. The "Number" column is the *numeric value* of this constant, which - like named constants in general - is cryptic when seen by human eyes during debugging if not documented. Note that the numeric values **have changed in 1.6.2** in order to allow for the same constants to be used with both DACReference() and AnalogReference() - on the DA/DB/DD, this came for free because the bitfields were the same. On the Ex, the AC and DAC use the VREF ordering, and the ADC uses a totally different ordering. This was handled improperly prior to 1.6.2 for the EA (the EB and DU were not yet supported, and in any event it rarely matters for them.)
54
+
55
+
| Summary | Lowest min Vdd | Highest min Vdd | Availability
0 commit comments