![Sino Wealth SH79F3283 Manual Download Page 46](http://html1.mh-extra.com/html/sino-wealth/sh79f3283/sh79f3283_manual_1283063046.webp)
SH79F3283
46
Mode2: Baud-Rate Generator
Timer2 is selected as the baud rate generator by setting TCLK and/or RCLK in T2CON. The baud rates for transmit and
receive can be different if Timer2 is used for the receiver or transmitter and Timer4 is used for the other.
Setting RCLK and/or TCLK will put Timer2 into its baud rate generator mode, which is similar to the auto-reload mode.
Over flow of Timer2 will causes the Timer2 registers to be reloaded with the 16-bit value in registers RCAP2H and RCAP2L
that preset by software. But this will not generate an interrupt.
If EXEN2 is set, a 1-to-0 transition in T2EX will set EXF2 but will not cause a reload. Thus when Timer2 is in use as a baud
rate generator, T2EX can be used as an extra external interrupt.
The baud rate in EUART mode 1 & 3 is determined by the timer 2 overflow ratio according to the following equation.
RCAP2L]
[RCAP2H,
65536
SYS
f
16
2
1
BaudRate
−
×
×
=
; C/T2
———
= 0
RCAP2L]
[RCAP2H,
65536
T2
f
16
1
BaudRate
−
×
=
; C/T2
———
= 1
TR2
C / T 2
0: Switch Off
1: Switch On
/ 16
/ 16
Timer
Overflow
1
/2
RCLK
=1
=0
TCLK
=1
=0
Receiver
CLK
SMOD
=0
=1
TL2
TH 2
RCAP2L
RCAP2H
EXEN 2
EXF 2
T2 EX
T2
0: Switch Off
1: Switch On
Transiver
CLK
=0
=1
Timer 2 Interrupt
Request
The Block Diagram of Baund-Rate Generator (Mode2) of Timer2
System
clock
1/12
TCLKP 2
1/2