Powerful Sensing Solutions for a Better Life DTOS ACCELEROMETER
MXC6226XU: Fully Integrated Thermal Acceleromete
MXC6226XU - DTOS Accelerometer
© 2010 MEMSIC, Inc.
One Technology Drive, Suite 325 Andover, MA 01810, USA
Tel: +1 978 738 0900 Fax: +1 978 738 0196
www.memsic.com
July 23, 2013
Information furnished by MEMSIC is believed to be accurate and reliable. However, no responsibility is assumed by MEMSIC for its
use, nor for any infringements of patents or other rights of third parties which may result from its use. No license is granted by
implication or otherwise under any patent or patent rights of MEMSIC. Information presented in this document is the property o
MEMSIC, Inc., is considered proprietary, and is not to be reproduced without the specific written permission of MEMSIC, Inc.
Document Version 1.3
Page 8 of 15
DTOS I2C Interface
A slave mode I2C interface, capable of operating in standard or fast mode, is implemented on the DTOS. The interface uses a serial data line (SDA)
and a serial clock line (SCL) to achieve bi-directional communication between master and slave devices. A master (typically a microprocessor)
initiates all data transfers to and from the device, and generates the SCL clock that synchronizes the data transfer. The SDA pin on the DTOS
operates both as an input and an open drain output. Since the DTOS only operates as a slave device, the SCL pin is always an input. There are
external pull-up resistors on the I2C bus lines. Devices that drive the I2C bus lines do so through open-drain n-channel driver transistors, creating a
wired NOR type arrangement.
Data on SDA is only allowed to change when SCL is low. A high to low transition on SDA when SCL is high is indicative of a START condition,
whereas a low to high transition on SDA when SCL is high is indicative of a STOP condition. When t he interface is not busy, both SCL and SDA are
high. A data transmission is initiated by the master pulling SDA low while SCL is high, generating a START condition. The data transmission occurs
serially in 8 bit bytes, with the MSB transmitted first. During each byte of transmitted data, the master will generate 9 clock pulses. The first 8 clock
pulses are used to clock the data, the 9th clock pulse is for the acknowledge bit. After the 8 bits of data are clocked in, the transmitting device
releases SDA, and the receiving device pulls it down so that it is stable low during the entire 9th clock pulse. By doing this, the receiving device
"acknowledges" that it has received the transmitted byte. If the slave receiver does not generate an acknowledge, then the master device can
generate a STOP condition and abort the transfer. If the master is the receiver in a data transfer, then it must signal the end of data to the slave by not
generating an acknowledge on the last byte that was clocked out of the slave. The slave must release SDA to allow the master to generate a STOP or
repeated START condition.
The master initiates a data transfer by generating a START condition. After a data transmission is complete, the master may terminate the data
transfer by generating a STOP condition. The bus is considered to be free again a certain time after the STOP condition. Alternatively, the master can
keep the bus busy by generating a repeated START condition instead of a STOP condition. This repeated START condition is functionally identical to
a START condition that follows a STOP. Each device that sits on the I2C bus has a unique 7-bit address.
The first byte transmitted by the master following a START is used to address the slave device.
The first 7 bits contain the address of the slave device, and the 8th bit is the R/W* bit (read = 1, write = 0; the asterisk indicates active low, and is used
instead of a bar). If the transmitted address matches up to that of the DTOS, then the DTOS will acknowledge receipt of the address, and prepare to
receive or send data.
If the master is writing to the DTOS, then the next byte that the DTOS receives, following the address byte, is loaded into the address counter internal
to the DTOS. The contents of the address counter indicate which register on the DTOS is being accessed. If the master now wants to write data to the
DTOS, it just continues to send 8-bit bytes. Each byte of data is latched into the register on the DTOS that the address counter points to. The address
counter is incremented after the transmission of each byte.
If the master wants to read data from the DTOS, it first needs to write the address of the register it wants to begin reading data fro m to the DTOS
address counter. It does this by generating a START, followed by the address byte containing the DTOS address, with R/W* = 0. The next transmitted
byte is then loaded into the DTOS address counter. Then, the master repeats the START condition and re-transmits the DTOS address, but this time
with the R/W* bit set to 1. During the next transmission period, a byte of data from the DTOS register that is addressed by the contents of the address
counter will be transmitted from the DTOS to the master. As in the case of the master writing to the DTOS, the contents of the address counter will be
incremented after the transmission of each byte. The prot ocol for m ultiple byte reads and writes bet ween a master and a slave d evice is depicted in