Datasheet

± 2g / 4g / 8g / 16g Tri-axis Digital
Accelerometer Specifications
PART NUMBER:
KX132-1211
Rev. 1.0
31-Jul-2019
36 Thornwood Dr. Ithaca, NY 14850 © 2019 Kionix All Rights Reserved
tel: 607-257-1080 – fax:607-257-1146 893-12874-1907311605-0.2
www.kionix.com - info@kionix.com Page 20 of 31
Writing to an 8-bit Register
Upon power up, the Master must write to the KX132’s control registers to set its operational mode. Therefore, when writing
to a control register on the I
2
C bus, as shown Sequence 1 on the following page, the following protocol must be observed:
After a start condition, SAD+W transmission, and the KX132-1211 ACK has been returned, an 8-bit Register Address (RA)
command is transmitted by the Master. This command is telling the KX132-1211 to which 8-bit register the Master will be
writing the data. Since this is I
2
C mode, the LSB of the RA command should always be zero (0). The KX132-1211
acknowledges the RA and the Master transmits the data to be stored in the 8-bit register. The KX132-1211 acknowledges
that it has received the data and the Master transmits a stop condition (P) to end the data transfer. The data sent to the
KX132-1211 is now stored in the appropriate register. The KX132-1211 automatically increments the received RA
commands and, therefore, multiple bytes of data can be written to sequential registers after each Slave ACK as shown in
Sequence 2 on the following page.
Note** If a STOP condition is sent on the least significant bit of write data or the following master acknowledge cycle, the
last write operation is not guaranteed and it may alter the content of the affected registers
Reading from an 8-bit Register
When reading data from a KX132-1211 8-bit register on the I
2
C bus, as shown in Sequence 3 on the next page, the following
protocol must be observed: The Master first transmits a start condition (S) and the appropriate Slave Address (SAD) with
the LSB set at ‘0’ to write. The KX132-1211 acknowledges and the Master transmits the 8-bit RA of the register it wants to
read. The KX132-1211 again acknowledges, and the Master transmits a repeated start condition (Sr). After the repeated
start condition, the Master addresses the KX132-1211 with a ‘1’ in the LSB (SAD+R) to read from the previously selected
register. The Slave then acknowledges and transmits the data from the requested register. The Master does not
acknowledge (NACK) it received the transmitted data, but transmits a stop condition to end the data transfer. Note that the
KX132-1211 automatically increments through its sequential registers, allowing data to be read from multiple registers
following a single SAD+R command as shown below in Sequence 4 on the following page. Reading data from a buffer read
register is a special case because if register address (RA) is set to buffer read register (BUF_READ) in Sequence 4, the
register auto-increment feature is automatically disabled. Instead, the Read Pointer will increment to the next data in the
buffer, thus allowing reading multiple bytes of data from the buffer using a single SAD+R command.
Note** Accelerometer’s output data should be read in a single transaction using the auto-increment feature to prevent output
data from being updated prior to intended completion of the read transaction.