Datasheet
MMA8451Q
Sensors
Freescale Semiconductor, Inc. 29
0x14: P_L_THS_REG Portrait/Landscape Threshold and Hysteresis Register
This register represents the Portrait to Landscape trip threshold register used to set the trip angle for transitioning from Portrait
to Landscape and Landscape to Portrait. This register includes a value for the hysteresis.
:
Table 32 is a lookup table to set the threshold. This is the center value that will be set for the trip point from Portrait to
Landscape and Landscape to Portrait. The default Trip Angle is 45° (0x10). The default hysteresis is ±14°.
Note: The condition THS + HYS > 0 and THS + HYS < 32 must be met in order for Landscape/Portrait detection to work properly.
The value of 32 represents the sum of both P_L_THS and HYS register values in decimal. For example, THS angle = 75°,
P_L_THS = 25(dec) then max HYS must be set to 6 to meet the condition THS+HYS < 32. To configure correctly the hysteresis
(HYS) angle must be smaller than the threshold angle (P_L_THS).
Table 29. Z-Lock Threshold Angles
Z-Lock Value Threshold Angle
0x00 14°
0x01 18°
0x02 21°
0x03 25°
0x04 29°
0x05 33°
0x06 37°
0x07 42°
Table 30. Back/Front Orientation Definition
BKFR Back/Front Transition Front/Back Transition
00 Z < 80° or Z
>
280°
Z > 100° and Z < 260°
01 Z < 75° or Z
>
285°
Z > 105° and Z < 255°
10 Z < 70° or Z
>
290°
Z > 110° and Z < 250°
11 Z < 65° or Z
>
295°
Z > 115° and Z < 245°
0x14: P_L_THS_REG Register (Read/Write)
Bit
7
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
P_L_THS[4] P_L_THS[3] P_L_THS[2] P_L_THS[1] P_L_THS[0] HYS[2] HYS[1] HYS[0]
Table 31. P_L_THS_REG Description
P_L_THS[7:3]
Portrait/Landscape trip threshold angle from 15° to 75°. See Table 32 for the values with the corresponding approximate
threshold angle. Default value: 1_0000 (45°).
HYS[2:0]
This angle is added to the threshold angle for a smoother transition from Portrait to Landscape and Landscape to Portrait.
This angle ranges from 0° to ±24°. The default is 100 (±14°).
Table 32. Threshold Angle Thresholds Lookup Table
Threshold Angle (approx.)
5-bit
Register value
15° 0x07
20° 0x09
30° 0x0C
35° 0x0D
40° 0x0F
45° 0x10
55° 0x13
60° 0x14
70° 0x17
75° 0x19
Table 33. Trip Angles with Hysteresis for 45° Angle
Hysteresis
Register Value
Hysteresis
± Angle Range
Landscape to Portrait
Trip Angle
Portrait to Landscape
Trip Angle
0 ±0 45° 45°
1 ±4 49° 41°
2 ±7 52° 38°
3 ±11 56° 34°
4 ±14 59° 31°