Microchip ATSAMDA1E16B Handleiding


Lees hieronder de 📖 handleiding in het Nederlandse voor Microchip ATSAMDA1E16B (20 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 19 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/20
Atmel QTouch Library
QTouch Library Peripheral Touch Controller
USER GUIDE
Description
Atmel® QTouch® Peripheral Touch Controller (PTC) offers built-in hardware
for capacitive touch measurement on sensors that function as buttons,
sliders, and wheels. The PTC supports both mutual and self-capacitance
measurement without the need for any external component. It offers superb
sensitivity and noise tolerance, as well as self-calibration, and minimizes the
sensitivity tuning effort by the user.
The PTC is intended for autonomously performing capacitive touch sensor
measurements. The external capacitive touch sensor is typically formed on a
PCB, and the sensor electrodes are connected to the analog charge
integrator of the PTC using the device I/O pins. The PTC supports mutual
capacitance sensors organized as capacitive touch matrices in different X-Y
configurations, including Indium Tin Oxide (ITO) sensor grids. In mutual
capacitance mode, the PTC requires one pin per X-line (drive line) and one
pin per Y-line (sense line). In self-capacitance mode, the PTC requires only
one pin with a Y-line driver for each self-capacitance sensor.
Features
•Implements low-power, high-sensitivity, environmentally robust
capacitive touch buttons, sliders, and wheels
•Supports mutual capacitance and self-capacitance sensing
•Up to 32 buttons in self-capacitance mode
•Up to 256 buttons in mutual capacitance mode
•Supports lumped mode configuration
•One pin per electrode - no external components
•Load compensating charge sensing
•Parasitic capacitance compensation for mutual capacitance mode
•Adjustable gain for superior sensitivity
•Zero drift over the temperature and VDD range
•No need for temperature or VDD compensation
•Hardware noise filtering and noise signal de-synchronization for high
conducted immunity
•Atmel provided QTouch Library firmware and QTouch Composer tool
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
Product Support
For assistance related to QTouch capacitive touch sensing software libraries and related issues, contact
your local Atmel sales representative or log on to myAtmel Design Support portal to submit a support
request or access a comprehensive knowledge base.
If you do not have a myAtmel account, please visit http://www.atmel.com/design-support/ to create a new
account by clicking on in the myAtmel menu at the top of the page.Create Account
When logged in, you will be able to access the knowledge base, submit new support cases from the
myAtmel page or review status of your ongoing cases.
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
2
Table of Contents
Description.......................................................................................................................1
Features.......................................................................................................................... 1
1. Development Tools ................................................................................................... 5
2. Device Variants Supported........................................................................................ 6
3. Capacitive Touch Technology.................................................................................... 8
3.1. Capacitive Touch Sensors............................................................................................................8
3.2. Capacitance Measurement Methods............................................................................................8
3.3. Self-capacitance Measurement Method.......................................................................................8
3.4. Mutual Capacitance Measurement Method..................................................................................9
3.5. Capacitive Touch Lumped Sensors..............................................................................................9
3.6. Capacitive Touch Low Power Sensor......................................................................................... 11
3.7. PTC and its Benefits...................................................................................................................13
3.8. PTC Block Diagram for Self-capacitance and Mutual Capacitance Method.............................. 13
3.9. Design Approach with PTC........................................................................................................ 15
3.10. Capacitive Touch Development Cycle........................................................................................16
4. Touch Sensor Debug and Status Information.......................................................... 17
4.1. Signal..........................................................................................................................................17
4.2. Reference...................................................................................................................................17
4.3. Delta........................................................................................................................................... 18
4.4. Touch Status & Slider/Wheel Position........................................................................................ 19
5. QTouch Library........................................................................................................ 20
5.1. Overview.....................................................................................................................................20
5.2. Library Parameters.....................................................................................................................21
5.3. Moisture Tolerance..................................................................................................................... 42
5.4. Reading Sensor States...............................................................................................................44
5.5. Application Flow......................................................................................................................... 44
5.6. API Sequence.............................................................................................................................46
5.7. State Machine.............................................................................................................................47
5.8. Operation Modes........................................................................................................................50
5.9. Touch Library API Error.............................................................................................................. 52
6. Tuning for Noise Performance.................................................................................54
6.1. Noise Sources............................................................................................................................ 54
6.2. Noise Counter Measures............................................................................................................54
7. Application Design................................................................................................... 60
7.1. Touch Library and Associated Files............................................................................................60
7.2. Code and Data Memory Considerations.................................................................................... 60
8. Example Applications.............................................................................................. 63
8.1. Atmel Board Example Projects...................................................................................................63
8.2. User Board Example Projects.................................................................................................... 66
8.3. Using Atmel Software Framework (ASF) with the Example Projects......................................... 67
8.4. Using Xplained Pro Kit to Program User Board......................................................................... 67
8.5. Using QDebug Touch Data Debug Communication Interface.................................................... 67
8.6. Using Xplained Pro Kit for QDebug Data Streaming from User Board...................................... 68
8.7. Using Atmel ICE for QDebug Data Streaming from User Board................................................ 70
9. Known Issues.......................................................................................................... 71
10. FAQ on PTC Qtouch................................................................................................73
11. Appendix..................................................................................................................74
11.1. Macros........................................................................................................................................74
11.2. Typedef.......................................................................................................................................76
11.3. Enumeration............................................................................................................................... 76
11.4. Datastructures............................................................................................................................ 84
11.5. Global Variables......................................................................................................................... 92
11.6. API..............................................................................................................................................93
12. Revision History.....................................................................................................100
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
4
1. Development Tools
The following development tools are required for developing QTouch library using PTC:
•Development Environment for GCC Compiler:
–QTouch Composer 5.9.116 or later versions
–QTouch Library 5.9.211 or later versions
Note:  The QTouch Library and Composer extensions work only with Atmel Studio 7 which
can be downloaded from http://www.atmel.com/
–Dependent Atmel Studio Extensions
• Atmel Software Framework 3.30.1 or later versions
• Atmel Kit Extension 7.0.70 or later versions
•Development Environment for IAR Compiler:
–IAR Embedded Workbench® for ARM® 7.50.1.10273 or later
–IAR Embedded Workbench for Atmel AVR® 6.70.1 or later
–Atmel Software Framework 3.29.0 or later (optional)
–Atmel QTouch Library 5.9.211 IAR Installer (available at http://www.atmel.com/tools/
qtouchlibraryptc.aspx)
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
5
2. Device Variants Supported
QTouch Library for SAM and ATmega devices are available for the following device variants:
Series Variant
SAM D20 J Series ATSAMD20J18, ATSAMD20J17, ATSAMD20J16, ATSAMD20J15,
ATSAMD20J14
SAM D20 G Series ATSAMD20G18, ATSAMD20G18U, ATSAMD20G17, ATSAMD20G17U,
ATSAMD20G16, ATSAMD20G15, ATSAMD20G14
SAM D20 E Series ATSAMD20E18, ATSAMD20E17, ATSAMD20E16, ATSAMD20E15,
ATSAMD20E14
SAM D21 J Series ATSAMD21J18A, ATSAMD21J17A, ATSAMD21J16A, ATSAMD21J15A,
ATSAMD21J16B, ATSAMD21J15B
SAM D21 G Series ATSAMD21G18A, ATSAMD21G17A, ATSAMD21G16A, ATSAMD21G15A,
ATSAMD21G15B, ATSAMD21G16B, ATSAMD21G17AU, ATSAMD21G18AU
SAM D21 E Series ATSAMD21E18A, ATSAMD21E17A, ATSAMD21E16A, ATSAMD21E15A,
ATSAMD21E15B, ATSAMD21E15BU, ATSAMD21E16B, ATSAMD21E16BU
SAM D10 C Series ATSAMD10C14A
SAM D10 D Series ATSAMD10D14AM, ATSAMD10D14AS, ATSAMD10D14AU
SAM D11 C Series ATSAMD11C14A
SAM D11 D Series ATSAMD11D14AM, ATSAMD11D14AS, ATSAMD11D14AU
SAM L21 E Series ATSAML21E15B, ATSAML21E16B, ATSAML21E17B, ATSAML21E18B
SAM L21 G Series ATSAML21G16B, ATSAML21G17B, ATSAML21G18B
SAM L21 J Series ATSAML21J16B, ATSAML21J17B, ATSAML21J18B
SAM R21 E Series ATSAMR21E16A, ATSAMR21E17A, ATSAMR21E18A, ATSAMR21E19A
SAM R21 G Series ATSAMR21G16A, ATSAMR21G17A, ATSAMR21G18A
SAM DA1 E Series ATSAMDA1E14A, ATSAMDA1E15A, ATSAMDA1E16A
SAM DA1 G Series ATSAMDA1G14A, ATSAMDA1G15A, ATSAMDA1G16A
SAM DA1 J Series ATSAMDA1J14A, ATSAMDA1J15A, ATSAMDA1J16A
SAM C21 E Series ATSAMC21E15A, ATSAMC21E16A, ATSAMC21E17A, ATSAMC21E18A
SAM C21 G Series ATSAMC21G15A, ATSAMC21G16A. ATSAMC21G17A, ATSAMC21G18A
SAM C21 J Series ATSAMC21J16A, ATSAMC21J17A, ATSAMC21J18A
SAM C20 E Series ATSAMC20E15A, ATSAMC20E16A, ATSAMC20E17A, ATSAMC20E18A
SAM C20 G Series ATSAMC20G15A, ATSAMC20G16A. ATSAMC20G17A, ATSAMC20G18A
SAM C20 J Series ATSAMC20J16A, ATSAMC20J17A, ATSAMC20J18A
SAM L22 G Series ATSAML22G16A, ATSAML22G17A, ATSAML22G18A
SAM L22 J Series ATSAML22J16A, ATSAML22J17A, ATSAML22J18A
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
6
Series Variant
SAM L22 N Series ATSAML22N16A, ATSAML22N17A, ATSAML22N18A
ATmega Series ATmega328PB, ATmega324PB
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
7
3. Capacitive Touch Technology
3.1. Capacitive Touch Sensors
Capacitive touch sensors replace conventional mechanical interfaces and operate with no mechanical
wear and are closed to the environment. They provide greater flexibility in industrial design and result in
differentiating end product design. For more information, refer Capacitive Touch Lumped Sensors and
Capacitive Touch Low Power Sensor.
Figure 3-1. Sensor Types
3.2. Capacitance Measurement Methods
Self-capacitance measurement method involves charging a sense electrode of unknown capacitance to a
known potential. The resulting charge is transferred into a measurement circuit. By measuring the charge
with one or more charge-and transfer cycles, the capacitance of the sense plate can be determined.
Figure 3-2. Capacitance Measurement Principle
Mutual capacitance measurement method uses a pair of sensing electrodes. One electrode acts as an
emitter into which a charge consisting of logic pulses is driven in burst mode. The other electrode acts as
a receiver that couples to the emitter using the overlying panel dielectric. When a finger touches the
panel, the field coupling is reduced, and touch is detected.
3.3. Self-capacitance Measurement Method
•Uses a single sense electrode (Y-line)
–Self-capacitance button can be formed using one channel
–Self-capacitance slider and wheel is formed using 3 channels
•Robust and easy to use, ideal for low sensors count
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
8
Figure 3-3. Self-capacitance Method
3.4. Mutual Capacitance Measurement Method
•Uses a pair of sense electrodes (X-Y lines)
–Mutual capacitance buttons use one X-Y channel
–Mutual capacitance sliders and wheels can be configured to use 3 to 8 X-Y channels,
depending on the sensor size
•Suitable for high sensor count
•Better moisture tolerance
Figure 3-4. Mutual Capacitance Method
3.5. Capacitive Touch Lumped Sensors
Lumped sensor configuration is a combination of multiple sense lines (Self-capacitance measurement) or
multiple drive and sense lines (Mutual capacitance measurement) to act as one single sensor. Lumped
mode acts as a tool for application developers to improve overall system performance.
Improved Power Efficiency
When multiple sensors are lumped together and treated as one single sensor the time taken to perform
scans is reduced. For battery powered applications using multiple buttons, a group of touch sensors can
be lumped to form a single lumped sensor and this sensor alone can be scanned, thereby resulting in
reduced power consumption. Upon user presence detection on the lumped sensor all configured sensors
in the system can then be scanned individually.
Improved Response Time
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
9
In high key-count applications, there can be a significant latency between touching a sensor and the
detection of a touch contact. This is due to the time taken to sequentially measure the capacitance of
each key on each measurement cycle.With a Lumped mode implementation this latency can be reduced
by arranging the sensors into groups. When one of those lumped groups shows touch detection, only the
keys within that group are individually measured to determine which is touched.
E.g. A keyboard consisting 64 keys may be divided into 8 lumped groups of 8.
Thus, each measurement cycle is reduced to measure only the 8 lumped sensors. When a touch contact
is applied, first the lump sensor shows touch delta, then the 8 component keys are scanned and the
location is resolved. Only 16 measurements are required to resolve the touch status of all keys, compared
to 64 measurements in the traditional sequential scan of all keys.
It offers an additional edge during low power acquisition as a group of keys [in lumped configuration] can
be scanned thus reducing the power consumed drastically. Each sensor has its own pre-scaled clock and
series resistor for improved noise immunity.
Figure 3-5. Self-capacitance Sensors connected to PTC
Figure 3-6. Lumped Self-capacitance Sensors connected to PTC
In the preceeding figures, individual buttons are shown along with the lumped equivalent for self-
capacitance arrangement.
Lumped Mode Pin and Sensor Configuration for Self-capacitance Method:
#define DEF_SELFCAP_LINES Y(5), Y(4), Y(11), Y(10), Y(13), Y(7), Y(12), Y(6), LUMP_Y(5,4)
touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_LUMP, CHANNEL_8, CHANNEL_8, NO_AKS_GROUP,
40u, HYST_6_25, RES_8_BIT, &sensor_id);
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
10
Figure 3-7. Lumped Sense Lines Mutual Capacitance Sensors connected to PTC
In the preceeding figure, mutual capacitance lumped sensor configuration is presented.
Lumped Mode Pin and Sensor Configuration for Mutual Capacitance Method:
#define DEF_MUTLCAP_NODES X(8), Y(10), X(9), Y(10), X(2), Y(12), X(3), Y(12), \X(8), Y(12),
X(9), Y(12), X(2), Y(13), X(3), Y(13), \X(8), Y(13), X(9), Y(13), LUMP_X(2,3,8,9),
LUMP_Y(10,13)
touch_ret = touch_mutlcap_sensor_config(SENSOR_TYPE_LUMP, CHANNEL_10, CHANNEL_10,
NO_AKS_GROUP, 20u, HYST_6_25, RES_8_BIT, 0, &sensor_id);
Limitations of Use
Lumped sensor capacitive load should not exceed the maximum sensor load for individual sensors in
either mutual or self-capacitance modes. Lumped mode treats the larger sensors as one single sensor
therefore the maximum lumped sensor load should also observe this specification, else this will result in
calibration error.
In mutual capacitance measurement mode the capacitive load of each sensor is normally much lower
than that of the self-capacitance method. It is therefore possible as a general rule to use more mutual
sensors together as a single lumped sensor.
The user can ensure that the lumped sensor does not result in a calibration error (value of 0x80) using
p_xxxxcap_measure_data->p_sensors[<SENSOR>].state variable.
3.6. Capacitive Touch Low Power Sensor
The QTouch Library may be configured to operate PTC touch sensing autonomously using the Event
System. In this mode, a single sensor is designated as the ‘Low Power’ key and may be periodically
measured for touch detection without any CPU action. The CPU may be held in deep sleep mode
throughout the operation, minimizing power consumption.
The low power key may be a discrete electrode with one Y (Sense) line for Self-capacitance or One X
(Drive) plus one Y (Sense) for mutual capacitance, or it may be a combination of multiple Drive and/or
Sense lines as a Lumped mode sensor.
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
11
Figure 3-8. Low Power Flow
Active Measurement Mode
In the active measurement mode all configured sensors are measured at
DEF_TOUCH_MEASUREMENT_PERIOD_MS millisecond scan interval.
The user application arrangement could be designed such that when no touch activity is detected on any
of the configured sensors for milliseconds, then the application switchesNO_ACTIVITY_TRIGGER_TIME
to low power measurement mode.
Low Power Measurement Mode
In the low power measurement mode, a designated sensor or a lumped sensor can be scanned as a
single sensor. In this mode, the system is in standby sleep mode, the CPU and other peripherals are in
sleep, excepting for the event system, the RTC and the PTC module / WDT and PTC module in SAM /
Mega devices. A user touch on the designated low power sensor will cause the CPU to wake up and
perform active measurement in order to resolve the touch. To keep reference tracking of the designated
low power sensor, the RTC/WDT is configured to periodically wake up the CPU every
DEF_LOWPOWER_SENSOR_DRIFT_PERIODICITY_MS millisecond to perform one active measurement.
Switching between Active Mode and Low Power Mode
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
12
When switching from active to low power mode, all sensors except the lumped sensor are disabled. So,
no reference tracking is performed on these sensors during the low power mode. When a touch is
detected on the lumped sensor, all disabled sensors shall now be re-enabled and measurement is
initiated on the sensors. If the device is in sleep for a very long time, then it is recommended to force
calibration on the re-enabled sensors to ensure proper reference values on these sensors.
3.7. PTC and its Benefits
•Mixed Hardware + Firmware solution, allows user to define sensor configuration
–Peripheral Touch Controller + QTouch library
•PTC runs data acquisition autonomously, resulting in low CPU utilization and power consumption
–User controlled power-performance trade-off
–CPU can sleep during acquisition to save power
–Alternatively, CPU can perform other time critical operations during touch acquisition
•Robust noise performance
Figure 3-9. User Application with PTC Device
3.8. PTC Block Diagram for Self-capacitance and Mutual Capacitance Method
The PTC block diagram for self-capacitance measurement is shown in the following figure. Only Y-lines
can be connected to self-capacitance sensors and are selected using the Input control. X-lines remain
unused and can be used for any other GPIO functionality. The acquisition module along with the
compensation circuit helps in measuring the change in capacitance due to user touch.
Atmel QTouch Library Peripheral Touch Controller [USER GUIDE]
Atmel-42195M-Peripheral-Touch-Controller_User Guide-07/2016
13


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: ATSAMDA1E16B

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip ATSAMDA1E16B stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd