I2C Bus Controller
I2C Interface Setup Examples
MN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company
301
Panasonic
13.6.1.3Setting Up the Second Interrupt
When the microcontroller receives the data x’85’ from the slave device, it r eturns
an ACK = 0 signal and the I2C bus controller generates an interrupt. At this point,
implement the following settings:
To set up the interrupt:
Set the I2C0ICH and I2C0ICL register pair (x’00FC9C’) to x’0100’. This
enables I2C interrupts and clears the previous interrupt request.
To set up the I2C registers:
1. Read the I2CDREC register (x’007E42’) to determine the I2C bus control ler
status.
2. Since the communication will end when the microcontroller receives the
next data byte, set the I2CDTRM register (x’007E40’) to x’0100’. This sets
STA to 0, STP to 0, ACK to 1, and the transmission data to x’00’. With this
setting, the microcontroller returns an ACK = 1 signal on the ninth clock.
13.6.1.4Setting Up the Third Interrupt
When the microcontroller receives the data x’33’ from the slave device, it r eturns
an ACK = 1 signal and the I2C bus controller generates an interrupt. At this point,
implement the following settings:
To set up the interrupt:
Set the I2C0ICH and I2C0ICL register pair (x’00FC9C’) to x’0100’. This
enables I2C interrupts and clears the previous interrupt request.
To set up the I2C registers:
1. Read the I2CDREC register (x’007E42’) to determine the I2C bus control ler
status.
2. Since the transfer has ended, set the I2CDTRM register (x’007E40’) to
x’0300’. This sets STA to 0, STP to 1, ACK to 1, and the transmission data
to x’00’. With this setting, the microcontroller issues a stop condition and
frees the bus.
Note: The circled areas are signals output from the MN102H75K/85K.
Figure 13-7 Waveform for Master Transmitter Transitioning to Master Receiver
1
SR/W
0ACK P
Data
(slave address)
11
11110
ACK
1111
1
00000000 00
ACK
111
SDA
SCL