8XC251SA, SB, SP, SQ USER’S MANUAL
10-12
10.6.3.3
Timer 2 Generated Baud Rates (Modes 1 and 3)
Timer 2 may be selected as the baud rate generator for the transmitter and/or receiver (Figure
10-5). The timer 2 baud rate generator mode is similar to the auto-reload mode. A rollover in the
TH2 register reloads registers TH2 and TL2 with the 16-bit value in registers RCAP2H and
RCAP2L, which are preset by software.
The timer 2 baud rate is expressed by the following formula:
10.6.3.4
Selecting Timer 2 as the Baud Rate Generator
To select timer 2 as the baud rate generator for the transmitter and/or receiver, program the
RCLCK and TCLCK bits in the T2CON register as shown in Table 10-5. (You may select differ-
ent baud rates for the transmitter and receiver.) Setting RCLK and/or TCLK puts timer 2 into its
baud rate generator mode (Figure 10-5). In this mode, a rollover in the TH2 register does not set
the TF2 bit in the T2CON register. Also, a high-to-low transition at the T2EX pin sets the EXF2
bit in the T2CON register but does not cause a reload from (RCAP2H, RCAP2L) to (TH2, TL2).
You can use the T2EX pin as an additional external interrupt by setting the EXEN2 bit in T2CON.
NOTE
Turn the timer off (clear the TR2 bit in the T2CON register) before accessing
registers TH2, TL2, RCAP2H, and RCAP2L.
Table 10-4. Timer 1 Generated Baud Rates for Serial I/O Modes 1 and 3
Baud
Rate
Oscillator
Frequency
(F
OSC
)
SMOD1
Timer 1
C/T#
Mode
Reload
Value
62.5 Kbaud (Max)
12.0 MHz
1
0
2
FFH
19.2 Kbaud
11.059 MHz
1
0
2
FDH
9.6 Kbaud
11.059 MHz
0
0
2
FDH
4.8 Kbaud
11.059 MHz
0
0
2
FAH
2.4 Kbaud
11.059 MHz
0
0
2
F4H
1.2 Kbaud
11.059 MHz
0
0
2
E8H
137.5 Baud
11.986 MHz
0
0
2
1DH
110.0 Baud
6.0 MHz
0
0
2
72H
110.0 Baud
12.0 MHz
0
0
1
FEEBH
Serial I/O Modes 1 and 3 Baud Rate
Timer 2 Overflow Rate
16
------------------------------------------------------------
=
Summary of Contents for 8XC251SA
Page 2: ......
Page 3: ...May 1996 8XC251SA 8XC251SB 8XC251SP 8XC251SQ Embedded Microcontroller User s Manual...
Page 18: ......
Page 19: ...1 Guide to This Manual...
Page 20: ......
Page 30: ......
Page 31: ...2 Architectural Overview...
Page 32: ......
Page 41: ...3 Address Spaces...
Page 42: ......
Page 63: ...4 Device Configuration...
Page 64: ......
Page 81: ...5 Programming...
Page 82: ......
Page 102: ......
Page 103: ...6 Interrupt System...
Page 104: ......
Page 120: ......
Page 121: ...7 Input Output Ports...
Page 122: ......
Page 132: ......
Page 133: ...8 Timer Counters and Watchdog Timer...
Page 134: ......
Page 153: ...9 Programmable Counter Array...
Page 154: ......
Page 170: ......
Page 171: ...10 Serial I O Port...
Page 172: ......
Page 187: ...11 Minimum Hardware Setup...
Page 188: ......
Page 197: ...12 Special Operating Modes...
Page 198: ......
Page 206: ......
Page 207: ...13 External Memory Interface...
Page 208: ......
Page 239: ...14 Programming and Verifying Nonvolatile Memory...
Page 240: ......
Page 250: ......
Page 251: ...A Instruction Set Reference...
Page 252: ......
Page 390: ......
Page 391: ...B Signal Descriptions...
Page 392: ......
Page 400: ......
Page 401: ...C Registers...
Page 402: ......
Page 436: ......
Page 437: ...Glossary...
Page 438: ......
Page 446: ......
Page 447: ...Index...
Page 448: ......
Page 458: ......