AT07334: SAM4 TWI Master Mode Driver [APPLICATION NOTE]
42274A-MCU-05/2014
6
2. Module Overview
This driver provides access to the main features of the TWIM controller. The two wire interface connects
components via a two-wire serial bus, each device, on the bus, has a unique ID.
The TWI modules are programmable as masters with sequential or single-byte access. High speed mode capability
is also supported.
The TWI bus provides a simple, but efficient method of interconnecting multiple master and slave devices. An
arbitration mechanism is provided for resolving bus ownership between masters, as only one master device may
own the bus at any given time. The arbitration mechanism relies on the wired-AND connections to avoid bus drivers
short-circuiting.
2.1 TWI Bus Topology
Figure 2-1: I2C bus topology on page 6. The pull-up resistors (R
s
) will provide a high level on the bus lines
when none of the TWI devices are driving the bus. These are optional, and can be replaced with a constant current
source.
Figure 2-1. I2C bus topology
I2C DEVICE
#1
R
P
R
P
R
S
R
S
SDA
SCL
V
CC
I2C DEVICE
#2
R
S
R
S
I2C DEVICE
#N
R
S
R
S
Note: R
S
is optional