Checklist of items for integrating QMatrix Capacitive sensing libraries

When integrating QMatrix acquisition method libraries, ensure the following

  1. 1.

    Check that the CLKPR register is available for the selected device. If not remove the CLKPR statements.

  2. 2.

    Ensure that the configuration for the QMatrix is done in touch_config.h and the arrays of the x_line_info and y_line info are filled

  3. 3.

    MCUCR register is available and if so disable pullups

  4. 4.

    Check if the timer registers and bit fields used are correct and change them if necessary.

  5. 5.

    The above settings can be modified by the user by changing the API’s that are available to the user. The API’s include

    1. 5.1.

      qt_set_parameters( )

  6. 6.

    The host application must provide the current time.

    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.

  7. 7.

    The GPIO internal pull-ups must be disabled for all port pins used for touch sensing when calling the library.

    For 8-bit AVR devices, this can be done by

    1. 7.1.

      Setting the “PUD” bit in the “MCUCR” register or

    2. 7.2.

      Setting the “PUD” bit in the “SFIOR” register.

  8. 8.

    Setting the JTD bit in the “MCUCR” register to disable JTAG Interface in MCU (if available). This can be done only when the JTAG lines are in conflict with the desired touch sensing lines

  9. 9.

    The library must be called often enough to provide a reasonable response time to user touches. The typical time to call the library is from 25 ms to 50 ms.

  10. 10.

    Care should be taken while using the ADC conversion logic and QMatrix library such that the host application waits for approximately 1msec before actually calling the qt_measure_sensors() API depending upon the ADC clock.

For 8-bit AVR devices, this can be done by