Sensor Numbering

The ordering and numbering of sensors is related to the order in which the sensors are enabled. This is independent of the acquisition method (QMatrix or QTouch acquisition method libraries).

For example, consider this code snippet:

/* enable slider */
qt_enable_slider (CHANNEL_0, CHANNEL_2, AKS_GROUP_1, 16, HYST_6_25, RES_8_BIT, 0);

/* enable rotor */
qt_enable_rotor (CHANNEL_3, CHANNEL_5, AKS_GROUP_1, 16, HYST_6_25, RES_8_BIT, 0);

/* enable keys */
qt_enable_key (CHANNEL_6, AKS_GROUP_2, 10, HYST_6_25);
qt_enable_key (CHANNEL_7, AKS_GROUP_2, 10, HYST_6_25);

In the case above, the slider on channels 0 to 2 will be sensor 0, the rotor on channels 3-to-5 is sensor 1 and the keys on channels 6 and 7 are sensor numbers 3 and 4 respectively.

When the touch status is reported or queried, the corresponding sensor positions and status indicate the touch status. For example, the slider is in detect if “qt_measure_data. qt_touch_status.sensor_states” bit position 0 is set. Similarly, the rotor on channels 3 to 5 is sensor 1, and the keys on channels 6 and 7 are sensors 2 and 3 respectively.

However, the code could be re-arranged as follows to give a different sensor numbering.

/* enable rotor */
qt_enable_rotor (CHANNEL_3, CHANNEL_5, NO_AKS_GROUP, 16, HYST_6_25, RES_8_BIT, 0);

/* enable keys */
qt_enable_key (CHANNEL_6, AKS_GROUP_2, 10, HYST_6_25);
qt_enable_key (CHANNEL_7, AKS_GROUP_2, 10, HYST_6_25);

/* enable slider */
qt_enable_slider (CHANNEL_0, CHANNEL_2, NO_AKS_GROUP, 16, HYST_6_25, RES_8_BIT, 0);

Now, the rotor is sensor 0, the keys are sensors 1 and 2, and the slider is sensor 3.

So, the order in which the user enables the sensors is the order in which the sensors are numbered. Depending on the user requirements, the sensors can be configured in the preferred order.

Note:

In case of QMatrix, the channels on the Unused X lines (or) unused  Y lines should be ignored and not to be used as arguments in this API.

Ex: If the host application needs only 24 channels , there are two possible options.

  1. 1.

    In 32 (8x4 configuration), if X6 and X7 are unused, channel6, channel7, channel14, channel15, channel 22, channel23, channel30, channel 31 cannot be used

  2. 2.

    In 32 (8x4 configuration), if Y3 is unused, channe24, channel25, channel26, channel27, channel 28, channel29, channel30, channel 31 cannot be used