Microchip® Advanced Software Framework

qm_asm_avr.h File Reference

This file contains the QTouch Libary configuration options for AVR 8-bit QMatrix method Capacitive Touch acquisition.

  • Compiler: IAR EWAVR and GNU GCC for AVR.
  • Supported devices: Atmel AVR 8-bit.
  • Userguide: QTouch Library User Guide - doc8207.pdf.
  • Support: https://www.microchip.com/support/

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "touch_config.h"

Macros

#define CLAMP_TO_DISCHARGE_TIME   (DWELL_TIME_CYCLES - 1)
 
#define DELAY_DWELL_TIME   (DWELL_TIME_CYCLES - 1)
 Set actual delay time in capacitive charge loop based on dwell time. More...
 
#define DELAY_PRECHARGE_TIME   (DWELL_TIME_CYCLES - 1)
 
#define DELAY_X_DISCHARGE   0
 
#define DWELL_TIME_CYCLES   2
 Setting dwell time in cycles, and an empirical discharge delay to give c.50% duty cycle x pulses for the longer pulses. More...
 
#define SMP_BIT   SMP_PIN
 Warning: Please donot edit below this line. More...
 

#define CLAMP_TO_DISCHARGE_TIME   (DWELL_TIME_CYCLES - 1)
#define DELAY_DWELL_TIME   (DWELL_TIME_CYCLES - 1)

Set actual delay time in capacitive charge loop based on dwell time.

The -1 is because the following instruction in the charge transfer routine takes one cycle.

#define DELAY_PRECHARGE_TIME   (DWELL_TIME_CYCLES - 1)
#define DELAY_X_DISCHARGE   0
#define DWELL_TIME_CYCLES   2

Setting dwell time in cycles, and an empirical discharge delay to give c.50% duty cycle x pulses for the longer pulses.

For the shorter ones, the spread spectrum calculations mean that we can't get the pulse low time down short enough for 50%.

#define SMP_BIT   SMP_PIN

Warning: Please donot edit below this line.