Intel 8XC196MD Benutzerhandbuch

Seite von 579
8XC196MC, MD, MH USER’S MANUAL
7-12
7.4.3
Programming the Baud Rate and Clock Source
The SPx_BAUD register (Figure 7-7) selects the clock input for the baud-rate generator and de-
fines the baud rate for all serial I/O modes. (For mode 4 with SCLKx# configured for input, the
baud-rate generator is not used.) This register acts as a control register during write operations
and as a down-counter monitor during read operations.
WARNING
Writing to the SPx_BAUD register during a reception or transmission can 
corrupt the received or transmitted data. Before writing to SPx_BAUD, check 
the SPx_STATUS register to ensure that the reception or transmission is 
complete.
SP
x
_BAUD 
x
 = 0–1 (8XC196MH)
Address:
Reset State:
1F84H, 1F8CH
0000H
The serial port baud rate 
x
 (SP
x
_BAUD) register selects the serial port 
x
 baud rate and clock source. 
The most-significant bit selects the clock source. The lower 15 bits represent BAUD_VALUE, an 
unsigned integer that determines the baud rate. 
The maximum BAUD_VALUE is 32,767 (7FFFH). In asynchronous modes 1, 2, and 3, the minimum 
BAUD_VALUE is 0000H when using XTAL1 and 0001H when using BCLK
x
. In synchronous mode 0, 
the minimum BAUD_VALUE is 0001H for transmissions and 0002H for receptions. In synchronous 
mode 4, the minimum BAUD_VALUE is 0001H for both transmissions and receptions.
15
8
8XC196MH
CLKSRC
BV14
BV13
BV12
BV11
BV10
BV9
BV8
7
0
BV7
BV6
BV5
BV4
BV3
BV2
BV1
BV0
Bit 
Number
Bit 
Mnemonic
Function
15
CLKSRC
Serial Port Clock Source
This bit determines whether the serial port is clocked from an internal or an 
external source. 
0 = signal on the BCLK
x
 pin (external source)
1 = input frequency on the XTAL1 pin (internal source)
Figure 7-7.  Serial Port 
x Baud Rate  (SPx_BAUD) Register