SM59R16A5/SM59R09A5/SM59R05A5
8-Bit Micro-controller
64KB/36KB/20KB with ISP Flash
& 2KB RAM embedded
9. Serial interface 0 and 1
There are two serial interfaces for data communication in SM59R16A5, they are the so called UART0 and UART1.
As the conventional UART, the communication speed can be selected by configuring the baud rate in SFRs.
These two serial buffers consists of two separate registers, a transmit buffer and a receive buffer. Writing data to the
SFR S0BUF or S1BUF sets this data in serial output buffer and starts the transmission. Reading from the S0BUF or
S1BUF reads data from the serial receive buffer. The serial port can simultaneously transmit and receive data. It can
also buffer 1 byte at receive, which prevents the receive data from being lost if the CPU reads the second byte before the
transmission of the first byte is completed.
Mnemonic
Description
Direct
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
RESET
Serial interface 0 and 1
PCON
AUX
Power control
Auxiliary
register
Serial Port 0
control register
Serial Port 0
reload register
low byte
87h
91h
SMOD MDUF
-
-
P4UR
1
-
-
STOP
P2PW
M
IDLE
DPS
40h
00H
BRGS
SM0
-
P4SPI
P4IIC
P0KBI
S0CON
S0RELL
98h
SM1
SM20
REN0
TB80
RB80
TI0
RI0
00h
00h
S0REL S0REL S0REL S0REL S0REL S0REL S0REL S0REL
AAh
.7
.6
.5
.4
.3
.2
.1
.0
Serial Port 0
reload register
high byte
S0REL S0REL
S0RELH
BAh
-
-
-
-
-
-
00h
.9
.8
Serial Port 0
data buffer
S0BUF
S1CON
99h
9Bh
S0BUF[7:0]
REN1 TB81
00h
00h
Serial Port 1
control register
Serial Port 1
reload register
low byte
SM
-
SM21
RB81
TI1
RI1
S1REL S1REL S1REL S1REL S1REL S1REL S1REL S1REL
S1RELL
9Dh
00h
.7
.6
.5
.4
.3
.2
.1
.0
Serial Port 1
reload register
high byte
Serial Port 1
data buffer
S1REL S1REL
.9 .8
S1RELH
S1BUF
BBh
9Ch
-
-
-
-
-
-
00h
00h
S1BUF[7:0]
Mnemonic: AUX
Address: 91h
7
6
5
4
3
2
1
0
Reset
BRGS
-
P4SPI
P4UR1
P4IIC
P0KBI
P2PWM
DPS
00H
P4UR1: P4UR1 = 0 – Serial interface 1 function on P1.
P4UR1 = 1 – Serial interface 1 function on P4.
Mnemonic: S0CON
Address: 98h
7
6
5
4
3
2
1
0
Reset
SM0
SM1
SM20
REN0
TB80
RB80
TI0
RI0
00h
SM0,SM1: Serial Port 0 mode selection.
SM0 SM1
Mode
0
0
1
1
0
1
0
1
0
1
2
3
The 4 modes in UART0, Mode 0 ~ 3, are explained later.
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M047 42 Ver.G SM59R16A5 01/2014