
293
CHAPTER 13
SERIAL INTERFACE SIO0
User’s Manual U12790EJ2V0UD
Example of program for clearing serial transfer status
SET1
P2.5
; (1)
SET1
PM2.5
; (2)
SET1
PM2.7
; (3)
CLR1
CSIE0
; (4)
SET1
CSIE0
; (5)
SET1
RELT
; (6)
CLR1
PM2.7
; (7)
CLR1
P2.5
; (8)
CLR1
PM2.5
; (9)
(1) Instruction (5) prevents the SDA0 pin from outputting a low level when the I2C bus mode is restored. The
SDA0 pin goes into a high-impedance state.
(2) Instruction (4) sets the P25 (/SDA0) pin in the input mode to prevent the SDA0 line from being affected when
the port mode is restored. The input mode is set when instruction (2) is executed.
(3) Instruction (4) sets the P27 (/SCL) pin in the input mode to prevent the SCL line from being affected when
the port mode is restored. The input mode is set when instruction (3) is executed.
(4) The mode is changed from the I2C bus mode to the port mode.
(5) The mode is changed from the port mode to the I2C bus mode.
(6) Instruction (8) prevents the SDA0 pin from outputting a low level.
(7) Because the P27 pin must be set in the output mode in the I2C bus mode, the P27 pin is set in the output
mode.
(8) Because the output latch of the P25 pin must be set to 0 in the I2C bus mode, the output latch of the P25
pin is set to 0.
(9) Because the P25 pin must be set in the output mode in the I2C bus mode, the P25 pin is set in the output
mode.
Remark
RELT: Bit 0 of serial bus interface control register 0 (SBIC0)