
8-5
ML64168/P168 User's Manual
Chapter 8 Serial Port (SIOP)
8
Selection of transfer data direction
0: MSB (SD7) head (initial value)
1: LSB (SD0) head
Selection of serial clock
0: Internal clock (initial value)
1: External clock
Serial transfer finish flag
0: Transfer not finished (initial value)
1: Transfer finished
Serial transfer enable flag
0: Transfer halted (initial value)
1: Transfer started
SDIR
EXSC
SEND
ENTR
b
3
b
2
b
1
b
0
SCON (08H)
(R/W)
8.4 Registers Related to Serial Port
(1) Serial Port Control Register (SCON)
The Serial port control register (SCON) is a 4-bit special function register (SFR) to control
the Serial port.
Bit 3: SDIR
This bit is used to select the direction of serial transfer data. When reset to "0", MSB becomes
the head transfer data and when set to "1", LSB becomes the head transfer data. At system
reset, it is reset to "0" and is in MSB head mode.
Bit 2: EXSC
This bit is used to select the transfer clock of serial transfer. When reset to "0", the system
clock is selected as the transfer clock and when set to "1", the external clock that is input from
P4.2/SCLK is selected. At system reset, it is reset to "0" and the system clock is selected as
the transfer clock.
Bit 1: SEND
This bit is used to indicate the completion of serial transfer. When serial transfer is completed,
the SEND bit is set to "1" and the Serial port interrupt request (SIOINT) is generated.
When reading or writing from/to the serial port control register (SCON), the SEND bit is reset
to "0". The SEND bit is a read-only bit and is reset to "0" at system reset.
Bit 0: ENTR
This bit specifies whether serial transfer is enabled or not. When reset to "0", serial transfer
is halted and is started when this bit is set to "1". At system reset, it is reset to "0" and serial
transfer is halted. When ENTR is set to "1", this bit is automatically reset after serial transfer
is completed.
Writing "0" to ENTR during serial transfer (when ENTR = 1) interrupts serial transfer. At that
time, the serial port interrupt request (SIOINT) is not generated.