Datasheet

Table Of Contents
2010 Microchip Technology Inc. Preliminary DS39979A-page 231
PIC18F87J72 FAMILY
FIGURE 18-24: I
2
C™ MASTER MODE WAVEFORM (RECEPTION, 7-BIT ADDRESSING)
P
98765
D0D1D2D3D4D5D6D7
S
A7 A6 A5 A4 A3 A2 A1
SDA
SCL
123456 789 12345678 9
123 4
Bus master
terminates
transfer
ACK
Receiving Data from Slave
Receiving Data from Slave
D0D1D2D3D4D5D6D7
ACK
R/W = 1
Transmit Address to Slave
SSPIF
BF
ACK is not sent
Write to SSPCON2<0> (SEN = 1),
Write to SSPBUF occurs here,
ACK from Slave
Master configured as a receiver
by programming SSPCON2<3> (RCEN = 1)
PEN bit = 1
written here
Data shifted in on falling edge of CLK
Cleared in software
start XMIT
SEN = 0
SSPOV
SDA = 0, SCL = 1
while CPU
(SSPSTAT<0>)
ACK
Cleared in software
Cleared in software
Set SSPIF interrupt
at end of receive
Set P bit
(SSPSTAT<4>)
and SSPIF
ACK from Master,
Set SSPIF at end
Set SSPIF interrupt
at end of Acknowledge
sequence
Set SSPIF interrupt
at end of Acknowledge
sequence
of receive
Set ACKEN, start Acknowledge sequence,
SDA = ACKDT = 1
RCEN cleared
automatically
RCEN = 1, start
next receive
Write to SSPCON2<4>
to start Acknowledge sequence,
SDA = ACKDT (SSPCON2<5>) = 0
RCEN cleared
automatically
ACKEN
begin Start condition
Cleared in software
SDA = ACKDT = 0
Last bit is shifted into SSPSR and
contents are unloaded into SSPBUF
Cleared in
software
SSPOV is set because
SSPBUF is still full
responds to SSPIF