Standard UART Data Word: Ideal State Ideal State
Standard UART Data Word: Ideal State Ideal State
Ideal Ideal
state state
D0 D1 D2 D3 D4 D5 D6 D7
7 6 5 4 3 2 1 0
SM0 SM1 SM2 REN TB8 RB8 TI RI
Bit Symbol Function
0 RI Receive Interrupt flag. Set to one at the end of bit 7
time in mode 0, and halfway through the stop bit for
other modes. Must be cleared by the program.
Bit addressable as SCON.0 to SCON.7
1 TI Transmit Interrupt flag. Set to one at the end of bit 7
time in mode 0, and at the beginning of the stop bit
for other modes. Must be cleared by the program.
2 RB8 Received bit 8. Bit 8 of received data in modes 2
&3;stop bit in mode 1. Not used in mode 0.
The Serial Port Control (SCON) Special Function Register
7 6 5 4 3 2 1 0
SM0 SM1 SM2 REN TB8 RB8 TI RI
Bit Symbol Function
3 TB8 Transmitted bit 8. Set/clr by program in modes 2& 3
4 REN Receive enable bit. Set to 1 enable reception; cleared
to 0 to disable reception.
5 SM2 Multiprocessor communications bit. Set / cleared
by program to enable multiprocessor
communications in modes 2 and 3. When set to 1
an interrupt is generated if bit 9 of the received
data is a 1; no interrupt is generated if bit 9 is a 0. If
set to 1 for mode 1, no interrupt will be generated
unless a valid stop bit is received . Clear to 0 if
mode 0 is in use.
The Serial Port Control (SCON) Special Function Register
7 6 5 4 3 2 1 0
SM0 SM1 SM2 REN TB8 RB8 TI RI
Microcontroller RS 232
Logic 0 0v to 0.4v +3v to +25v
Logic 1 2.4v to 5v -3v to –25v
25v
Logic0
3v
0v
-3v
Logic1
-25v
Pin Description
1 DCD --- Data Carrier Detect
2 RxD --- Receiver Data
3 TxD --- Transmitted Data
4 DTR --- Data Terminal Ready
5 GND --- Signal Ground
6 DSR --- Data Set Ready
7 RTS --- Request To Send
8 CTS --- Clear To Send
9 RI --- Ring Indicator
NULL MODEM CONFIGURATION
NULL MODEM and interfacing of kit
with PC com port
TxD
RxD
DTR
TxD RxD
PC DSR
COM RTS KIT
PORT
CTS
GND
DCD
RI NC
GND
VCC
1 16
C1 C3
2
3
MAX 232 6
4
C2 C4
5
11 14
T1 in T1 out
12 13
R1 out R1 in
TTL 10 7 RS 232
T2 in T2 out
9 8
R2 out R1 out
15