Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN2381 Datasheet(PDF) 41 Page - STMicroelectronics

Part # AN2381
Description  low voltage linear accelerometer
PDF  47 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2381 Datasheet(HTML) 41 Page - STMicroelectronics

Back Button AN2381 Datasheet HTML 37Page - STMicroelectronics AN2381 Datasheet HTML 38Page - STMicroelectronics AN2381 Datasheet HTML 39Page - STMicroelectronics AN2381 Datasheet HTML 40Page - STMicroelectronics AN2381 Datasheet HTML 41Page - STMicroelectronics AN2381 Datasheet HTML 42Page - STMicroelectronics AN2381 Datasheet HTML 43Page - STMicroelectronics AN2381 Datasheet HTML 44Page - STMicroelectronics AN2381 Datasheet HTML 45Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 41 / 47 page
background image
AN2381
Application information
41/47
6.5
Inertial wake-up
6.5.1
HP filter bypassed
This paragraph provides a basic algorithm which shows the practical use of the inertial
wake-up feature. In particular, with the code below, the device is configured to recognize
when the absolute acceleration along either X or Y axis exceeds a preset threshold (100mg
used in the example). The event which triggers the interrupt is latched inside the device and
its occurrence is signalled through the usage of the RDY/INT pin.
6.5.2
Using the HP filter
The code provided below gives a basic routine which shows the practical use of the inertial
wake-up feature performed onto high-pass filtered data. In particular the device is
configured to recognize when the high-frequency component of the acceleration applied
along either X, Y or Z axis exceeds a preset threshold (100mg used in the example). The
event which triggers the interrupt is latched inside the device and its occurrence is signalled
through the usage of the RDY/INT pin.
1
write C7h into CTRL_REG1
// Turn on the sensor and set DF=512
2
write 08h into CTRL_REG2
// Enables interrupt generation
3
write 08h into CTRL_REG3
// Set CTRL_REG3 to its default state
4
write 60h into FF_WU_THS_L register
// Set the lower part of wake-up threshold
5
write 06h into FF_WU_THS_H register
// Set the higher part of wake-up threshold
6
write 00h into FF_WU_DURATION
register
// No filtering/confirmation on the event
7
write 4Ah into FF_WU_CFG
// Configure desired wake-up event
8
poll RDY/INT pad; if RDY/INT=0 then
goto 8
// Poll RDY/INT pin waiting for the
// wake-up event
9
read FF_WU_SRC register
// Return the event that has triggered the
// interrupt
10
(Wake-up event has occurred; insert
your code here)
// Event handling
11
read FF_WU_ACK register
// Clear interrupt request
12
goto 8
1
write C7h into CTRL_REG1
// Turn on the sensor and set DF=512
2
write 08h into CTRL_REG2
// Enables interrupt generation
3
write 28h into CTRL_REG3
// Enable the HP filter and force HPc=512
4
write 60h into FF_WU_THS_L register
// Set the lower part of wake-up threshold
5
write 06h into FF_WU_THS_H register
// Set the higher part of wake-up threshold
6
write 00h into FF_WU_DURATION
register
// No filtering/confirmation on the event



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


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