at89lv55 ATMEL Corporation, at89lv55 Datasheet - Page 9

no-image

at89lv55

Manufacturer Part Number
at89lv55
Description
At89lv55 8-bit Microcontroller With 20k Bytes Flash
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
at89lv55-12AC
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
at89lv55-12AC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
at89lv55-12AI
Manufacturer:
PHILIPS
Quantity:
12
Part Number:
at89lv55-12AI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
at89lv55-12JC
Manufacturer:
ATMEL
Quantity:
1 831
Part Number:
at89lv55-12JC
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
at89lv55-12JC
Manufacturer:
ATMEL
Quantity:
518
Part Number:
at89lv55-12JC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
at89lv55-12JI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
at89lv55-12JI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
at89lv55-12PC
Quantity:
30
Part Number:
at89lv55-12PI
Manufacturer:
SyncMOS
Quantity:
5 000
Part Number:
at89lv55-12PI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
8.1
8.2
0811D–MICRO–3/06
Capture Mode
Auto-reload (Up or Down Counter)
.
Table 8-1.
In the capture mode, two options are selected by bit EXEN2 in T2CON. If EXEN2 = 0, Timer 2 is
a 16-bit timer or counter which upon overflow sets bit TF2 in T2CON. This bit can then be used
to generate an interrupt. If EXEN2 = 1, Timer 2 performs the same operation, but a 1-to-0 transi-
tion at external input T2EX also causes the current value in TH2 and TL2 to be captured into
RCAP2H and RCAP2L, respectively. In addition, the transition at T2EX causes bit EXF2 in
T2CON to be set. The EXF2 bit, like TF2, can generate an interrupt. The capture mode is illus-
trated in
Figure 8-1.
Timer 2 can be programmed to count up or down when configured in its 16-bit auto-reload
mode. This feature is invoked by the DCEN (Down Counter Enable) bit located in the SFR
T2MOD (see
up. When DCEN is set, Timer 2 can count up or down, depending on the value of the T2EX pin.
Figure 8-2
are selected by bit EXEN2 in T2CON. If EXEN2 = 0, Timer 2 counts up to 0FFFFH and then sets
the TF2 bit upon overflow. The overflow also causes the timer registers to be reloaded with the
16-bit value in RCAP2H and RCAP2L. The values in RCAP2H and RCAP2L are preset by soft-
ware. If EXEN2 = 1, a 16-bit reload can be triggered either by an overflow or by a 1-to-0
transition at external input T2EX. This transition also sets the EXF2 bit. Both the TF2 and EXF2
bits can generate an interrupt if enabled.
Setting the DCEN bit enables Timer 2 to count up or down, as shown in
the T2EX pin controls the direction of the count. A logic 1 at T2EX makes Timer 2 count up. The
timer will overflow at 0FFFFH and set the TF2 bit. This overflow also causes the 16-bit value in
RCAP2H and RCAP2L to be reloaded into the timer registers, TH2 and TL2, respectively.
Figure
RCLK + TCLK
shows Timer 2 automatically counting up when DCEN = 0. In this mode, two options
Table
Timer 2 Operating Modes
Timer 2 in Capture Mode
0
0
1
X
8-1.
8-2). Upon reset, the DCEN bit is set to 0 so that timer 2 will default to count
CP/RL2
X
X
0
1
TR2
1
1
1
0
MODE
16-bit Auto-reload
16-bit Capture
Baud Rate Generator
(Off)
Figure
AT89LV55
8-3. In this mode,
9

Related parts for at89lv55