QTouch Library configuration parameters for ATtiny40

The Table below describes the various configuration parameters corresponding to the ATtiny40 QTouch Library.

Parameter

Description

DEF_QT_DI

Sensor detect integration (DI) limit.Range: 0u to 255u.  

Refer Section 5.3 and Section 5.4 for more info.

DEF_QT_NEG_DRIFT_RATE*(See Note 1)

Sensor negative drift rate. Units: 100ms, Range: 1u to 127u.

Refer Section 5.3 and Section 5.4 for more info.

DEF_QT_POS_DRIFT_RATE*(See Note 1)

Sensor positive drift rate. Units: 100ms, Range: 1u to 127u.

Refer Section 5.3 and Section 5.4 for more info.

DEF_QT_MAX_ON_DURATION

Sensor maximum on duration. Units: 100ms, Range: 0u to 255u.

Refer Section 5.3 and Section 5.4 for more info.

DEF_QT_DRIFT_HOLD_TIME

Sensor drift hold time. Units: 100ms, Range: 1u to 255u.

Refer Section 5.3 and Section 5.4 for more info.

DEF_QT_RECAL_THRESHOLD

·          Setting of 0 = 100% of detect threshold

·          Setting of 1 = 50% of detect threshold

·          Setting of 2 = 25% of detect threshold

·          Setting of 3 = 12.5% of detect threshold

·          Setting of 4 = 6.25% of detect threshold

Refer Section 5.3 and Section 5.4 for more info.

DEF_QT_POS_RECAL_DELAY

Positive Recalibration delay. Range: 1u to 255u.

Refer Section 5.3 and Section 5.4 for more info.

DEF_QT_PULSE_SCALE

Default value is 0x0 means 1 oversamples and scaling/averaging  factor 1.

Refer Note on using Pulse Scale Value below.

DEF_QT_CHARGE_SHARE_DELAY

Charge Share Delay. Range: 1u – 255u. This value needs to be increased if we use high value of series resistor on sensor pin to ensure proper charge time .