数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN2989 数据表(PDF) 23 Page - STMicroelectronics

部件名 AN2989
功能描述  high performance ultra low-power 3-axis accelerometer
PDF  28 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN2989 数据表(HTML) 23 Page - STMicroelectronics

Back Button AN2989 Datasheet HTML 19Page - STMicroelectronics AN2989 Datasheet HTML 20Page - STMicroelectronics AN2989 Datasheet HTML 21Page - STMicroelectronics AN2989 Datasheet HTML 22Page - STMicroelectronics AN2989 Datasheet HTML 23Page - STMicroelectronics AN2989 Datasheet HTML 24Page - STMicroelectronics AN2989 Datasheet HTML 25Page - STMicroelectronics AN2989 Datasheet HTML 26Page - STMicroelectronics AN2989 Datasheet HTML 27Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 23 / 28 page
background image
AN2989
Interrupt generation
Doc ID 15761 Rev 1
23/28
5.4.2
Using the HP filter
The code which follows provides a basic routine showing the practical use of the inertial
wakeup feature performed on high-pass filtered data. In particular, the device is configured
to recognize when the high-frequency component of the acceleration applied along either
the X, Y or Z axis exceeds a preset threshold (250 mg is used in the example). The event
which triggers the interrupt is latched inside the device and its occurrence is signalled
through the INT1 pin.
At step 8, a dummy read at the HP_FILTER_RESET register is performed to set the
current/reference acceleration/tilt state against which the device performed the threshold
comparison.
This read may be performed any time it is required to set the orientation/tilt of the device as
a reference state without waiting for the filter to settle.
5.5
Free-fall detection
Free-fall detection refers to a specific configuration of the INTx_CTRL registers that allows
the recognition of device free-fall: the acceleration measurements along all the axes go to
zero. In real cases, a “free-fall zone” is defined around the zero-g level, where all
accelerations are small enough to generate the interrupt (Figure 11).
1
write 2Fh into CTRL_REG1
// Turn on the sensor, enable X, Y and Z
// ODR = 100 Hz
2
write 15h into CTRL_REG2
// High-pass filter enabled on data and interrupt1
3
write 00h into CTRL_REG3
// Latched interrupt active high on INT1 pad
4
write 00h into CTRL_REG4
// FS = 2 g
5
write 00h into CTRL_REG5
// Sleep to wake disabled
6
write10h into INT1_THS
// Threshold = 250 mg
7
write 00h into INT1_DURATION
// Duration = 0
8
read HP_FILTER_RESET
// Dummy read to force the HP filter to
// actual acceleration value
// (i.e. set reference acceleration/tilt value)
9
write 2Ah into INT1_CFG
// Configure desired wakeup event
10
poll INT1 pad; if INT1 = 0 then goto 9
// Poll INT1 pin waiting for the
// wakeup event
11
(Wakeup event has occurred; insert your
code here)
// Event handling
12
read INT1_SRC
// Return the event that has triggered the
// interrupt and clear interrupt
13
(Insert your code here)
// Event handling
14
goto 9



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


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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