AN092
© Kionix 2019 All Rights Reserved
11 July 2019
Page 16 of 27
3.6.
Tilt Engine
3.6.1.
Activate Tilt Position Function with Face Detect
-
Write 0x00 to Control Register 1 (CNTL1) to set the accelerometer in stand-by mode.
Register Name
Address
Value
CNTL1
0x1B
0x00
-
Write 0x3F to Control 2 register (CNTL2) to enable Tilt detection from positive and negative
directions of all three axes (+x, -x, +y, -y, +z, -z).
This step is optional as this is also a default
setting.
Register Name
Address
Value
CNTL2
0x1C
0x3F
-
Write 0xA8 to Control 3 register (CNTL3) to set the output data rate for the Tilt Position
function to 12.5Hz.
This step is optional as this is also a default setting
.
Register Name
Address
Value
CNTL3
0x1D
0xA8
-
Write 0x01 to TILT_TIMER register. Here we assume an 80 msec timer will be sufficient. Note
that each count value written to this register is calculated as 1/(Tilt Position ODR) = 1/12.5Hz
= 80 msec.
Register Name
Address
Value
TILT_TIMER
0x29
0x01
-
Write 0x0C to Tilt Angle Low Limit (TILT_ANGLE_LL) register to set the low threshold to 22º
from Horizontal. The value is calculated using the following equations: TILT_ANGLE_LL
(counts) = sin θ * (32 (counts/g)).
This step is optional as this is also a default setting.
Register Name
Address
Value
TILT_ANGLE_LL
0x37
0x0C
-
Write 0x2A to Tilt Angle High Limit (TILT_ANGLE_HL) register to set the High threshold.
This
step is optional as this is also a default setting.
Register Name
Address
Value
TILT_ANGLE_HL
0x38
0x2A
-
Write 0x14 to HYST_SET register to set the hysteresis that is placed between the screen
rotation states to ±15º.
This step is optional as this is also a default setting.
Register Name
Address
Value
HYST_SET
0x39
0x14