Atmel QTouch Library User Guide

Atmel QTouch Library User Guide Atmel QTouch Library User Guide

prochild.co.kr
from prochild.co.kr More from this publisher
11.07.2015 Views

QTouch Library configuration parameters for ATtiny20The Table below describes the various configuration parameters corresponding to the ATtiny20.ParameterDEF_QT_QDEBUG_ENABLEDEF_QT_NUM_SENSORSDEF_QT_SENSOR_0_THRESHOLD,DEF_QT_SENSOR_1_THRESHOLD,DEF_QT_SENSOR_2_THRESHOLD,DEF_QT_SENSOR_3_THRESHOLD,DEF_QT_SENSOR_4_THRESHOLDDEF_QT_SENSOR_0_HYSTERESIS,DEF_QT_SENSOR_1_HYSTERESIS,DEF_QT_SENSOR_2_HYSTERESIS,DEF_QT_SENSOR_3_HYSTERESIS,DEF_QT_SENSOR_4_HYSTERESISDEF_QT_SENSOR_0_RECAL_THRESHOLD,DEF_QT_SENSOR_1_RECAL_THRESHOLD,DEF_QT_SENSOR_2_RECAL_THRESHOLD,DEF_QT_SENSOR_3_RECAL_THRESHOLD,DEF_QT_SENSOR_4_RECAL_THRESHOLDDEF_QT_DELAY_CYCLESDEF_QT_ADC_CHANNEL_START_INDEXDEF_QT_AKS_ENABLEDEF_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_TIMEDEF_QT_POS_RECAL_DELAYDEF_QT_NUM_SENSORS_SYMDEF_QT_BURST_LENGTHDescriptionEnable/Disable QDebug debug data communication to QTouchStudio.QTouch number of Sensors.Range: 1u to 5u.Sensor detection threshold value.Range: 1u to 255u.Sensor detection hysteresis value. Refer hysteresis_t intouch_api_tiny20.hHYST_50 = (50% of Sensor detection threshold value)HYST_25 = (25% of Sensor detection threshold value)HYST_12_5 = (12.5% of Sensor detection threshold value)HYST_6_25 = (6.25%, but value is hardlimited to 2)Sensor recalibration threshold value. Refer recal_threshold_t intouch_api_tiny20.hRECAL_100 = (100% of Sensor detection threshold value)RECAL_50 = (50% of Sensor detection threshold value)RECAL_25 = (25% of Sensor detection threshold value)RECAL_12_5 = (12.5% of Sensor detection threshold value)RECAL_6_25 = (6.25%, but value is hardlimited to 4)Delay cycles that determine the capacitance charge transfer time.Range: 1, 2, 4, 8 or 10 internal System Clock cycles.ADC Channel starting index.Range: 1u to 7u.Enable/Disable Adjacent Key suppression (AKS) on all channels.Sensor 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.Positive Recalibration delay. Range: 1u to 255u.Refer Section 5.3 and Section 5.4 for more info.QTouch number of Sensors Symbol for QTouch Library.MUST be the same as DEF_QT_NUM_SENSORS.Specifies the no:of burst sequence required for a sensor. Multipleburst for adjusting sensitivity by increasing the resolution of the Signalmeasured.Use higher value for increasing sensitivity.Values: 1u, 4u and 16u1728207K-AT42-09/11

Table 18 QTouch Library for ATtiny20 Configuration parametersNote1:For the case of ATtiny20 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 Tiny20 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 Tiny20 device.QTouch Library ATtiny20 Example projectsThe QTouch method IAR Example project for the Tiny20 Evaluation Kit can be found in thefollowing path.\Device_Specific_Libraries\8bit_AVR\AVR_Tiny_Mega_XMega\ATtiny20\tiny20_ek_iar_qt_exampleThe Example projects demonstrate the 5 button sensor configuration with a Sample LEDapplication. The Example projects also support QDebug data transfer to QTouch Studio – TouchAnalyzer PC Application.It is possible to configure the number of Sensors in the Example project from 1 to 5 for testing onthe ATtiny20 Evaluation kit.QTouch Library ATtiny20 code and data memory requirementsThe code and data memory requirements for QTouch Library for ATtiny20 devices is captured inthe Table below. The Table indicates these values for the standalone library and not for theentire Example Project application.Librarylibtiny20-5qt-k-0rslibtiny20-5qt-k-0rslibtiny20-5qt-k-0rslibtiny20-5qt-k-0rslibtiny20-5qt-k-0rsNumber ofSensors54321Code Memory1231 + 15 bytesConst data1231 + 12 bytesConst data1231 + 9 bytesConst data1231+ 6 bytesConst data1231 + 3 bytesConst data7060504030DatamemoryCStack/RStackCStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is the173

Table 18 <strong>QTouch</strong> <strong>Library</strong> for ATtiny20 Configuration parametersNote1:For the case of ATtiny20 devices, a ‘touch’ causes the Signal value measured on the Sensor toincrease above the Sensor Reference value (In the case of Generic <strong>Library</strong> 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 Tiny20 devicesshall be consistent with the Generic <strong>Library</strong> 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 Tiny20 device.<strong>QTouch</strong> <strong>Library</strong> ATtiny20 Example projectsThe <strong>QTouch</strong> method IAR Example project for the Tiny20 Evaluation Kit can be found in thefollowing path.\Device_Specific_Libraries\8bit_AVR\AVR_Tiny_Mega_XMega\ATtiny20\tiny20_ek_iar_qt_exampleThe Example projects demonstrate the 5 button sensor configuration with a Sample LEDapplication. The Example projects also support QDebug data transfer to <strong>QTouch</strong> Studio – TouchAnalyzer PC Application.It is possible to configure the number of Sensors in the Example project from 1 to 5 for testing onthe ATtiny20 Evaluation kit.<strong>QTouch</strong> <strong>Library</strong> ATtiny20 code and data memory requirementsThe code and data memory requirements for <strong>QTouch</strong> <strong>Library</strong> for ATtiny20 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>libtiny20-5qt-k-0rslibtiny20-5qt-k-0rslibtiny20-5qt-k-0rslibtiny20-5qt-k-0rslibtiny20-5qt-k-0rsNumber ofSensors54321Code Memory1231 + 15 bytesConst data1231 + 12 bytesConst data1231 + 9 bytesConst data1231+ 6 bytesConst data1231 + 3 bytesConst data7060504030DatamemoryCStack/RStackCStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is theRecommended setting.CStack= 0x1C bytesRStack= 10(16 bytes) is the173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!