void MTouchSetSensor(UINT8 sensorNumber, SFR tris, SFR lat, UINT8 ioBitNumber, UINT8 channelNumber, INT16 threshold, INT16 oversampling, INT8 chargeDelay)

mTouch

mTouch Cap Library Help
void MTouchSetSensor(UINT8 sensorNumber, SFR tris, SFR lat, UINT8 ioBitNumber, UINT8 channelNumber, INT16 threshold, INT16 oversampling, INT8 chargeDelay)

 

Description: this function initializes a sensor. All sensors must be set before acquisition. 

Parameters: 

  • sensorNumber - sensor number.
  • tris - address of TRIS register for the sensor.
  • lat - address of LAT register for the sensor.
  • ioBitNumber - sensor IO bit number for LAT and TRIS registers.
  • channelNumber - analog input number for the sensor.
  • threshold - press detection threshold. Set this parameter to -1 to use default value MTOUCH_DEFAULT_THRESHOLD (mTouchConfig.h).  
  • oversampling - defines how many samples used for oversampling. Set this parameter to -1 to use default value MTOUCH_DEFAULT_OVERSAMPLING (mTouchConfig.h).  
  • chargeDelay - CTMU charge delay. Set this parameter to -1 to use default value MTOUCH_DEFAULT_CHARGE_DELAY (mTouchConfig.h).  
Microchip mTouchCap Software Library 1.41 - [July 18, 2012]
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.