Hyundai gms90x51c User Manual

Page of 51
HYUNDAI MicroElectronics
GMS90X5XC Series
20
Jan. 2001   Ver 1.0
SERIAL INTERFACE (USART)
The serial port is full duplex and can operate in four modes (one synchronous mode, three asynchronous modes)
as illustrated in Table 6. The possible baud rates can be calculated using the formulas given in Table 7.
Table 6. USART Operating Modes
Mode
SCON
Baudrate
Description
SM0
SM1
0
0
0
Serial data enters and exits through RxD.
TxD outputs the shift clock. 8-bit are transmit-
ted/received (LSB first)
1
0
1
Timer 1/2 overflow rate
8-bit UART
10 bits are transmitted (through TxD) or 
received (RxD)
2
1
0
or 9-bit 
UART
11 bits are transmitted (TxD) or received (RxD)
3
1
1
Timer 1/2 overflow rate
9-bit UART
Like mode 2 except the variable baud rate
Table 7. Formulas for Calculating Baud rates
Baud Rate
derived  from
Interface Mode
Baudrate
Oscillator
0
2
Timer 1 (16-bit timer)
(8-bit timer with
8-bit auto reload)
1,3
1,3
Timer 2
1,3
f
OSC
12
------------
f
OSC
32
------------
f
OSC
64
------------
f
OSC
12
------------
2
SMOD
64
------------------
f
OSC
×
2
SMOD
32
------------------
Timer 1 overflow
(
)
×
2
SMOD
32
------------------
f
OSC
12
256
TH1
(
)
[
]
×
--------------------------------------------------
×
f
OSC
32
65536
RC2H RC2L
,
(
)
[
]
×
----------------------------------------------------------------------------------