AT90S/LS4434 and AT90S/LS8535
61
connection between the Analog Comparator and the Input Capture function is given. To make the comparator trigger the
Timer/Counter1 Input Capture interrupt, the TICIE1 bit in the Timer Interrupt Mask Register (TIMSK) must be set (one).
•
Bits 1,0 – ACIS1, ACIS0: Analog Comparator Interrupt Mode Select
These bits determine which comparator events trigger the Analog Comparator interrupt. The different settings are shown in
Table 26.
Note:
When changing the ACIS1/ACIS0 bits, the Analog Comparator interrupt must be disabled by clearing its interrupt enable bit in
the ACSR register. Otherwise an interrupt can occur when the bits are changed.
Caution: Using the SBI or CBI instruction on bits other than ACI in this register will write a “1” back into ACI if it is read as
set, thus clearing the flag.
Analog-to-digital Converter
Feature list:
•
10-bit Resolution
•
0.5 LSB Integral Non-linearity
•
±2 LSB Absolute Accuracy
•
65 - 260 µs Conversion Time
•
Up to 15 kSPS at Maximum Resolution
•
8 Multiplexed Input Channels
•
Rail-to-rail Input Range
•
Free Running or Single Conversion Mode
•
Interrupt on ADC Conversion Complete
•
Sleep Mode Noise Canceler
The AT90S4434/8535 features a 10-bit successive approximation ADC. The ADC is connected to an 8-channel Analog
Multiplexer that allows each pin of Port A to be used as an input for the ADC. The ADC contains a Sample and Hold Ampli-
fier that ensures that the input voltage to the ADC is held at a constant level during conversion. A block diagram of the ADC
is shown in Figure 45.
The ADC has two separate analog supply voltage pins, AVCC and AGND. AGND must be connected to GND and the volt-
age on AV
CC
must not differ more than ±0.3V from V
CC
. See “ADC Noise Canceling Techniques” on page 67 on how to
connect these pins.
An external reference voltage must be applied to the AREF pin. This voltage must be in the range 2V - AV
CC
.
Table 26.
ACIS1/ACIS0 Settings
ACIS1
ACIS0
Interrupt Mode
0
0
Comparator Interrupt on Output Toggle
0
1
Reserved
1
0
Comparator Interrupt on Falling Output Edge
1
1
Comparator Interrupt on Rising Output Edge