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
------------------------------------------------------------
=
Содержание 8XC251SA
Страница 2: ......
Страница 3: ...May 1996 8XC251SA 8XC251SB 8XC251SP 8XC251SQ Embedded Microcontroller User s Manual...
Страница 18: ......
Страница 19: ...1 Guide to This Manual...
Страница 20: ......
Страница 30: ......
Страница 31: ...2 Architectural Overview...
Страница 32: ......
Страница 41: ...3 Address Spaces...
Страница 42: ......
Страница 63: ...4 Device Configuration...
Страница 64: ......
Страница 81: ...5 Programming...
Страница 82: ......
Страница 102: ......
Страница 103: ...6 Interrupt System...
Страница 104: ......
Страница 120: ......
Страница 121: ...7 Input Output Ports...
Страница 122: ......
Страница 132: ......
Страница 133: ...8 Timer Counters and Watchdog Timer...
Страница 134: ......
Страница 153: ...9 Programmable Counter Array...
Страница 154: ......
Страница 170: ......
Страница 171: ...10 Serial I O Port...
Страница 172: ......
Страница 187: ...11 Minimum Hardware Setup...
Страница 188: ......
Страница 197: ...12 Special Operating Modes...
Страница 198: ......
Страница 206: ......
Страница 207: ...13 External Memory Interface...
Страница 208: ......
Страница 239: ...14 Programming and Verifying Nonvolatile Memory...
Страница 240: ......
Страница 250: ......
Страница 251: ...A Instruction Set Reference...
Страница 252: ......
Страница 390: ......
Страница 391: ...B Signal Descriptions...
Страница 392: ......
Страница 400: ......
Страница 401: ...C Registers...
Страница 402: ......
Страница 436: ......
Страница 437: ...Glossary...
Страница 438: ......
Страница 446: ......
Страница 447: ...Index...
Страница 448: ......
Страница 458: ......