Sensors Level

mTouch

mTouch Cap Library Help
Sensors Level

 

To improve noise immunity the samples from sensors go through two filters: decimate and oversampling. If the sample is bigger than decimate filter value then the filter value is incremented otherwise it is decremented. Data from decimate filter go to oversampling filter. The oversampling filter performs averaging. Output from filters is used to form a long time average. Difference between value from filters and this average is used for comparison with threshold to detect state of the sensor. 

 

MTouchGetSensorState(…) function returns a current state of the sensor. The sensor acts as a basic button which can have two states: pressed or released.

Microchip mTouchCap Software Library 1.41 - [July 18, 2012]
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.