cd00218678

AN2855
Application note
Configuration for single-click
and double-click detection using the FC30
Introduction
This document is intended to provide application information for the click and double-click
detection functions of the FC30.
When a single or double mechanical tap is detected, the FC30 provides an interrupt signal,
enabling a “mouse button-like” function for intuitive man-machine interface solutions.
A power-down mode selectable through a dedicated command ensures very low current
consumption in battery-operated devices.
February 2009
Rev 1
1/8
www.st.com
Contents
AN2855
Contents
1
2
3
2/8
Theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1
Device pinout for click recognition mode . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2
Entering single click recognition mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3
Entering double-click recognition mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4
Exiting click recognition mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Power-down mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1
Entering power-down mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2
Exiting power-down mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
AN2855
1
Theory of operation
Theory of operation
The click recognition function featured in the FC30 helps to create a man-machine interface
with little software loading. The device can be configured to output an interrupt signal on a
dedicated pin when tapped in any direction.
If the sensor is exposed to a single input stimulus, it generates an interrupt request on
inertial interrupt pin PC. A more advanced feature allows the generation of an interrupt
request when a double input stimulus with fixed time between the two events is recognized,
enabling a mouse button-like functionality.
Note:
While the device is operating in click/double-click recognition mode, the orientation
detection function is not available.
1.1
Device pinout for click recognition mode
Click recognition mode is enabled through specific commands sent to the device over the
I2C bus that is available through dedicated pins (Figure 1).
FC30 pinout - I2C pins for click recognition mode
Vdd
Vdd_IO
1
6
10uF
8
SCL
SDA
SIGN
PD
13
LC
100nF
Top VIEW
PC
Figure 1.
GND
Digital signal from/to signal controller.Signal’s levels are defined by proper selection of Vdd_IO
AM03290v1
3/8
Theory of operation
1.2
AN2855
Entering single click recognition mode
To enable the single-click recognition function, the device must first be configured for powerdown mode driving PD pin to GND. Then the following sequence of commands must be sent
to the device through I2C bus:
I2C_Read(0x5D, 0x16, Value_1);
I2C_Write(0x5D, 0x16, Value_1 & 0x1F);
I2C_Write(0x1D, 0x3Bh, 0x77h);
I2C_Write(0x1D, 0x3Ch, 0x07h);
I2C_Write(0x1D, 0x3Dh, 0xFEh);
I2C_Write(0x1D, 0x3Eh, 0x10h);
I2C_Write(0x1D, 0x3Fh, 0xFFh);
I2C_Write(0x1D, 0x38h, 0x15h);
I2C_Write(0x1D, 0x20h, 0x47h);
I2C_Write(0x1D, 0x22h, 0x07h);
where I2C_Read and I2C_Write have the following syntax:
I2C_Read(SlaveAddress, SubAddress, DestinationValue);
I2C_Write(SlaveAddress, SubAddress, SourceValue);
At the end of the sequence the device will be in a power on state, ready to operate in singleclick recognition mode and orientation detection is no longer active.
1.3
Entering double-click recognition mode
As with single-click recognition, to enable the double-click recognition function the device
must be first configured for power-down mode driving PD pin to GND. Then the following
sequence of commands must be sent to the device through I2C bus:
I2C_Read(0x5D, 0x16, Value_1);
I2C_Write(0x5D, 0x16, Value_1 & 0x1F);
I2C_Write(0x1D, 0x3Bh, 0x77h);
I2C_Write(0x1D, 0x3Ch, 0x07h);
I2C_Write(0x1D, 0x3Dh, 0xFEh);
I2C_Write(0x1D, 0x3Eh, 0x10h);
I2C_Write(0x1D, 0x3Fh, 0xFFh);
I2C_Write(0x1D, 0x38h, 0x2Ah);
I2C_Write(0x1D, 0x20h, 0x47h);
I2C_Write(0x1D, 0x22h, 0x07h);
4/8
AN2855
Theory of operation
At the end of the sequence, the device will be in a power on state, ready to operate in
double-click recognition mode and orientation detection is no longer active.
1.4
Exiting click recognition mode
To exit from the click recognition function and restore the orientation detection, the device
must be first be turned off by switching off the power supply, then turned on.
5/8
Power-down mode
2
AN2855
Power-down mode
When the FC30 is operating in click or double-click recognition mode, the PD pin must be
tied to GND and no longer enabling the power-down mode. Power-down mode is still
available through dedicated I2C commands.
2.1
Entering power-down mode
To enter the power-down mode, send the following I2C command to the device:
I2C_Write(0x1D, 0x20h, 0x00h);
2.2
Exiting power-down mode
To exit the power-down mode, send the following I2C command to the device:
I2C_Write(0x1D, 0x20h, 0x47h);
6/8
AN2855
3
Revision history
Revision history
Table 1.
Document revision history
Date
Revision
17-Feb-2009
1
Changes
Initial release.
7/8
AN2855
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
© 2009 STMicroelectronics - All rights reserved
STMicroelectronics group of companies
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America
www.st.com
8/8