English
Language : 

HD404019R Datasheet, PDF (21/65 Pages) Renesas Technology Corp – CMOS 4-bit single-chip microcomputers
HD404019R Series
Serial Interface
The serial interface is used to transmit/receive 8-bit data serially. It consists of the serial data register, the
serial mode register, the octal counter, and the multiplexer as illustrated in figure 9. Pin R40/SCK and the
transmit clock signal are controlled by the serial mode register. The contents of the serial data register can
be written into or read out by software. The data in the serial data register can be shifted synchronously
with the transmit clock signal.
The STS instruction initiates serial interface operations and resets the octal counter to $0. The counter starts
to count at the falling edge of the transmit clock (SCK) signal and increments by one at the rising edge of
SCK. When the octal counter is reset to $0 after eight transmit clock signals, or a transmit/receive operation
is discontinued, the serial interrupt request flag will be set.
System
clock
Prescaler (11 bits)
OC (3 bits)
Octal counter
SROF
IFS
Serial
interface
interrupt
request flag
Serial MPX
÷2
MPX
SCK
3
SMR (4 bits)
Serial mode register
4
Internal bus line (S2)
PMR (4 bits)
Port mode register
4
SCK
2
Internal bus line (S1)
4
4
SR (8 bits)
Serial data register
4
4
Internal bus-line (S2)
R40/SCK
port
R41/SI
port
R42/SO
port
SCK
SI
SO
Figure 9 Serial Interface Block Diagram
Serial Mode Register (SMR: $005): The 4-bit write-only serial mode register controls the R40/SCK pin,
prescaler divide ratio, and transmit clock source as shown in table 7.
The write signal to the serial mode register controls the operating state of the serial interface.
The write signal to the serial mode register stops the serial data register and octal counter from accepting
the transmit clock, and it also resets the octal counter to $0 simultaneously. Therefore, when the serial
interface is in the transfer state, the write signal causes the serial mode register to cease the data transmit
and to set the serial interrupt request flag.
19