SM39A16M1
8-Bit Micro-controller
16KB with ISP Flash
& 1K+256B RAM embedded
9. Serial interface
The serial buffer consists of two separate registers, a Transmit buffer and a receive buffer.
Writing data to the Special Function Register SBUF sets this data in serial output buffer and starts the transmission.
Reading from the SBUF 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
first byte before transmission of the second byte is completed.
Mnemonic
Description
Dir.
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
RST
Serial interface 0 and 1
PCON
AUX
Power control
Auxiliary register
Serial Port control
register
Serial Port reload
register low byte
Serial Port reload
register high byte
Serial Port data
buffer
87H SMOD
-
-
-
-
-
-
-
-
STOP
-
IDLE
DPS
00H
00H
P21CC
91h
98H
BRGS
SM0
P1UR
SCON
SRELL
SRELH
SBUF
SM1
SM2
REN
TB8
RB8
TI
RI
00H
00H
00H
00H
SREL.7 SREL.6 SREL.5 SREL.4 SREL.3 SREL.2 SREL.1 SREL.0
AAH
BAH
99H
-
-
-
-
-
-
SREL.9 SREL.8
T0PS[1:0]
SBUF[7:0]
Peripheral
Frequency control D9h
register
PFCON
-
-
SRELPS[1:0]
T1PS[1:0]
00H
Mnemonic: AUX
Address: 91h
7
6
5
4
3
2
-
1
-
0
DPS
Reset
00H
P21CC
BRGS
P1UR
BRGS: Baud rate generator.
BRGS = 0 - baud rate generator from Timer 1.
BRGS = 1 - baud rate generator by SREL.
P1UR: P1UR = 0 – Serial interface 0 function on P3.
P1UR = 1 – Serial interface 0 function on P1.
Mnemonic: SCON
Address: 98h
7
SM0
6
SM1
5
SM2
4
REN
3
TB8
2
RB8
1
TI
0
RI
Reset
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 UART, Mode 0 ~ 3, are explained later.
SM2: Enables multiprocessor communication feature
REN: If set, enables serial reception. Cleared by software to disable reception.
TB8: The 9th transmitted data bit in modes 2 and 3. Set or cleared by the CPU depending on
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M069 Ver C SM39A16M1 7/31/2013
- 49 -