![](http://datasheet.mmic.net.cn/110000/ML674001TC_datasheet_3507949/ML674001TC_319.png)
ML674001 Seies/ML675001 Series User’s Manual
Chapter 19
Synchronous SIO
19-9
19.3 Operations
19.3.1 Master Mode/Slave Mode
There are two modes for transmission and reception, the master mode and the slave mode.
The mode to be
used for transmission and reception is selected by the SFTSLV bit of the synchronous SIO control register
(SSIOCON).
In the master mode, a synchronous clock with 1/8, 1/16, or 1/32 the frequency of HCLK is output from the
SCLK pin and data is transmitted and received in synchronization with that clock.
The synchronous clock is
sellected by the SFTCLK[1:0] bits of the synchronous SIO control register (SSIOCON).
In the slave mode, an external synchronous clock is input from the SCLK pin and data is transmitted and
received in synchronization with that clock.
When operating in slave mode, the synchronous input clock,
SCLK, must have a frequency equal to or less than 1/8 the frequency of HCLK.*
1
The communication functionlity when operating in slave mode or master mode is nearly the same. The only
difference is that during master mode operation, the SSIO outputs its clock from the SCLK pin. During slave
mode operation, the SCLK pin works as an input for the clock signal coming from an external syschronous
I/O.
[NOTE]
*1
The transmit data output from the SDO pin in the slave mode is output for synchronization after two cycles
of HCLK from the falling edge of the synchronous clock input from the SCLK pin.
The setup of data
receiving on the master side is time-critical by two cycles of HCLK.
19.3.2 Transmit Operation
Writing of transmit data to the synchronous SIO transmit-receive buffer register (SSIOBUF) triggers data
transmission and the synchronous SIO status register (SSIOST) BUSY flag is set to "1".
One clock (HCLK) after the transmit data is written, the transmit data is transferred from SSIOBUF to
the synchronous SIO transmit-receive shift register (SSIOREG).
At the same time, the TREMP bit of
the synchronous SIO interrupt request register (SSIOINT) is set to "1", allowing the next transmit data to
be written.
The synchronous clock is then output from the SCLK pin (only if Synchronous SIO is in master mode),
and the transmit data is output from the SDO pin, either as LSB first or MSB first, in synchronization
with the falling edge of the synchronous clock.
After that, transmit data is output in synchronization with the synchronous clock according to the
specification of the synchronous clock SIO control register (SSIOCON), and one frame of data is
transmitted.
If there is no new transmit data written to the transmit buffer register, the BUSY flag is
cleared to "0" and at the same time the TXCMP bit of the SSIOINT register is set to "1" to complete the
transmit operation.
Continuous transmit operation
Steps
to
of Section 19.3.2 are performed.
If the next transmit data is written to SSIOBUF from
the time TREMP = 1 is set in
to when the transmit operation is completed, when the current transmit
operation is completed, the next transmit data is automatically transferred to SSIOREG and data is
transmitted continuously.
Transmission is completed with step
in Section 19.3.2.
If the next data
has been written to the transmit buffer when one frame of data has been transmitted, no transmit
complete interrupt is generated.