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.

VCCPA0No ConnectionPA1PA2ATtiny20PA3PA41Kohm1KohmTouch Button 1Touch Button 2PA51KohmTouch Button 3PA61KohmTouch Button 4GNDPA71KohmTouch Button 5Figure 48 Schematic overview of <strong>QTouch</strong> on Tiny20API Flow diagram for ATtiny20For the <strong>QTouch</strong> Libraries, the timing information is provided by the Host Application by updatingthe ‘time_current_ms’ variable in the Timer ISR. The <strong>QTouch</strong> <strong>Library</strong> uses this variable tocalculate the necessary timing for Max ON Duration, Drift and Recalibration functionality. Beforeusing the <strong>QTouch</strong> Libraries, the Timer ISR must be configured appropriately. Also, the TimerInterrupt is used to update the ‘time_to_measure_touch’ variable inorder to start a capacitivetouch measurement. It is recommended to call qt_measure_sensors within 100ms each time toavoid error in <strong>QTouch</strong> <strong>Library</strong> timing.The touch_config_tiny20.h configuration header file can be used to set the desired number ofTouch Sensors (Buttons) as well as individual sensor Threshold, Hysteresis and Recalibrationparameters. The Sensor Global Configuration parameters must be specified using the IAR Linkerdefine options.Figure 49 Linker configuration options for Tiny201708207K-AT42-09/11

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

Saved successfully!

Ooh no, something went wrong!