The following is a checklist of items which needs to be ensured when integrating QTouch acquisition method libraries
The clock prescaler register (e.g. CLKPR, XDIV) needs to be configured correctly based on the device selected. Some devices have clock frequency selection based on fuses. It has to be ensured the fuses are set correctly in such cases.
It is recommended to disable PULL-UP resistor on all port pins used for touch sensing on the device selected (e.g. PUD bit in MCUCR, SFIOR for a few of the tinyAVR and megaAVR devices Refer to the Data sheet of the selected device).
The 16 bit timer in each device has been used for performing touch measurements periodically. The datasheet for all the devices have to be checked to ensure that the correct timer peripheral and its registers are used (file: main.c).
The interrupt vector macro may also change from device to device and this needs to be verified in the datasheet for the device used.
Check if the timer is configured correctly to support the measurement period needed (e.g. 25msec or 50 msec).
The sample applications for the evaluation kits and supported devices illustrate the proper initialization sequence and usage of the timer resources (file: main.c). Use this as a reference for your application design.
The host application must provide the current time to the library. This
information is passed to the library as an argument to the function
qt_measure_sensors()
. This is used for time-based
library operations such as drift compensation.