English
Language : 

PIC18F4550-IP Datasheet, PDF (216/438 Pages) Microchip Technology – 28/40/44-Pin, High-Performance, Enhanced Flash, USB Microcontrollers with nanoWatt Technology
PIC18F2455/2550/4455/4550
19.4.3.3 Reception
When the R/W bit of the address byte is clear and an
address match occurs, the R/W bit of the SSPSTAT
register is cleared. The received address is loaded into
the SSPBUF register and the SDA line is held low
(ACK).
When the address byte overflow condition exists, then
the no Acknowledge (ACK) pulse is given. An overflow
condition is defined as either bit, BF (SSPSTAT<0>), is
set, or bit, SSPOV (SSPCON1<6>), is set.
An MSSP interrupt is generated for each data transfer
byte. The Interrupt Flag bit, SSPIF, must be cleared in
software. The SSPSTAT register is used to determine
the status of the byte.
If SEN is enabled (SSPCON2<0> = 1), RB1/AN10/
INT1/SCK/SCL will be held low (clock stretch) following
each data transfer. The clock must be released by
setting bit, CKP (SSPCON1<4>). See Section 19.4.4
“Clock Stretching” for more detail.
19.4.3.4 Transmission
When the R/W bit of the incoming address byte is set
and an address match occurs, the R/W bit of the
SSPSTAT register is set. The received address is
loaded into the SSPBUF register. The ACK pulse will
be sent on the ninth bit and pin RB1/AN10/INT1/SCK/
SCL is held low regardless of SEN (see Section 19.4.4
“Clock Stretching” for more detail). By stretching the
clock, the master will be unable to assert another clock
pulse until the slave is done preparing the transmit
data. The transmit data must be loaded into the
SSPBUF register which also loads the SSPSR register.
Then the RB1/AN10/INT1/SCK/SCL pin should be
enabled by setting bit, CKP (SSPCON1<4>). The eight
data bits are shifted out on the falling edge of the SCL
input. This ensures that the SDA signal is valid during
the SCL high time (Figure 19-10).
The ACK pulse from the master-receiver is latched on
the rising edge of the ninth SCL input pulse. If the SDA
line is high (not ACK), then the data transfer is
complete. In this case, when the ACK is latched by the
slave, the slave logic is reset (resets SSPSTAT regis-
ter) and the slave monitors for another occurrence of
the Start bit. If the SDA line was low (ACK), the next
transmit data must be loaded into the SSPBUF register.
Again, the RB1/AN10/INT1/SCK/SCL pin must be
enabled by setting bit CKP (SSPCON1<4>).
An MSSP interrupt is generated for each data transfer
byte. The SSPIF bit must be cleared in software and
the SSPSTAT register is used to determine the status
of the byte. The SSPIF bit is set on the falling edge of
the ninth clock pulse.
DS39632E-page 214
© 2009 Microchip Technology Inc.