SERIAL I/O
7902 Group User’s Manual
12-26
12.3 Clock synchronous serial I/O mode
12.3.4 Transmit operation
When the transmit conditions described in section “12.3.3 Method of transmission” have been satisfied
in the case of an internal clock selected, a transfer clock is generated and the following operations are
automatically performed after 1 cycle of the transfer clock or less has passed. In the case of an external
clock selected, when the transmit conditions have been satisfied and then an external clock is input to the
CLKi pin, the following operations are automatically performed:
The UARTi transmit buffer register’s contents are transferred to the UARTi transmit register.
The transmit buffer empty flag is set to “1.”
The transmit register empty flag is cleared to “0.”
8 transfer clocks are generated (in the case of an internal clock selected).
A UARTi transmit interrupt request occurs, and the interrupt request bit is set to “1.”
The transmit operations are described below:
Data in the UARTi transmit register is transmitted from the TxDi pin synchronously with the valid edgeU
of the clock output from or input to the CLKi pin.
This data is transmitted, bit by bit, sequentially beginning with the least significant bit.
When 1-byte data has been transmitted, the transmit register empty flag is set to “1.” This indicates the
completion of transmission.
Valid edgeU : A falling edge is selected when the CLK polarity select bit = “0.”
A rising edge is selected when the CLK polarity select bit = “1.”
Figure 12.3.5 shows the transmit operation.
When an internal clock is selected, if the transmit conditions for the next data are satisfied at completion
of the transmission, the transfer clock is generated continuously. Accordingly, when performing transmission
continuously, set the next transmit data to the UARTi transmit buffer register during transmission (when the
transmit register empty flag = “0”). When the transmit conditions for the next data are not satisfied, the
transfer clock stops at “H” level (when the CLK polarity select bit = “0”), or “L” level (when the CLK polarity
select bit = “1”).
Figures 12.3.6 and 12.3.7 show examples of transmit timing.
Fig. 12.3.5 Transmit operation
Transfer clock output from
or input to the CLKi pin (Note)
UARTi transmit buffer register
D7
D6
D5
D4
D3
D2
D1
D0
D7
D6
D5
D4
D3
D2
D1
D7
D6
D5
D4
D3
D2
D7
D6
D5
D4
D3
Transmit data
MSB
b7
b0
D0
D1
D2
D7
LSB
UARTi transmit register
Note: This applies when the CLK polarity select bit = “0.”
When the CLK polarity select bit = “1,” data is shifted at the rising edge of the transfer clock.