11.07.2015 Views

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 42 <strong>QTouch</strong> method Channel/Sensor numbering when Group A and Bare used togetherWhen both <strong>QTouch</strong> Group A and <strong>QTouch</strong> Group B method are used at the same time, the SNS-SNSK pairs associated with the individual group alone must be taken into consideration whendetermining the Channel number.Note: The touch_qt_sensor_config API must follow the above Channel and Sensor numberingwhen configuring the Sensors.<strong>QTouch</strong> Group A/B method API Flow for UC3LFor the <strong>QTouch</strong> operation, the CAT_CLK must be setup appropriately as a first step. Dependingon <strong>QTouch</strong> Group that need to be used, the <strong>QTouch</strong> Group A, <strong>QTouch</strong> Group B and Commonconfiguration parameters in the touch_config_at32uc3l.h configuration must then be set up.The first input argument to the <strong>QTouch</strong> API, TOUCH_QT_GRP_A or TOUCH_QT_GRP_Bindicates if the <strong>QTouch</strong> API must perform the necessary operation on Group A Sensors or GroupB Sensors. The touch_qt_sensors_init API initializes the <strong>QTouch</strong> <strong>Library</strong> as well as the CATmodule and does the <strong>QTouch</strong> method specific pin, register and Global Sensor configuration. Thetouch_qt_sensor_config API is used to configure individual sensor. The Sensor specificconfiguration parameter can be provided as input to this API.The touch_qt_sensors_calibrate API is used to calibrate all the configured sensors therebypreparing the sensors for acquisition. The touch_qt_sensors_start_acquisition API initiates a<strong>QTouch</strong> method measurement on all the configured Sensors (corresponding to the input TouchGroup A or B). This API takes the peripheral DMA channels as an input. When a filter_callbackfunction is enabled, the touch_event_dispatcher function calls the filter_callback function as soonas the raw acquisition data from the Sensors is available. The user can now optionally apply anyfiltering routine on the raw acquisition data before the <strong>QTouch</strong> <strong>Library</strong> does any processing onthis data. (For an overview of Filter callback usage, refer Section 5.6.6.4 Example code). Oncethe <strong>QTouch</strong> <strong>Library</strong> has finished processing the acquisition data from Sensors, thetouch_event_dispatcher function calls the measure_complete_callback function indicating the endof a single Touch measurement operation. The measure_complete_callback provides themeasured data and Touch status information. The measured data is available in the same orderof Touch Channel numbering. Separate Filter and Measure complete callback functions must beprovided for Group A and Group B Sensors.Note: The Host Application code can execute once a <strong>QTouch</strong> acquisition is initiated with thetouch_qt_sensors_start_acqusition API. Care must be taken in the Host Application such that thetouch_event_dispatcher function is called frequently in order to process the acquired data. For asingle Touch measurement operation (between a touch_qt_sensors_start_acquisition API calland the measure_complete_callback function being called), the touch_event_dispatcher functionmay execute multiple times in order to resolve the Touch status of Sensors. Failing to call thetouch_event_dispatcher frequently can adversely impact the Touch Sensitivity.129

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

Saved successfully!

Ooh no, something went wrong!