您的当前位置:首页正文

AN3944(MPR121快速入门指南)

2020-03-16 来源:客趣旅游网
Freescale Semiconductor Application Note

AN3944

Rev 1, 03/2010

MPR121 Quick Start Guide

INTRODUCTION

The MPR121 is Freescale Semiconductor’s top of the line touch sensor and can fit into a wide range of applications. These applications can all be accommodated by having a device a with a very large range of flexibility. While all of these added features can allow for a wide range of flexibility, they can also add an unnecessary layer of complication. For advanced users who want to do more than basic touch detection, additional information can be found in other application notes.

To start, the device is configured through an I2C serial interface. The following table lists the registers that are initialized. The order they are written in is not significant except that register 0x05E, the Electrode Configuration Register must be written last.

Register Address

0x2B0x2C0x2D0x2E0x2F0x30 0x31 0x320x410x420x430x440x450x460x470x480x490x4A0x4B0x4C0x4D0x4E0x4F0x50

MHD RisingNHD Amount RisingNCL RisingFDL RisingMHD FallingNHD Amount FallingNCL FallingFDL Falling

ELE0 Touch ThresholdELE0 Release ThresholdELE1 Touch ThresholdELE1 Release ThresholdELE2 Touch ThresholdELE2 Release ThresholdELE3 Touch ThresholdELE3 Release ThresholdELE4 Touch ThresholdELE4 Release ThresholdELE5 Touch ThresholdELE5 Release ThresholdELE6 Touch ThresholdELE6 Release ThresholdELE7 Touch ThresholdELE7 Release Threshold

Register Name

Value0x010x010x000x000x010x010xFF0x020x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A

Application Note

AN3891AN3891AN3891AN3891AN3891AN3891AN3891AN3891AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892

SectionAAAABBBBCCCCCCCCCCCCCCCC

© Freescale Semiconductor, Inc., 2009, 2010. All rights reserved.

Register Address

0x510x520x530x540x550x560x570x580x5D0x5E0x7B0x7D0x7E0x7F

Register Name

ELE8 Touch ThresholdELE8 Release ThresholdELE9 Touch ThresholdELE9 Release ThresholdELE10 Touch ThresholdELE10 Release ThresholdELE11 Touch ThresholdELE11 Release ThresholdFilter ConfigurationElectrode Configuration

AUTO-CONFIG Control Register 0AUTO-CONFIG USL RegisterAUTO-CONFIG LSL RegisterAUTO-CONFIG Target Level Register

Value0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x040x0C0x0B0x9C0x650x8C

Application Note

AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3890AN3890AN3889AN3889AN3889AN3889

SectionCCCCCCCCDEFFFF

The following sections describe what each of the defaults do and recommendations for variations.Section A

Register Address

0x2B0x2C0x2D0x2E

MHD RisingNHD Amount RisingNCL RisingFDL Rising

Register NameValue0x010x010x000x00

Application Note

AN3891AN3891AN3891AN3891

Description:This group of setting controls the filtering of the system when the data is greater than the baseline.

The setting used allow the filter to act quickly and adjust for environmental changes. Additionally, if calibration happens to take place while a touch occurs, the value will self adjust very quickly. This auto-recovery or snap back prevents repeated false negative for a touch detection.Variation:As the filter is sensitive to setting changes, it is recommended that users read AN3891 before

changing the values. In most cases these default values will work

Section B

Register Address

0x2F0x30

MHD FallingNHD Amount Falling

Register NameValue0x010x010xFF0x02

Application Note

AN3891AN3891AN3891AN3891

0x31 NCL Falling0x32

FDL Falling

Description:This group of setting controls the filtering of the system, when the data is less than the baseline. The

settings slow down the filter as the negative charge is in the same direction as a touch. By slowing down the filter, touch signals are “rejected” by the baseline filter. While at the same time lon term environmental change that occur slower than at a touch are accepted. This low pass filter both allows for touches to be detected properly while preventing false positive by passing environmental change through the filter.Variation:As the filter is sensitive to setting changes, it is recommended that users read AN3891 before

changing the values. In most cases these default values will work

AN39442

Sensors

Freescale Semiconductor

Section C

Register Address

0x410x420x430x440x450x460x470x480x490x4A0x4B0x4C0x4D0x4E0x4F0x500x510x520x530x540x550x560x570x58

Register Name

ELE0 Touch ThresholdELE0 Release ThresholdELE1 Touch ThresholdELE1 Release ThresholdELE2 Touch ThresholdELE2 Release ThresholdELE3 Touch ThresholdELE3 Release ThresholdELE4 Touch ThresholdELE4 Release ThresholdELE5 Touch ThresholdELE5 Release ThresholdELE6 Touch ThresholdELE6 Release ThresholdELE7 Touch ThresholdELE7 Release ThresholdELE8 Touch ThresholdELE8 Release ThresholdELE9 Touch ThresholdELE9 Release ThresholdELE10 Touch ThresholdELE10 Release ThresholdELE11 Touch ThresholdELE11 Release Threshold

Value0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A0x0F0x0A

Application Note

AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892AN3892

Description:The touch threshold registers set the minimum delta from the baseline when a touch is detected

0x0F or 15 in decimal is an estimate of the minimum value for touch. Most electrodes will work with this value even if they vary greatly in size and shape. The value of 0x0A or 10 is the release threshold register allowed for hysteresis in the touch detection.Variation:For very small electrodes, smaller values can be used and for very large electrodes the reverse is

true. One easy method is to view the deltas actually seen in a system and set the touch at 80% and release at 70% of delta for good performance.

AN3944

Sensors

Freescale Semiconductor

3

Section D

Register Address

0x5D

Filter Configuration

Register Name

Value0x04

Application Note

AN3890

Description:There are three settings embedded in this register so it is only necessary to pay attention to one.

The ESI controls the sample rate of the device. In the default, the setting used is 0x00 for 1 ms sample rate. Since the SFI is set to 00, resulting in 4 samples averaged, the response time will be 4 ms. Variation:To save power, the 1 ms can be increased to 128 ms by increasing the setting to 0x07. The values

are base 2 exponential thus 0x01 = 2 ms; 0x02 = 4 ms; and so on to 0x07 = 128 ms. Most of the time, 0x04 results in the best compromise between power consumption and response time.

Section E

Register Address

0x5E

Register Name

Electrode Configuration

Value0x0C

Application Note

AN3890

Description:This register controls the number of electrodes being enabled and the mode the device is in. There

are only two modes, Standby (when the value is 0x00) and Run (when the value of the lower bit is non-zero). The default value shown enables all 12 electrodes by writing decimal 12 or hex 0x0C to the register. Typically other registers cannot be changed while the part is running so this register should always be written last.Variation:During debug of a system, this register will change between the number of electrodes and 0x00

every time a register needs to change. In a production system, this register will only need to be written when the mode is changed from Standby to Run or vise versa.

Section F

Register Address

0x7B0x7D0x7E0x7F

Register Name

AUTO-CONFIG Control Register 0AUTO-CONFIG USL RegisterAUTO-CONFIG LSL RegisterAUTO-CONFIG Target Level Register

Value0x0B0x9C0x650x8C

Application Note

AN3889AN3889AN3889AN3889

Description:These are the settings used for the Auto Configuration. They enable AUTO-CONFIG and

AUTO_RECONFIG. In addition they set the target range for the baseline. The upper limit is set to 190, the target is set to 180 and the lower limit is set to 140.Variation:In most cases these values will never need to be change, but if a case arises, a full description is

found in application note AN3889.

CONCLUSION

In many applications for the MPR121, the default settings presented in this document will be sufficient for both design time activities as well as in the production implementation.

AN39444

Sensors

Freescale Semiconductor

How to Reach Us:

Home Page:

www.freescale.com

Web Support:

http://www.freescale.com/supportUSA/Europe or Locations Not Listed:Freescale Semiconductor, Inc.

Technical Information Center, EL5162100 East Elliot Road Tempe, Arizona 85284+1-800-521-6274 or +1-480-768-2130

www.freescale.com/support

Europe, Middle East, and Africa:

Freescale Halbleiter Deutschland GmbHTechnical Information CenterSchatzbogen 7

81829 Muenchen, Germany+44 1296 380 456 (English)+46 8 52200080 (English)+49 89 92103 559 (German)+33 1 69 35 48 48 (French)www.freescale.com/support

Japan:

Freescale Semiconductor Japan Ltd. HeadquartersARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku,

Tokyo 153-0064Japan 0120 191014 or +81 3 5437 9125

support.japan@freescale.com

Asia/Pacific:

Freescale Semiconductor Hong Kong Ltd.Technical Information Center2 Dai King Street Tai Po Industrial Estate

Tai Po, N.T., Hong Kong+800 2666 8080

support.asia@freescale.com

For Literature Requests Only:

Freescale Semiconductor Literature Distribution Center1-800-441-2447 or 303-675-2140Fax: 303-675-2150

LDCForFreescaleSemiconductor@hibbertgroup.com

AN3944Rev. 103/2010

Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document.

Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be

provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals”, must be validated for each customer application by customer’s technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or

unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off.

All other product or service names are the property of their respective owners.© Freescale Semiconductor, Inc. 2010. All rights reserved.

因篇幅问题不能全部显示,请点此查看更多更全内容