
S1C8F626 TECHNICAL MANUAL
EPSON
55
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Serial Interface)
5.7.5 Transmit-receive control
Below is a description of the registers which handle
transmit-receive control. With respect to transmit-
receive control procedures and operations, please
refer to the following sections in which these are
discussed on a mode by mode basis.
■ Shift register and received data buffer
Exclusive shift registers for transmitting and
receiving are installed in this serial interface.
Consequently, duplex communication simulta-
neous transmit and receive is possible when the
asynchronous system is selected.
Data being transmitted are written to TRXDx0–
TRXDx7 and converted to serial through the shift
register and is output from the SOUTx terminal.
In the reception section, a received data buffer is
installed separate from the shift register.
Data being received are input to the SINx terminal
and is converted to parallel through the shift
register and written to the received data buffer.
Since the received data buffer can be read even
during serial input operation, the continuous data
is received efficiently.
However, since buffer functions are not used in
clock synchronous mode, be sure to read out data
before the next data reception begins.
■ Transmit enable register and transmit
control bit
For transmitting control, use the transmit enable
register TXENx and transmit control bit TXTRGx.
The transmit enable register TXENx is used to set
the transmitting enable/disable status. When "1" is
written to this register to set the transmitting enable
status, clock input to the shift register is enabled
and the system is ready to transmit data. In the
clock synchronous mode, synchronous clock input/
_________
output from the SCLKx terminal is also enabled.
The transmit control bit TXTRGx is used as the
trigger to start transmitting data.
Data to be transmitted is written to the transmit
data shift register, and when transmitting prepara-
tions a recomplete, "1" is written to TXTRGx
whereupon data transmitting begins.
When interrupt has been enabled, an interrupt is
generated when the transmission is completed. If
there is subsequent data to be transmitted it can be
sent using this interrupt.
In addition, TXTRGx can be read as the status.
When set to "1", it indicates transmitting operation,
and "0" indicates transmitting stop.
For details on timing, see the timing chart which
gives the timing for each mode.
When not transmitting, set TXENx to "0" to disable
transmitting status.
■ Receive enable register and receive control
bit
For receiving control, use the receive enable register
RXENx and receive control bit RXTRGx.
Receive enable register RXENx is used to set
receiving enable/disable status. When "1" is written
into this register to set the receiving enable status,
clock input to the shift register is enabled and the
system is ready to receive data. In the clock syn-
chronous mode, synchronous clock input/output
_________
from the SCLKx terminal is also enabled.
With the above setting, receiving begins and serial
data input from the SINx terminal goes to the shift
register.
The operation of the receive control bit RXTRGx is
slightly different depending on whether a clock
synchronous system or an asynchronous system is
being used.
In the clock synchronous system, the receive
control bit RXTRGx is used as the trigger to start
receiving data.
When received data has been read and the prepara-
tion for next data receiving is completed, write "1"
into RXTRGx to start receiving. (When "1" is written
_________
to RXTRGx in slave mode, SRDYx switches to "0".)
In an asynchronous system, RXTRGx is used to
prepare for next data receiving. After reading the
received data from the received data buffer, write
"1" into RXTRGx to signify that the received data
buffer is empty. If "1" is not written into RXTRGx,
the overrun error flag OERx will be set to "1" when
the next receiving operation is completed. (An
overrun error will be generated when receiving is
completed between reading the received data and
the writing of "1" to RXTRGx.)
In addition, RXTRGx can be read as the status. In
either clock synchronous mode or asynchronous
mode, when RXTRGx is set to "1", it indicates
receiving operation and when set to "0", it indicates
that receiving has stopped.
For details on timing, see the timing chart which
gives the timing for each mode.
When you do not receive, set RXENx to "0" to
disable receiving status.