SAM3X8E Atmel Corporation, SAM3X8E Datasheet - Page 716

no-image

SAM3X8E

Manufacturer Part Number
SAM3X8E
Description
Manufacturer
Atmel Corporation
Datasheets
33.8
33.8.1
33.8.2
33.8.3
33.8.4
716
716
Master Mode
SAM3X/A
SAM3X/A
Definition
Application Block Diagram
Programming Master Mode
Master Transmitter Mode
The Master is the device that starts a transfer, generates a clock and stops it.
Figure 33-5. Master Mode Typical Application Block Diagram
The following registers have to be programmed before entering Master mode:
After the master initiates a Start condition when writing into the Transmit Holding Register,
TWI_THR, it sends a 7-bit slave address, configured in the Master Mode register (DADR in
TWI_MMR), to notify the slave device. The bit following the slave address indicates the transfer
direction, 0 in this case (MREAD = 0 in TWI_MMR).
The TWI transfers require the slave to acknowledge each received byte. During the acknowl-
edge clock pulse (9th pulse), the master releases the data line (HIGH), enabling the slave to pull
it down in order to generate the acknowledge. The master polls the data line during this clock
pulse and sets the Not Acknowledge bit (NACK) in the status register if the slave does not
acknowledge the byte. As with the other status bits, an interrupt can be generated if enabled in
the interrupt enable register (TWI_IER). If the slave acknowledges the byte, the data written in
the TWI_THR, is then shifted in the internal shifter and transferred. When an acknowledge is
detected, the TXRDY bit is set until a new write in the TWI_THR.
TXRDY is used as Transmit Ready for the PDC transmit channel.
1. DADR (+ IADRSZ + IADR if a 10 bit device is addressed): The device address is used
2. CKDIV + CHDIV + CLDIV: Clock Waveform.
3. SVDIS: Disable the slave mode.
4. MSEN: Enable the master mode.
Rp: Pull up value as given by the I²C Standard
Host with
Interface
to access slave devices in read or write mode.
TWI
TWD
TWCK
Serial EEPROM
Atmel TWI
Slave 1
I²C RTC
Slave 2
Controller
I²C LCD
Slave 3
I²C Temp.
Sensor
Slave 4
Rp
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12
Rp
VDD

Related parts for SAM3X8E