English
Language : 

N78E517A Datasheet, PDF (45/141 Pages) List of Unclassifed Manufacturers – Microcontroller
FPERIPH
1/6
T2 = P1.0
TR2
T2EX = P1.1
EXEN2
C/T2
0
1
TL2
TH2
0
70
7
TF2
0
RCAP2L
70
7
RCAP2H
EXF2
Figure 10–6. Timer/Counter 2 in Auto-reload Mode
Timer 2 Interrupt
10.2.3 Baud Rate Generator Mode
The Timer 2 can generate the baud rate for UART in its Mode 1 and 3. The baud rate generator mode is ena-
bled by setting either the RCLK or TCLK bits in T2CON register. While in the baud rate generator mode, Tim-
er/Counter 2 is a 16 bit counter with auto-reload when the count rolls over from FFFFH. However, rolling over
is used to generate the shift clock for UART data rather than to set the TF2 bit. If EXEN2 bit is set, then a neg-
ative transition of the T2EX pin will set EXF2 bit in the T2CON register and cause an interrupt request. It simply
provides a external interrupt. Note that TCLK and RCLK are selected individually, the serial port transmit rate
can be different from the receive rate. For example the transmit clock can be generated from Timer 2 by setting
TCLK and the receive clock from Timer 1 by clearing RCLK.
Timer 1
Overflow
FPERIPH
T2 = P1.0
TR2
T2EX = P1.1
EXEN2
C/T2
0
1
1/2
Timer 2
0 1 SMOD
TL2
TH2
Overflow RCLK
(PCON.7)
0
70
7
10
1/16 Rx clock
TCLK
0
70
7
RCAP2L
RCAP2H
10
1/16 Tx clock
EXF2
Timer 2 Interrupt
Figure 10–7. Timer/Counter 2 in Baud Rate Generator Mode
- 45 -
Publication Release Date: September 4, 2012
Revision: V2.2