258
CHAPTER 8 APPLICATIONS OF SERIAL INTERFACE
(5) Limitation when using I
2
C bus mode
The following limitation applies when the
μ
PD78054Y, 78064Y, 78078Y, 780058Y, 780308Y, 78058FY,
78075BY subseries, and
μ
PD78070AY are used. This section explains an example using the
μ
PD78054Y.
Limitation when the device is used as a slave device in the I
2
C bus mode
Description:
If the wake-up function is executed (by setting the WUP flag (bit 5 of serial operation mode
register 0 (CSIM0) to 1) in the serial transfer status
Note
, the data between other slave device
and the master devices is checked as an address. If that data coincides with the slave address
of the
μ
PD78054Y, therefore, the
μ
PD78054Y takes part in communication, destroying the
communication data.
Note
The serial transfer status is the status from when the serial I/O shift register 0 (SIO0)
has been written until the interrupt request flag (CSIIF0) is set to 1 by completion of
serial transfer.
Preventive measures:
The above problem can be prevented by modifying the program.
Before executing the wake-up function, execute the following program that clears
the serial transfer status. When executing the wake-up function, do not execute
an instruction that writes data to SIO0. Even if such an instruction is executed,
data can be received when the wake-up function is executed.
This program is to clear the serial transfer status. To clear the serial transfer status,
serial interface channel 0 must be stopped (by clearing the CSIE0 flag (bit 7 of the
serial operation mode register (CSIM0) to 0). If the serial interface channel 0 is
stopped in the I
2
C bus mode, however, the SCL pin outputs a high level and the
SDA0 (SDA1) pin outputs a low level, affecting communication on the I
2
C bus.
Therefore, this program allows the SCL and SDA0 (SDA1) pin to go into a high-
impedance state to prevent the I
2
C bus from being affected.
Note that, in this example, the serial data input/output pin is SDA0 (/P25). If SDA1
(/P26) is used as the serial data input/output pin, take P2.5 and PM2.5 in the
program as P2.6 and PM2.6.