HD404818 Series
60
Registers for Serial Interface
Serial Mode Register (SMR: $005):
The 4-bit write-only serial mode register controls the R0
0
/
SCK
,
prescaler divide ratio, and transmit clock source (table 26, figure 32).
A write signal to the serial mode register controls the internal state of the serial interface.
A write signal to the serial mode register stops the serial data register and octal counter from applying the
transmit clock, and it also resets the octal counter to $0 simultaneously. Therefore, when the serial interface
is in the transfer state, a write signal causes the serial mode register to cease the data transfer and to set the
serial interrupt request flag.
Data in the serial mode register will change in the second instruction cycle after a write instruction to the
serial mode register. Therefore, it is required to execute the STS instruction after the data in the serial mode
register has been changed completely. The serial mode register will be reset to $0 by MCU reset.
Serial Data Register (SRL: $006, SRU: $007):
The 8-bit read/write serial data register consists of low-
order digits (SRL: $006) and high-order digits (SRU: $007).
The data in the serial data register will be output from the SO pin LSB first synchronously with the falling
edge of the transmit clock signal. At the same time, external data will be input from the SI pin to the serial
data register synchronously with the rising edge of the transmit clock. Figure 33 shows the I/O timing chart
for the transmit clock signal and the data.
The read/write operation of the serial data register should be performed after the completion of data
transmit/receive. Otherwise, data accuracy cannot be guaranteed.
Table 26 Serial Mode Register
SMR3
R0
0
/
SCK
Used as R0
0
port input/output pin
Used as
SCK
input/output pin
0
1
Transmit Clock
SMR2 SMR1 SMR0 R0
0
/
SCK
Port Clock Source Prescaler Divide Ratio System Clock Divide Ratio
0
0
0
SCK
/output
Prescaler
SCK
/output
Prescaler
SCK
/output
Prescaler
SCK
/output
Prescaler
SCK
/output
Prescaler
SCK
/output
Prescaler
SCK
/output
System clock
SCK
/input
External clock —
÷
2048
÷
512
÷
128
÷
32
÷
8
÷
2
÷
4096
÷
1024
÷
256
÷
64
÷
16
÷
4
÷
1
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
—
1
1
1
—