AT89LP216-20PU Atmel, AT89LP216-20PU Datasheet - Page 55

no-image

AT89LP216-20PU

Manufacturer Part Number
AT89LP216-20PU
Description
MCU 8051 2K FLASH 20MHZ 16-PDIP
Manufacturer
Atmel
Series
89LPr
Datasheet

Specifications of AT89LP216-20PU

Core Processor
8051
Core Size
8-Bit
Speed
20MHz
Connectivity
SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
14
Program Memory Size
2KB (2K x 8)
Program Memory Type
FLASH
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2.4 V ~ 5.5 V
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
16-DIP (0.300", 7.62mm)
Processor Series
AT89x
Core
8051
Data Bus Width
8 bit
Data Ram Size
128 B
Interface Type
UART, SPI
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
14
Number Of Timers
2
Operating Supply Voltage
2.4 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
3rd Party Development Tools
PK51, CA51, A51, ULINK2
Development Tools By Supplier
AT89ISP
Minimum Operating Temperature
- 40 C
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Data Converters
-
Lead Free Status / Rohs Status
 Details
20. Analog Comparator
20.1
3621E–MICRO–11/10
Comparator Interrupt with Debouncing
A single analog comparator is provided on the AT89LP216. The analog comparator has the fol-
lowing features:
Comparator operation is such that the output is a logic “1” when the positive input AIN0 (P1.0]) is
greater than the negative input AIN1 (P1.1). Otherwise the output is a zero. Setting the CEN bit
in ACSR enables the comparator. When the comparator is first enabled, the comparator output
and interrupt flag are not guaranteed to be stable for 10 µs. The corresponding comparator inter-
rupt should not be enabled during that time, and the comparator interrupt flag must be cleared
before the interrupt is enabled in order to prevent an immediate interrupt service. Before
enabling the comparator the analog inputs should be tristated by putting P1.0 and P1.1 into
input-only mode. See
The comparator may be configured to cause an interrupt under a variety of output value condi-
tions by setting the CM bits in ACSR. The comparator interrupt flag CF in ACSR is set whenever
the comparator output matches the condition specified by CM. The flag may be polled by soft-
ware or may be used to generate an interrupt and must be cleared by software.
The comparator output is sampled every clock cycle. The conditions on the analog inputs may
be such that the comparator output will toggle excessively. This is especially true if applying slow
moving analog inputs. Three debouncing modes are provided to filter out this noise. In debounc-
ing mode, the comparator uses Timer 1 to modulate its sampling time. When a relevant
transition occurs, the comparator waits until two Timer 1 overflows have occurred before resam-
pling the output. If the new sample agrees with the expected value, CF is set. Otherwise, the
event is ignored. The filter may be tuned by adjusting the time-out period of Timer 1. Because
Timer 1 is free running, the debouncer must wait for two overflows to guarantee that the sam-
pling delay is at least 1 time-out period. Therefore, after the initial edge event, the interrupt may
occur between 1 and 2 time-out periods later. See
By default the comparator is disabled during Idle mode. To allow the comparator to function dur-
ing Idle, the CIDL bit is ACSR must be set. When CIDL is set, the comparator can be used to
wake-up the CPU from Idle if the comparator interrupt is enabled. The comparator is always dis-
abled during Power-down mode.
• Comparator Output Flag and Interrupt
• Selectable Interrupt Condition
• Hardware Debouncing Modes
– High- or Low-level
– Rising- or Falling-edge
– Output Toggle
“Port 1 Analog Functions” on page
Figure 20-1 on page
25.
56.
AT89LP216
55

Related parts for AT89LP216-20PU