English
Language : 

LSM303DLM Datasheet, PDF (19/38 Pages) STMicroelectronics – Sensor module:3-axis accelerometer and 3-axis magnetometer
LSM303DLM
Digital interfaces
7.1.2
Linear acceleration digital interface
For linear acceleration, the default (factory) 7-bit slave address is 001100xb. The SDO/SA0
pad can be used to modify the least significant bit of the device address. If the SA0 pad is
connected to voltage supply, the LSB is ‘1’ (address 0011001b) otherwise, if the SA0 pad is
connected to ground, the LSB value is ‘0’ (address 0011000b). This solution permits
connecting and addressing two different accelerometers to the same I2C lines.
The slave address is completed with a read/write bit. If the bit is ‘1’ (read), a repeated
START (SR) condition must be issued after the two sub-address bytes; if the bit is ‘0’ (write),
the master transmits to the slave with the direction unchanged. Table 12 explains how the
SAD+read/write bit pattern is composed, listing all the possible configurations.
Table 12. SAD and read/write patterns
Command
SAD[6:1]
SAD[0] = SA0
Read
001100
0
Write
001100
0
Read
001100
1
Write
001100
1
R/W
SAD+R/W
1
00110001 (31h)
0
00110000 (30h)
1
00110011 (33h)
0
00110010 (32h)
In order to read multiple bytes, it is necessary to assert the most significant bit of the sub-
address field. In other words, SUB(7) must be equal to 1 while SUB(6-0) represents the
address of the first register to be read.
In the presented communication format, MAK is master acknowledge and NMAK is no
master acknowledge.
Table 13. Transfer when master is receiving (reading) multiple bytes of data from slave
Master ST SAD+W
SUB
SR SAD+R
MAK
MAK
NMAK SP
Slave
SAK
SAK
SAK DATA
DATA
DATA
7.1.3
Magnetic field digital interface
For magnetic sensors the default (factory) 7-bit slave address is 0011110xb.
The slave address is completed with a read/write bit. If the bit is ‘1’ (read), a repeated
START (SR) condition must be issued after the two sub-address bytes; if the bit is ‘0’ (write),
the master transmits to the slave with the direction unchanged. Table 14 explains how the
SAD is composed.
Table 14. SAD and read/write patterns
Command
SAD[6:0]
R/W
Read
0011110
1
Write
0011110
0
SAD+R/W
00111101 (3Dh)
00111100 (3Ch)
Doc ID 018725 Rev 1
19/38