AT89LP51ID2 Atmel Corporation, AT89LP51ID2 Datasheet - Page 103

no-image

AT89LP51ID2

Manufacturer Part Number
AT89LP51ID2
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of AT89LP51ID2

Flash (kbytes)
64 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
42
Spi
1
Twi (i2c)
1
Uart
1
Adc Channels
7
Adc Resolution (bits)
10
Adc Speed (ksps)
153.8
Sram (kbytes)
2.25
Eeprom (bytes)
4096
Self Program Memory
API
Operating Voltage (vcc)
2.4 to 5.5
Timers
4
Isp
SPI/OCD/UART
Watchdog
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89LP51ID2-20AAU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89LP51ID2-20AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89LP51ID2-20JU
Manufacturer:
Atmel
Quantity:
10 000
15.3
15.4
3714A–MICRO–7/11
PCA Capture Mode
16-bit Software Timer/ Compare Mode
To use one of the PCA modules in the capture mode either one or both of the CCAPM bits
CAPN and CAPP for that module must be set. The external CEX input for the module (on port 1)
is sampled for a transition. When a valid transition occurs the PCA hardware loads the value of
the PCA counter registers (CH and CL) into the module's capture registers (CCAPnL and CCA-
PnH). If the CCFn bit for the module in the CCON SFR and the ECCFn bit in the CCAPMn SFR
are set then an interrupt will be generated (Refer to
Figure 15-3. PCA Capture Mode
The PCA modules can be used as software timers by setting both the ECOM and MAT bits in
the modules CCAPMn register. The PCA timer will be compared to the module's capture regis-
ters and when a match occurs an interrupt will occur if the CCFn (CCON SFR) and the ECCFn
(CCAPMn SFR) bits for the module are both set (See
Figure 15-4. PCA Compare Mode and PCA Watchdog Timer
Before enabling ECOM bit, CCAPnL and CCAPnH should be set with a non zero value, other-
wise an unwanted match could happen. Writing to CCAPnH will set the ECOM bit. Once ECOM
is set, writing CCAPnL will clear ECOM so that an unwanted match doesn’t occur while modify-
ing the compare value. Writing to CCAPnH will set ECOM. For this reason, user software should
write CCAPnL first, and then CCAPnH. Of course, the ECOM bit can still be controlled by
accessing to CCAPMn register.
CEXn
CCAPnL CCAPnH
CL
CCAPnH
Write to
CH
AT89LP51RD2/ED2/ID2 Preliminary
CCAPMn.5
CCAPMn.4
CAPPn
CAPNn
1
ECOMn
=
0
CMOD.6 (Module 4 only)
CCAPnL CCAPnH
CCAPMn.3
WDTE
MATn
CL
Write to
CCAPnL
Figure
Figure
CH
CCFn
15-3).
CCAPMn.0
15-4).
ECCFn
Module n
CCAPMn.0
ECCFn
CCFn
Module n
Interrupt
Reset
Interrupt
103

Related parts for AT89LP51ID2