XI - 13
Chapter 11
Serial Interface 0
Operation
nStart Condition Setup
The SC0STE flag of the SC0MD0 register sets if a start condition is enabled or not. If a start condition is
selected, and input at communication, a bit counter is cleared to restart the communication. The start
condition is regarded that when a clock line (SBT pin) is "H", data line (SBI pin (with 3 lines) or SBO pin
(with 2 lines)) is changed from "H" to "L". Both the SC0SBOS flag and the SC0SBIS flag of the SC0MD1
register should be set to "0", before the start condition setup is changed.
nFirst Transfer bit Setup
The SC0DIR flag of the SC0MD0 register can set the transfer first bit. MSB first or LSB first can be
selected.
nTransmission Data Buffer
The transmission data buffer, TXBUF0 is a buffer of reserve that stores data to load the internal shift
register. Data to be transfered should be set to the transmission data buffer, TXBUF0, to be loaded to the
internal shifr register automatically. The first data loading to the internal shift register is done at the same
timing of the data setting to TXBUF0.
nReceived Data Buffer
The received data buffer RXBUF0 is a buffer of reserve that pushed the received data in the internal shift
register. After the communication complete interrupt SC0TIRQ is generated, all data stored in the inter-
nal shift register are stored to the received data buffer RXBUF0 automatically. RXBUF0 can store data
up to 1 byte. RXBUF0 is rewritten in everytime when communication is completed, so read out data of
RXBUF0 till the next receive is completed. The received data buffer empty flag SC0REMP is set to "1" at
the same time SC0TIRQ is generated. SC0REMP is cleared to "0" after RXBUF0 is read out.
Start condition should be switched after both the SC0SBOS and the SC0SBIS flags of the
SC0MD1 register are set to "0". If they are not set to "0", the switching is not valid.
If a start condition is input to restart during communication, the transmission data is not valid.
Set the transmission data to TXBUF0 again to operate the transmission again.
RXBUF0 is rewritten everytime when communication is completed. At continuous communi-
cation, data of RXBUF0 should be read out until the next reception is completed.