Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
QTouch Library configuration parameters for ATtiny40The Table below describes the various configuration parameters corresponding to the ATtiny40QTouch Library.ParameterDescriptionDEF_QT_DIDEF_QT_NEG_DRIFT_RATE*(See Note 1)DEF_QT_POS_DRIFT_RATE*(See Note 1)DEF_QT_MAX_ON_DURATIONDEF_QT_DRIFT_HOLD_TIMESensor detect integration (DI) limit.Range: 0u to 255u.Refer Section 5.3 and Section 5.4 for more info.Sensor negative drift rate. Units: 100ms, Range: 1u to 127u.Refer Section 5.3 and Section 5.4 for more info.Sensor positive drift rate. Units: 100ms, Range: 1u to 127u.Refer Section 5.3 and Section 5.4 for more info.Sensor maximum on duration. Units: 100ms, Range: 0u to 255u.Refer Section 5.3 and Section 5.4 for more info.Sensor drift hold time. Units: 100ms, Range: 1u to 255u.Refer Section 5.3 and Section 5.4 for more info.DEF_QT_POS_RECAL_DELAYDEF_QT_BERST_LENGTHPositive Recalibration delay. Range: 1u to 255u.Refer Section 5.3 and Section 5.4 for more info.Burst Length. Range: 10u – 13u. Proper function for values morethan 13u is not guaranteed.This parameter helps in increasing thesignal resolution.Charge Share Delay. Range: 0u – 255u. This value needs to beincreased if we use high value of series resistor on sensor pin toensure proper charge time.Table 21 QTouch Library for ATtiny40 Configuration parametersDEF_QT_CHARGE_SHARE_DELAYNote1:For the case of ATtiny40 devices, a ‘touch’ causes the Signal value measured on the Sensor toincrease above the Sensor Reference value (In the case of Generic Library devices, a ‘touch’causes the Signal value to decrease below the Reference value).However, the Negative drift rate and Positive drift rate functionality for the case of Tiny40 devicesshall be consistent with the Generic Library case.So, it is recommended to have a ‘Slower’ Negative Drift rate (4 seconds is the default setting) anda ‘Faster’ Positive Drift rate (1 second is the default setting) for the Tiny40 device.QTouch Library ATtiny40 Example projectsThe QTouch method IAR Example project for the Tiny40 Evaluation Kit can be found in thefollowing path.\Device_Specific_Libraries\8bit_AVR\AVR_Tiny_Mega_XMega\ATtiny40\tiny40_qt_example_iarThe Example projects demonstrate the 12 button sensor configuration. The Example projectsalso support QDebug data transfer to QTouch Studio – Touch Analyzer PC Application.It is possible to configure the number of Sensors in the Example project from 1 to 12 for testingon the ATtiny40 Evaluation kit.1788207K-AT42-09/11
QTouch Library ATtiny40 code and data memory requirementsThe code and data memory requirements for QTouch Library for ATtiny40 devices is captured inthe Table below. The Table indicates these values for the standalone library and not for theentire Example Project application.Librarylibtiny40_4qt_k_0rslibtiny40_8qt_k_0rslibtiny40_12qt_k_0rsNumber ofSensorsCode MemoryDatamemory4 2200 1358 2200 17512 2300 216CStack/RStackCStack= 32 bytesRStack= 24 bytesCStack= 32 bytesRStack= 24 bytesCStack= 32 bytesRStack= 24 bytesTable 22 QTouch Library for ATtiny40 Memory requirementsGeneric QTouch Libraries for 2K DevicesIntroductionThis section provides information about the QTouch library Acquisition Support for Tiny deviceswith 2K Flash memory. These libraries have the same API’s as Generic libraries, except for a fewwhich are not supported.Information about the API’s are provided in touch_api_2kdevice.h filewhich is placed at location mentioned in section 5.6.10.1179
- Page 128 and 129: The QTouch method acquisition using
- Page 130 and 131: Host Application codeUsing the init
- Page 132 and 133: Frozen Stop Stop Run Run Run Run On
- Page 134 and 135: Figure 45 Raw acquisition mode API
- Page 136 and 137: Figure 46 GNU Example project usage
- Page 138 and 139: the QTouch Library as QMatrix data
- Page 140 and 141: TOUCH_STATUS_CHANGE 0x0002u Status
- Page 142 and 143: sensor_type_tEnumerationUsesensor_t
- Page 144 and 145: OUT_OF_TOUCHIN_TOUCHCurrently the a
- Page 146 and 147: num_channel_signals uint8_t Length
- Page 148 and 149: touch_at_statusstructureInput / Out
- Page 150 and 151: UseData structure which holds the R
- Page 152 and 153: variable to the Touch library. The
- Page 154 and 155: structure.p_qta_config touch_qt_con
- Page 156 and 157: p_touch_sensor_param touch_qm_param
- Page 158 and 159: current_time_ms touch_time_t Curren
- Page 160 and 161: touch_ret_t touch_qt_sensor_config(
- Page 162 and 163: touch_qt_sensors_calibratetouch_ret
- Page 164 and 165: touch_qt_get_libinfotouch_ret_t tou
- Page 166 and 167: • This API updates the configurat
- Page 168 and 169: Rule Rule Description Advisory/Requ
- Page 170 and 171: VCCPA0No ConnectionPA1PA2ATtiny20PA
- Page 172 and 173: QTouch Library configuration parame
- Page 174 and 175: Recommended setting.Table 19 QTouch
- Page 176 and 177: Figure 51 Schematic overview of QTo
- Page 180 and 181: Devices supportedThe list of differ
- Page 182 and 183: • The channel number is derived f
- Page 184 and 185: MISRA Compliance ReportThis section
- Page 186 and 187: May 2010Ver 4.2July 2010Ver 4.3Jan
<strong>QTouch</strong> <strong>Library</strong> ATtiny40 code and data memory requirementsThe code and data memory requirements for <strong>QTouch</strong> <strong>Library</strong> for ATtiny40 devices is captured inthe Table below. The Table indicates these values for the standalone library and not for theentire Example Project application.<strong>Library</strong>libtiny40_4qt_k_0rslibtiny40_8qt_k_0rslibtiny40_12qt_k_0rsNumber ofSensorsCode MemoryDatamemory4 2200 1358 2200 17512 2300 216CStack/RStackCStack= 32 bytesRStack= 24 bytesCStack= 32 bytesRStack= 24 bytesCStack= 32 bytesRStack= 24 bytesTable 22 <strong>QTouch</strong> <strong>Library</strong> for ATtiny40 Memory requirementsGeneric <strong>QTouch</strong> Libraries for 2K DevicesIntroductionThis section provides information about the <strong>QTouch</strong> library Acquisition Support for Tiny deviceswith 2K Flash memory. These libraries have the same API’s as Generic libraries, except for a fewwhich are not supported.Information about the API’s are provided in touch_api_2kdevice.h filewhich is placed at location mentioned in section 5.6.10.1179