Pin Configuration for QTouch Acquisition Method

Pin configurability for QTouch acquisition method is provided for 8Bit AVR’s. QTouch acquisition method libraries can be used to configure SNS and SNSK on any pins of the port. But few rules should be followed while assigning the SNS and SNSK on particular pins. These rules are internal to the library. But QTouch Studio –Pin Configuration Wizard can be used to assign SNS and SNSK on the pins and rules are internally taken care in the QTouch Studio Pin Configuration Wizard.

By default, for 4 and 8 channel QTouch acquisition libraries, the channel numbering follows the pin number of the port.

To use the pin configurability, enable the macro  _STATIC_PORT_PIN_CONF_ in the project options or define the macro in the touch_config.h file.

To use the pin configurability feature, the SNS_array and SNSK_array masks are exported for the user, which needs to be initialized. These SNS_array and SNSK_array masks can be taken from the QTouch Studio Pin Configuration Wizard and can be copied at appropriate place in the main.c file as explained in the example projects provided.

QTOUCH_STUDIO_MASKS macro is used for providing pin configurability feature for QTouch Acquisition method libraries.

In case the macro QTOUCH_STUDIO_MASKS enabled in project space, SNS_array and SNSK_array takes values that are supplied by the user in main.c files. This will reduce the code memory foot print of the library.

In case the macro QTOUCH_STUDIO_MASKS is not enabled in project space, SNS_array and SNSK_array are calculated internal to the library according to the configured sensors.

Note:

Port pin configurability is enabled for the following configurations

  • 4-channel intraport configuration

  • 8-channel intraport configuration

  • 12-channel configuration

  • 16-channel configuration

In case, the user wants to use the pin configurability for the other supported configurations, (4-channel interport and 8-channel interport), the user has to enable the macro _STATIC_PORT_PIN_CONF_ in his project space.