English
Language : 

LSM303AGR Datasheet, PDF (41/68 Pages) STMicroelectronics – ultra-low-power 3D accelerometer and 3D magnetometer
LSM303AGR
Digital interfaces
Figure 15. Magnetometer multiple byte SPI write protocol (2-byte example)
CS
SPC
SDI
DI7 D I6 DI5 D I4 DI3 DI2 DI1 DI0 DI15 D I1 4 DI13 D I1 2 DI11 DI10 DI9 DI8
RW
AD6 AD5 AD4 AD3 AD2 AD1 AD 0
6.2.4
Magnetometer SPI read
Figure 16. Magnetometer SPI read protocol
CS
SPC
SDI/O
RW
D O7 D O6 D O5 DO4 DO3 DO2 DO1 DO0
AD6 AD5 AD 4 AD 3 AD2 AD1 AD 0
The SPI read command is performed with 16 clock pulses:
bit 0: WRITE bit. The value is 1.
bit 1-7: address AD(6:0). This is the address field of the indexed register.
bit 8-15: data DO(7:0) (read mode). This is the data that is read from the device (MSb first).
A multiple read command is available in 3-wire mode.
DocID027765 Rev 5
41/68
68