3 ports to support the sensors.
Choice of ports available
for the design
SNS/
SNSK
Pair1
ports
SNS/
SNSK
Pair 2
ports
SNS1 Port
: A
SNSK1 Port
:A
SNS2 Port
:B
SNSK2 Port
:C
The choice of ports for the port pairs is limited and
can be found in the section 5.7.1.5
Is there a need for reduced
power consumption (and
reduced execution time)?
_POWER_
OPTIMIZATION_ = 1
Enabling _POWER_OPTIMIZATION_ will lead to
a 40% reduction in power consumed by the
library, but at the expense of reduced external
noise immunity. When power optimization is
enabled, the unused pins within a port used for
QTouch, may not be usable for interrupt driven
applications. This option is available only for
ATtiny and ATmega devices.
SNS1 and SNSK1 pins use
_SNS1_SNSK1_SAME
The _SNS1_SNSK1_SAME_PORT_
symbol
the same port.
_PORT_
needs to be defined as port A is used for both
SNS1 and SNSK1 pins.
Given the above requirements for the applications, the first step is to select the right library
variant required.
Step 1 : Selecting the right library variant
Referring to the library selection guide, we see that there are a few variants of libraries supported
for ATmega1280. Since the application requires 12 channels and rotor slider support, one has to
select a library variant which supports at least 12 channels or more along with 3 Rotors/Sliders.
Hence we select the 12 channel library variant for GCC complier which supports the required
number of sensors/channels. This works out to be libavr51g1_12qt_k_3rs.a
Step 2 : Defining the constants / symbols in the project space
In the host application file (say main.c), define the following constants and symbols
#define QTOUCH_
#define QT_NUM_CHANNELS
#define SNSK1
#define SNS1
#define SNSK2
#define SNS2
#define QT_DELAY_CYCLES
#define _POWER_OPTIMIZATION_
12
A
A
B
C
1
1
#define _SNS1_SNSK1_SAME_PORT_
NOTE: The above definitions are available in touch_config.h file . Alternatively, you can
define these in your IDE’s project options or have them defined in a separate header file.
Step 3 : Usage of library API’s
Now, you can use the touch API’s to create, initialize and perform touch sensing. Please refer to
the sample applications in section 5.6.11.2 for reference. These sample applications illustrate the
usage of the API’s and the sequence of operation.
Step 4 : Adding necessary source files for compilation
53
相关PDF资料
ATU6-P305T-R CABLE CAT6 FULL-BOX 305M GRAY
ATUP-P305T-R CABLE CAT5E PULL-BOX 305M GRAY
ATUP-V305T-R CABLE CAT5E REEL 305M GRAY
AWG28-05/F-1/300-R CABLE 5 COND MULTI 300' RIBBON
AWG28-05/G-1/300-R CABLE 5 COND GRAY 300' RIBBON
AWG28-09/F-1/300-R CABLE 9 COND MULTI 300' RIBBON
AWG28-09/G-1/300-R CABLE 9 COND GRAY 300' RIBBON
AWG28-25/F-1/300-R CABLE 25 COND MULTI 300' RIBBON
相关代理商/技术参数
ATQT600IB 功能描述:界面开发工具 ATQT600IB Interface Brd RoHS:否 制造商:Bourns 产品:Evaluation Boards 类型:RS-485 工具用于评估:ADM3485E 接口类型:RS-485 工作电源电压:3.3 V
ATQT6-XPRO 功能描述:Xplained Pro - Extension Board 制造商:atmel 系列:- 零件状态:有效 配件类型:扩展板 配套使用产品/相关产品:Xplained Pro 标准包装:1
ATR 1078 功能描述:TOOL INSERTION TWEEZER 20 GA 制造商:astro tool corp 系列:* 零件状态:有效 标准包装:1
ATR 1079 功能描述:TWEEZER INSERTION 20 GA 制造商:astro tool corp 系列:* 零件状态:有效 标准包装:1
ATR 1080 制造商:Astro Tool Corp 功能描述:TOOL INSERTION 20 GA
ATR 1080-135 功能描述:INSERTION TOOL 20 GA ANGLED TIP 制造商:astro tool corp 系列:* 零件状态:有效 标准包装:1
ATR 1080-S 功能描述:INSERTION TOOL STRAIGHT 制造商:astro tool corp 系列:* 零件状态:有效 标准包装:1
ATR 1105 功能描述:TOOL INSERTION TWEEZER 16 GA 制造商:astro tool corp 系列:* 零件状态:有效 标准包装:1