Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4650 Datasheet(PDF) 69 Page - STMicroelectronics

Part # AN4650
Description  This document is intended to provide usage information
PDF  102 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4650 Datasheet(HTML) 69 Page - STMicroelectronics

Back Button AN4650 Datasheet HTML 65Page - STMicroelectronics AN4650 Datasheet HTML 66Page - STMicroelectronics AN4650 Datasheet HTML 67Page - STMicroelectronics AN4650 Datasheet HTML 68Page - STMicroelectronics AN4650 Datasheet HTML 69Page - STMicroelectronics AN4650 Datasheet HTML 70Page - STMicroelectronics AN4650 Datasheet HTML 71Page - STMicroelectronics AN4650 Datasheet HTML 72Page - STMicroelectronics AN4650 Datasheet HTML 73Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 69 / 102 page
background image
DocID027415 Rev 1
69/102
AN4650
Mode 2 - sensor hub mode
102
The code provided below gives a basic routine to configure the LIS3MDL external
magnetometer sensor (refer to the datasheet for additional details) in continuous-conversion
mode, initialize the hard-iron and soft-iron correction registers and read the magnetometer
output registers. In this case, the pass-through feature is not used for the magnetometer
configuration.
YZ
-0.130089
MAG_SI_YZ = 81h
ZX
+0.052327
MAG_SI_ZX = 00h
ZY
-0.130089
MAG_SI_ZY = 81h
ZZ
+1.243645
MAG_SI_ZZ = 0Ah
1
Write 80h into FUNC_CFG_ADDRESS
// Enable access to embedded functions registers
2
Write 38h into SLV0_ADD
// LIS3MDL slave address = 0011100b (if SDO=0)
// Enable write operation (rw_0=0)
3
Write 22h into SLV0_SUBADD
// 22h is the LIS3MDL register to be written
4
Write 00h into
DATAWRITE_SRC_MODE_SUB_SLV0
// 00h is the value to be written in register 22h of
// LIS3MDL to configure it in continuous
// conversion mode
5
Write 00h into FUNC_CFG_ADDRESS
// Disable access to embedded functions registers
6
Write 3Ch into CTRL10_C
// Enable embedded functions
7
Write 09h into MASTER_CONFIG
// Enable internal pull-up on SDx/SCx lines
// Sensor hub trigger signal is XL Data Ready
// Enable auxiliary I2C master
8
Write 80h into CTRL1_XL
// Turn-on the accelerometer (for trigger signal)
9
Write 38h into CTRL10_C
// Disable embedded functions
10 Write 00h into MASTER_CONFIG
// Disable auxiliary I2C master
11 Write 00h into CTRL1_XL
// Turn-off the accelerometer
12 Write 80h into FUNC_CFG_ADDRESS
// Enable access to embedded functions registers
13 Write 39h into SLV0_ADD
// LIS3MDL slave address = 0011100b (if SDO=0)
// Enable read operation (rw_0=1)
14 Write 28h into SLV0_SUBADD
// 28h is the first LIS3MDL output register to be
// read
15 Write 06h into SLAVE0_CONFIG
// No decimation
// 1 external sensor connected
// Number of registers to read = 6
16 Write F7h into MAG_OFFX_H
// X offset value initialization
17 Write 08h into MAG_OFFX_L
// X offset value initialization
Table 51. Soft-iron register values (continued)
Soft-iron matrix elements
Register values



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com