Data Sheet
MPR121 Sensor
23 Freescale Semiconductor
SERIAL COMMUNICATION
Introduction
The MPR121 uses an I
2
C Serial Interface. The MPR121 operates as a slave that sends and receives data through an I
2
C 2-
wire interface. The interface uses a Serial Data Line (SDA) and a Serial Clock Line (SCL) to achieve bi-directional
communication between master(s) and slave(s). A master (typically a microcontroller) initiates all data transfers to and from
the MPR121, and it generates the SCL clock that synchronizes the data transfer.
The MPR121 SDA line operates as both an input and an open-drain output. A pull-up resistor, typically 4.7 kΩ, is required on
SDA. The MPR121 SCL line operates only as an input. A pull-up resistor, typically 4.7 kΩ, is required on SCL if there are
multiple masters on the 2-wire interface, or if the master in a single-master system has an open-drain SCL output.
The I
2
C timing parameter is shown as below.
SDA
SCL
t
LOW
t
SU DAT
t
SU
STA
t
HD
DAT
t
t
HD
STA
t
SU
STO
t
BUF
t
HD
STA
ST
ART
CO
NDIT
IO
N
HIGH
t
R
t
F
REPEAT ED
ST
ART
CO
NDIT
IO
N
ST
O
P
CO
NDIT
IO
N
ST
ART
CO
NDIT
IO
N
Figure 6. Serial Interface Timing Details
Start and Stop Conditions
Each transmission consists of a START (S) condition signaled by a master, followed by the MPR121’s 7-bit slave address
plus R/W bit, a register address byte, one or more data bytes, and finally a STOP (P) condition (Figure 7). Both SCL and
SDA remain high when the interface is not busy. A master signals the beginning of a transmission with a START (S)
condition by transitioning SDA from high to low while SCL is high. When the master has finished communicating with the
slave, it issues a STOP (P) condition by transitioning SDA from low to high while SCL is high. The bus is then free for another
transmission.
SDA
SCL
S P
Figure 7. Start and Stop conditions
Bit Transfer
One data bit is transferred during each clock pulse (Figure 8). The data on SDA must remain stable while SCL is high.
Data line stable, data valid
Change of data allowed
Figure 8. Bit Transfer
SDA
SCL