Datasheet

"#$%$&
SBAS203JMARCH 2002 − REVISED JANUARY 2008
www.ti.com
70
Serial Port 1 Control (SCON1)
7 6 5 4 3 2 1 0 Reset Value
SFR C0h SM0_1 SM1_1 SM2_1 REN_1 TB8_1 RB8_1 TI_1 RI_1 00h
SM0−2 Serial Port 1 Mode. These bits control the mode of serial Port 1. Modes 1, 2, and 3 have 1 start and 1 stop bit
bits 7−5 in addition to the 8 or 9 data bits.
MODE SM0 SM1 SM2 FUNCTION LENGTH PERIOD
0 0 0 0 Synchronous 8 bits 12 p
CLK
(1)
0 0 0 1 Synchronous 8 bits 4 p
CLK
(1)
1 0 1 0 Asynchronous 10 bits Timer 1 Baud Rate Equation
1 0 1 1 Valid Stop Required
(2)
10 bits Timer 1 or Baud Rate Equation
2 1 0 0 Asynchronous 11 bits 64 p
CLK
(1)
(SMOD = 0)
32 p
CLK
(1)
(SMOD = 1)
2 1 0 1 Asynchronous with Multiprocessor
Communication
(3)
11 bits 64 p
CLK
(1)
(SMOD = 0)
32 p
CLK
(1)
(SMOD = 1)
3 1 1 0 Asynchronous 11 bits Timer 1 Baud Rate Equation
3 1 1 1 Asynchronous with Multiprocessor
Communication
(3)
11 bits Timer 1 Baud Rate Equation
(1)
p
CLK
will be equal to t
CLK
, except that p
CLK
will stop for IDLE.
(2)
RI_0 will only be activated when a valid STOP is received.
(3)
RI_0 will not be activated if bit 9 = 0.
REN_1 Receive Enable. This bit enables/disables the serial Port 1 received shift register.
bit 4 0 = Serial Port 1 reception disabled.
1 = Serial Port 1 received enabled (modes 1, 2, and 3). Initiate synchronous reception (mode 0).
TB8_1 9th Transmission Bit State. This bit defines the state of the 9th transmission bit in serial Port 1 modes 2 and 3.
bit 3
RB8_1 9th Received Bit State. This bit identifies the state of the 9th reception bit of received data in serial Port 1 modes
bit 2 2 and 3. In serial port mode 1, when SM2_1 = 0, RB8_1 is the state of the stop bit. RB8_1 is not used in mode 0.
TI_1 Transmitter Interrupt Flag. This bit indicates that data in the serial Port 1 buffer has been completely shifted out.
bit 1 In serial port mode 0, TI_1 is set at the end of the 8th data bit. In all other modes, this bit is set at the end of the last
data bit. This bit must be cleared by software to transmit the next byte.
RI_1 Receiver Interrupt Flag. This bit indicates that a byte of data has been received in the serial Port 1 buffer. In serial
bit 0 port mode 0, RI_1 is set at the end of the 8th bit. In serial port mode 1, RI_1 is set after the last sample of the incoming
stop bit subject to the state of SM2_1. In modes 2 and 3, RI_1 is set after the last sample of RB8_1. This bit must
be cleared by software to receive the next byte.