Skip to content

SPI and I2C (MSSP)

The MSSP (Master Synchronous Serial Port) module supports SPI and I2C.

  • Master generates clock (SCK)
  • Lines: SDO, SDI, SCK, SS (chip select)
  • Full duplex, synchronous
  • Used with serial EEPROMs, displays, sensors
SPI master mode waveforms on the PIC18F4550
SPI master waveforms: relationship between SCK, SDO, SDI and CKP, CKE, SMP bits. — Microchip PIC18F4550 Datasheet — FIGURE 19-3
SPI mode table and MSSP registers
Standard SPI modes (CKP/CKE) and related registers: SSPCON1, SSPSTAT, SSPBUF. — Microchip PIC18F4550 Datasheet — TABLE 19-1 and 19-2
  • Two wires: SDA (data), SCL (clock)
  • Modes: Master, Multi-Master, Slave
  • 7- or 8-bit device addressing
  • Used with sensors, RTC, memories
I2C slave mode timing on the PIC18F4550
I2C slave timing: address sequence, read/write, and ACK. — Microchip PIC18F4550 Datasheet — FIGURE 19-8
  • SSPCON1, SSPCON2 — control
  • SSPSTAT — status
  • SSPBUF — data buffer
  • SSPADD — I2C address (slave mode)

See the datasheet for detailed configuration tables.

Interactive exam

SPI and I2C

Based on: PIC18LF4455-I-PT.PDF

0 of 0 answered

I2C typically uses how many data wires?
The PIC18 MSSP module can be used for...