MMA8491Q
Sensors
14 Freescale Semiconductor, Inc.
4 Serial Interface (I
2
C)
Acceleration data may be accessed through an I
2
C interface thus making the device particularly suitable for direct interfacing with
a microcontroller. The MMA8491Q features three interrupt signals which indicate the tilt-sensing results on X, Y, Z axis
respectively. The raw accelerometer data are readable via I
2
C at the same time when interrupt signal is available.
The registers embedded inside the MMA8491Q are accessible through the I
2
C serial interface (Table 8). To enable the I
2
C
interface, the EN pin must be HIGH. If either EN or V
DD
are absent, the MMA8491Q I
2
C interface reads invalid data. The I
2
C
interface may be used for communications along with other I
2
C devices. Removing power from the V
DD
pin of the MMA8491Q
does not affect the I
2
C bus.
There are two signals associated with the I
2
C bus; the Serial Clock Line (SCL) and the Serial Data Line (SDA). The latter is a
bidirectional line used for sending and receiving the data to/from the interface. External pullup resistors connected to V
DD
are
expected for SDA and SCL. When the bus is free both the lines are HIGH. The I
2
C interface is compliant with Fast mode (400 kHz,
Ta b le 6 ).
4.1 I
2
C operation
The transaction on the bus is started through a start condition (START) signal. A START condition is defined as a HIGH-to-LOW
transition on the data line while the SCL line is held HIGH.
After START has been transmitted by the Master, the bus is considered busy. The next byte of data transmitted after START
contains the slave address in the first 7 bits, and the 8th bit tells whether the Master is receiving data from the slave or transmitting
data to the slave. When an address is sent, each device in the system compares the first 7 bits after a start condition with its
address. If they match, then the device considers itself addressed by the Master.
The 9th clock pulse, following the slave address byte (and each subsequent byte), is the acknowledge (ACK). The transmitter
must release the SDA line during the ACK period. The receiver must then pull the data line LOW so that it remains stable low
during the high period of the acknowledge clock period.
A LOW-to-HIGH transition on SDA while SCL is HIGH is defined as a stop condition (STOP). A data transfer is always terminated
by a STOP.
A Master may also issue a repeated START during a data transfer. The MMA8491Q expects repeated STARTs to be used to
randomly read from specific registers.
The MMA8491Q accelerometer standard 7-bit slave address is 01010101(0x55).
4.2 Single byte read
The transmission of an 8-bit command begins on the falling edge of SCL. After the 8 clock cycles are used to send the command,
note that the data returned is sent with the MSB first after the data is received. Figure 10 shows the timing diagram for the
accelerometer 8-bit I
2
C read operation.
1. The Master (or MCU) transmits a start condition (ST) to the MMA8491Q, slave address (0x55), with the R/W bit set to
“0” for a write, and the MMA8491Q sends an acknowledgement.
2. Then the Master (or MCU) transmits the address of the register to read and the MMA8491Q sends an
acknowledgement.
3. The Master (or MCU) transmits a repeated start condition (SR) and then addresses the MMA8491Q (0x1D) with the R/
W bit set to “1” for a read from the previously selected register.
4. The Slave then acknowledges and transmits the data from the requested register.
5. The Master does not acknowledge (NAK) the transmitted data, but transmits a stop condition to end the data transfer.
Table 8. Serial interface pins
Pin Description
SCL I
2
C Serial Clock
SDA I
2
C Serial Data
Table 9. I
2
C device address sequence
Command
[7:1]
Device Address
[7:1]
Device Address
[0]
R/W
[7:0]
8-bit Final Value
Read 01010101 0x55 1 0xAB
Write 01010101 0x55 0 0xAA