Datasheet

134
2586N–AVR–04/11
ATtiny25/45/85
17.9 Noise Canceling Techniques
Digital circuitry inside and outside the device generates EMI which might affect the accuracy of
analog measurements. If conversion accuracy is critical, the noise level can be reduced by
applying the following techniques:
Keep analog signal paths as short as possible.
Make sure analog tracks run over the analog ground plane.
Keep analog tracks well away from high-speed switching digital tracks.
If any port pin is used as a digital output, it mustn’t switch while a conversion is in progress.
Place bypass capacitors as close to V
CC
and GND pins as possible.
Where high ADC accuracy is required it is recommended to use ADC Noise Reduction Mode, as
described in Section 17.7 on page 132. This is especially the case when system clock frequency
is above 1 MHz, or when the ADC is used for reading the internal temperature sensor, as
described in Section 17.12 on page 137. A good system design with properly placed, external
bypass capacitors does reduce the need for using ADC Noise Reduction Mode
17.10 ADC Accuracy Definitions
An n-bit single-ended ADC converts a voltage linearly between GND and V
REF
in 2
n
steps
(LSBs). The lowest code is read as 0, and the highest code is read as 2
n
-1.
Several parameters describe the deviation from the ideal behavior, as follows:
Offset: The deviation of the first transition (0x000 to 0x001) compared to the ideal transition
(at 0.5 LSB). Ideal value: 0 LSB.
Figure 17-9. Offset Error
Output Code
V
REF
Input Voltage
Ideal ADC
Actual ADC
Offset
Error