English
Language : 

LSM303DLHC Datasheet, PDF (21/43 Pages) STMicroelectronics – Ultra compact high performance e-compass 3D accelerometer and 3D magnetometer module
LSM303DLHC
Digital interfaces
5.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 16 explains how the
SAD is composed.
Table 16. SAD
Command
SAD[6:0]
R/W
Read
0011110
1
Write
0011110
0
SAD+R/W
00111101 (3Dh)
00111100 (3Ch)
Magnetic signal interface reading/writing
The interface uses an address pointer to indicate which register location is to be read from
or written to. These pointer locations are sent from the master to this slave device and
succeed the 7-bit address plus 1 bit Read/Write identifier.
To minimize the communication between the master and magnetic digital interface of
LSM303DLHC, the address pointer updates automatically without master intervention.
This automatic address pointer update has two additional features. First, when address 12
or higher is accessed, the pointer updates to address 00, and secondly, when address 08 is
reached, the pointer rolls back to address 03. Logically, the address pointer operation
functions as shown below.
If (address pointer = 08) then the address pointer = 03
Or else, if (address pointer >= 12) then the address pointer = 0
Or else, (address pointer) = (address pointer) + 1
The address pointer value itself cannot be read via the I2C bus.
Any attempt to read an invalid address location returns 0, and any write to an invalid
address location, or an undefined bit within a valid address location, is ignored by this
device.
Doc ID 018771 Rev 1
21/42