mg84fl54b Megawin Technology, mg84fl54b Datasheet - Page 25

no-image

mg84fl54b

Manufacturer Part Number
mg84fl54b
Description
Full-speed Usb Micro-controller
Manufacturer
Megawin Technology
Datasheet
After reset, the DCEN=0 (T2MOD.0), which makes the function of Timer 2 all the same as the standard 8052
(always counts up). While DCEN=1, Timer 2 can count up or count down according to the logic level of the
T2EX pin (P1.1). The following Table shows the operation modes of Timer 2.
Table: Timer 2 Mode
10.2.1. Capture Mode (CP)
In the Capture mode, Timer2 is incremented by either Fosc/12 or external pin (T2) 1-to-0 transition. TR2
controls the event to timer2 and a 1-to-0 transition on T2EX pin will trigger RCAP2H and RCAP2L registers to
capture the Timer2 contents onto them if EXEN2 is set. An overflow in Timer2 set TF2 flag and a 1-to-0
transition in T2EX pin sets EXF2 flag if EXEN2=1. TF2 and EXF2 is ORed to request the interrupt service.
MEGAWIN
RCLK +
TCLK
1
0
0
0
0
x
T2 EX pin
Fosc/12
T2 pin
CP/-RL2
1
0
0
0
x
x
Transition
Detector
C/T2=0
C/T2=1
TR2
0
1
1
1
1
1
EXEN2
DCEN
0
0
0
1
0
x
TR2
Timier2 in Capture Mode
T2OE
MG84FL54B Data sheet
0
0
0
0
0
1
(off)
Baud-rate generator
16-bit capture
16-bit auto-reload (counting-up only)
16-bit auto-reload (counting-up or counting-
down)
Clock output
RCAP2L RCAP2H
(8 BITS)
TL2
(8 BITS)
TH2
Mode
EXF2
TF2
Timer2 Interrupt
25

Related parts for mg84fl54b