Sensors
10
Freescale Semiconductor
MMA7455L
LEVEL DETECTION
The user can access XYZ measurements and can use the level interrupt only. The level detection mechanism has no timers as-
sociated with it. Once a set acceleration level is reached the interrupt pin will go high and remain high until the interrupt pin is
cleared (See
Assigning, Clearing & Detecting Interrupts
).
By default all three axes are enabled and the detection range is 8g only. X and/or Y and/or Z can be disabled. There is a choice
between detecting an Absolute signal or a Positive or Negative only signal on the enabled axes. There is also a choice between
doing a detection for Motion where X or Y or Z > Threshold vs. doing a detection for Freefall where X & Y & Z < Threshold.
$18: Control 1 (Read/Write) Setting the Detection Axes for X, Y and Z
This allows the user to define how many axes to use for detection. All axes are enabled by default. To disable write 1.
XDA: Disable X
YDA: Disable Y
ZDA: Disable Z
$19: Control 2 (Read/Write) Motion Detection (OR Condition) or Freefall Detection (AND Condition
)
LDPL = 0:
Level detection polarity is positive and detecting condition is
OR
for all 3 axes.
X or Y or Z > Threshold
||X|| or ||Y|| or ||Z|| > Threshold
LDPL = 1:
Level detection polarity is negative detecting condition is
AND
for all 3 axes.
X and Y and Z < Threshold
||X|| and ||Y|| and ||Z|| < Threshold
$18: Control 1 (Read/Write): Setting the threshold to be an integer value or an absolute value
This allows the user to set the threshold to be absolute, or to be based on the threshold value as positive or negative.
THOPT = 0 Absolute; THOPT = 1 Positive Negative
$1A
:
Level Detection Threshold Limit Value (Read/Write)
When an event is detected the interrupt pin (either INT1 or INT2) will go high. The interrupt pin assignment is set up in Register
$18, discussed in the
Assigning, Clearing & Detecting Interrupts
section. The detection status is monitored by the Detection
Source Register $0A.
LDTH[7:0]: Level detection threshold value. If THOPT bit in Detection Control Register is “0”, it is unsigned 7 bits value and
LDTH[7] should be “0”. If THOPT bit is “1”, it is signed 8 bits value.
D7
D6
D5
D4
D3
D2
D1
D0
Reg $18
DFBW
THOPT
ZDA
YDA
XDA
INTREG[1]
INTREG[0]
INTPIN
Function
0
0
0
0
0
0
0
0
Default
D7
D6
D5
D4
D3
D2
D1
D0
Reg $19
--
--
--
--
--
DRVO
PDPL
LDPL
Function
0
0
0
0
0
0
0
0
Default
D7
D6
D5
D4
D3
D2
D1
D0
Reg $18
DFBW
THOPT
ZDA
YDA
XDA
INTREG[1]
INTREG[0]
INTPIN
Function
0
0
0
0
0
0
0
0
Default
D7
D6
D5
D4
D3
D2
D1
D0
Reg $1A
LDTH[7]
LDTH[6]
LDTH[5]
LDTH[4]
LDTH[3]
LDTH[2]
LDTH[1]
LDTH[0]
Function
0
0
0
0
0
0
0
0
Default