mg84fl54 Megawin Technology, mg84fl54 Datasheet - Page 39

no-image

mg84fl54

Manufacturer Part Number
mg84fl54
Description
Full-speed Usb Micro-controller
Manufacturer
Megawin Technology
Datasheet
EXEN2: Timer 2 external enable flag.
When set, allows a capture or reload to occur as a result of a negative transition on T2EX pin if Timer 2 is not
being used to clock the serial port. EXEN2=0 causes Timer 2 to ignore events at T2EX pin.
TR2: Timer 2 Run control bit.
Start/stop control for Timer 2. A logic 1 starts the timer.
C/T2: Timer or counter selector.
When cleared, select internal timer, when set, select external event counter (falling edge triggered).
CP/-RL2: Capture/Reload flag.
When set, captures will occur on negative transitions at T2EX pin if EXEN2=1. When cleared, auto-reloads will
occur either with Timer 2 overflows or negative transitions at T2EX pin when EXEN2=1. When either RCLK=1 or
TCLK=1, this bit is ignored and the timer is forced to auto-reload on Timer 2 overflow.
T2MOD (Address=C9H, Timer 2 Mode Control register)
T2OE: Timer 2 clock-out enable bit: 0 to disable, and 1 to enable.
DCEN: Timer 2 down-counting enable bit.
When the DCEN is cleared, which makes the function of Timer 2 as the same as the standard 8052 (always
counts up). When DCEN is set, 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 11-1 Timer 2 Mode
RCLK + TCLK CP/-RL2
MEGAWIN
7
-
x
1
0
0
0
0
6
-
x
x
1
0
0
0
TR2
5
-
1
1
1
1
1
0
DCEN
4
-
0
0
0
1
0
x
MG84FL54B Data sheet
T2OE
0
0
0
0
0
1
3
-
(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
2
-
T2OE
1
Mode
DCEN
0
39

Related parts for mg84fl54