Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
OUT_OF_TOUCHIN_TOUCHCurrently the autonomous QTouch channel is out of touchCurrently the autonomous QTouch channel is in detectx_pin_options_tEnumerationUsex_pin_options_tOptions for various pins to be assigned as X lines in QMatrixValues CommentXn Use Pin Xn for QMatrix, n ranges from 0 to 17.Note: X8 pin must NOT be used as X Line and it is recommended to be used asACREFN pin for QMatrix.y_pin_options_tEnumerationUsey_pin_options_tOptions for various pins to be assigned as Y lines in QMatrixValues CommentYn_YKn Use Pin Yn & YKn for QMatrix, n ranges from 0 to 7qt_pin_options_tEnumerationUseqt_pin_options_tOptions for various pins to be assigned as Sense pair for Autonomous QTouch,QTouch Group A and QTouch Group B acquisition methods.Values CommentSPn Use Sense Pair ‘n’ , n ranges from 0 to 16.general_pin_options_tEnumerationUsegeneral_pin_options_tOptions of various pins to be used for SMP, Discharge, SYNC & VDIV.ValuesUSE_NO_PINUSE_PIN_PA12_AS_SMPUSE_PIN_PA13_AS_SMPUSE_PIN_PA14_AS_SMPUSE_PIN_PA17_AS_SMPUSE_PIN_PA21_AS_SMPUSE_PIN_PA22_AS_SMPUSE_PIN_PA17_AS_DISUSE_PIN_PB11_AS_VDIVUSE_PIN_PA15_AS_SYNCUSE_PIN_PA18_AS_SYNCUSE_PIN_PA19_AS_SYNCCommentNo Pin is to be assigned for this purposeUse Pin PA12 as SMP for QMatrixUse Pin PA13 as SMP for QMatrixUse Pin PA14 as SMP for QMatrixUse Pin PA17 as SMP for QMatrixUse Pin PA21 as SMP for QMatrixUse Pin PA22 as SMP for QMatrixUse Pin PA17 as Discharge current control for QMatrixUse Pin PB11 as Voltage divider enable (VDIVEN) for QMatrixUse Pin PA15 as external synchronization input signal (SYNC)Use Pin PA18 as external synchronization input signal (SYNC)Use Pin PA19 as external synchronization input signal (SYNC)1448207K-AT42-09/11
USE_PIN_PB08_AS_SYNCUSE_PIN_PB12_AS_SYNCUse Pin PB08 as external synchronization input signal (SYNC)Use Pin PB12 as external synchronization input signal (SYNC)Data structuresThis section lists the data structures that hold sensor status, settings, and diagnosticsinformation.sensor_tstructureInput / OutputUsesensor_tOutput from the libraryData structure which holds the sensor state variables used by the library.Fields Type Commentstate uint8_t internal sensor stategeneral_counter uint8_t general purpose counter: used for calibration, drifting, etcndil_counter uint8_t drift Integration counterthreshold uint8_t sensor detection thresholdtype_aks_pos_hyst uint8_t holds information for sensor type, AKS group, positiverecalibration flag, and hysteresis valueBit fieldsUseB1 : B0HysteresisB2positive recalibration flagB5:B3AKS groupB7:B6sensor typefrom_channel uint8_t starting channel number for sensorto_channel uint8_t ending channel number for sensorIndex uint8_t index for array of rotor/slider valuestouch_global_param_tstructureInput / OutputUsetouch_global_param_tInput to the LibraryHolds the sensor acquisition parameters for a specific acquisition methodFields Type Commentdi uint8_t Sensor detect integration (DI) limit.neg_drift_rate uint8_t Sensor negative drift rate in units of 200 ms.pos_drift_rate uint8_t Sensor positive drift rate in units of 200 ms.max_on_duration uint8_t Sensor maximum on duration in units of 200ms.drift_hold_time uint8_t Sensor drift hold time in units of 200 ms.pos_recal_delay uint8_t Sensor Positive recalibration delay.recal_threshold recal_threshold_t Sensor recalibration threshold.Refer Section 5.3 for Overview of Global configuration parameters.touch_filter_data_tstructureInput / OutputUsetouch_filter_data_tOutput from the LibraryTouch Filter Callback data type.Fields Type Comment145
- Page 94 and 95: SNSK_array[1][0]=0x14; (SNSK even m
- Page 96 and 97: Figure 5-28: New Design Sensors in
- Page 98 and 99: Figure 5-31: Selecting the MCU for
- Page 100 and 101: Figure 5-34: Selecting the SNS and
- Page 102 and 103: 2. QTOUCH_STUDIO_MASKS needs to be
- Page 104 and 105: Figure 5-38: Selecting New Design3.
- Page 106 and 107: Figure 5-42: Start window of the co
- Page 108 and 109: Figure 5-45: Selecting the X,YA,YB,
- Page 110 and 111: The code can be copied using the
- Page 112 and 113: ApplicablereleaseQTouch libraries v
- Page 114 and 115: Device Specific LibrariesIntroducti
- Page 116 and 117: Table 8 Compiler tool chains suppor
- Page 118 and 119: maintains the States of QMatrix, QT
- Page 120 and 121: equired as shown in the case A of F
- Page 122 and 123: Figure 37 QMatrix method schematicQ
- Page 124 and 125: Figure 39 QMatrix API Flow diagram
- Page 126 and 127: CAT Module Pin NameCSA0CSB0CSA1CSB1
- 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 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 178 and 179: QTouch Library configuration parame
- 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
OUT_OF_TOUCHIN_TOUCHCurrently the autonomous <strong>QTouch</strong> channel is out of touchCurrently the autonomous <strong>QTouch</strong> channel is in detectx_pin_options_tEnumerationUsex_pin_options_tOptions for various pins to be assigned as X lines in QMatrixValues CommentXn Use Pin Xn for QMatrix, n ranges from 0 to 17.Note: X8 pin must NOT be used as X Line and it is recommended to be used asACREFN pin for QMatrix.y_pin_options_tEnumerationUsey_pin_options_tOptions for various pins to be assigned as Y lines in QMatrixValues CommentYn_YKn Use Pin Yn & YKn for QMatrix, n ranges from 0 to 7qt_pin_options_tEnumerationUseqt_pin_options_tOptions for various pins to be assigned as Sense pair for Autonomous <strong>QTouch</strong>,<strong>QTouch</strong> Group A and <strong>QTouch</strong> Group B acquisition methods.Values CommentSPn Use Sense Pair ‘n’ , n ranges from 0 to 16.general_pin_options_tEnumerationUsegeneral_pin_options_tOptions of various pins to be used for SMP, Discharge, SYNC & VDIV.ValuesUSE_NO_PINUSE_PIN_PA12_AS_SMPUSE_PIN_PA13_AS_SMPUSE_PIN_PA14_AS_SMPUSE_PIN_PA17_AS_SMPUSE_PIN_PA21_AS_SMPUSE_PIN_PA22_AS_SMPUSE_PIN_PA17_AS_DISUSE_PIN_PB11_AS_VDIVUSE_PIN_PA15_AS_SYNCUSE_PIN_PA18_AS_SYNCUSE_PIN_PA19_AS_SYNCCommentNo Pin is to be assigned for this purposeUse Pin PA12 as SMP for QMatrixUse Pin PA13 as SMP for QMatrixUse Pin PA14 as SMP for QMatrixUse Pin PA17 as SMP for QMatrixUse Pin PA21 as SMP for QMatrixUse Pin PA22 as SMP for QMatrixUse Pin PA17 as Discharge current control for QMatrixUse Pin PB11 as Voltage divider enable (VDIVEN) for QMatrixUse Pin PA15 as external synchronization input signal (SYNC)Use Pin PA18 as external synchronization input signal (SYNC)Use Pin PA19 as external synchronization input signal (SYNC)1448207K-AT42-09/11