SM59A16U1
8-Bit Micro-controller
64KB with ISP Flash
& 6K+256B RAM embedded
9. Serial Interface 0 and 1
There are two serial interfaces for data communication in SM59A16U1, 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
Dir.
Bit 7
The relevant registers of Serial interface 0 and 1
SMOD MDUF
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
RST
PCON
AUX
Power control
87H
91h
-
STOP
-
IDLE
DPS
40H
00H
P4UR
1
Auxiliary register
BRGS
SM0
-
P4SPI
P4IIC P0KBI
Peripheral
Frequency control
register
PFCON
D9h
-
SRELPS[1:0]
T1PS[1:0]
T0PS[1:0]
00H
Serial interface 0 and 1
SM1 SM20 REN0
Serial Port 0
control register
Serial Port 0
S0CON
S0RELL
98H
TB80
RB80
TI0
RI0
00H
00H
reload
register
AAH
S0REL[7:0]
low byte
Serial Port 0
reload register
high byte
S0RELH
BAH
-
S0REL[9:8]
00H
Serial Port 0 data
buffer
S0BUF
S1CON
99H
9BH
S0BUF[7:0]
00H
00H
Serial Port 1
control register
Serial Port 1
reload register
low byte
SM
-
SM21
REN1
TB81
RB81
TI1
RI1
S1RELL
9DH
S1REL[7:0]
00H
Serial Port 1
reload register
high byte
Serial Port 1 data
buffer
S1RELH
S1BUF
BBH
9CH
-
S1REL[9:8]
00H
00H
S1BUF[7:0]
9.1
Serial Port 0 Control Register( S0CON )
Mnemonic: S0CON
Address: 98h
7
SM0
6
SM1
5
4
3
2
1
TI0
0
RI0
Reset
00h
SM20
REN0
TB80
RB80
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M071 Ver A SM59A16U1 04/12/2013
- 63 -