Table 21 QTouch Library for ATtiny40 Configuration parameters

Note1:

For the case of ATtiny40 devices, a ‘touch’ causes the Signal value measured on the Sensor to increase above the Sensor Reference value (In the case of Generic Library devices, a ‘touch’ causes the Signal value to decrease below the Reference value) .  

However, the Negative drift rate and Positive drift rate functionality for the case of Tiny40 devices shall be consistent with the Generic Library case .

So, it is recommended to have a ‘Slower’ Negative Drift rate (4 seconds is the default setting) and a ‘Faster’ Positive Drift rate (1 second is the default setting) for the Tiny40 device .

Note on using Pulse Scale Value:

This variable is used to increase the resolution of the signal. qt_pulse_scale variable is available to change the oversampling and scaling factor.This is available for all the channels and now with this one should increase the gain for each channel individually .  

Function set_qt_pulse_scale is provided in main.c file for reference which will change the values of pulse scale variable .

This variable is divided into higher(pulse/oversamples) and lower(scaling/averaging) nibble.The higher nibble corresponds to number of oversamples and lower nibble corresponds to scaling/averaging. The Pulse value is the power of 2 number of pulses which will accumulate their results.The Scale value is the power of 2 number which will divide the accumulated result from the pulse measurements.

The maximum value of higher nibble possible is 0xA and maximum value of lower nibble is 0xA. Consideration should be taken on the overall effect on timing when setting Pulse values. A high gain setting will add considerably time taken to acquire all channels.