Microchip ATSAMD20E16 Manual de Usario

Lee a continuación 📖 el manual en español para Microchip ATSAMD20E16 (114 páginas) en la categoría Niet gecategoriseerd. Esta guía fue útil para 3 personas y fue valorada con 4.5 estrellas en promedio por 2 usuarios

Página 1/114
Atmel-42230G-SAM-Atmel-SAMD-QTouch-Safety-Library-UserGuide_07/2016
Description
Atmel® QTouch® Peripheral Touch Controller (PTC) offers built-in hardware for
buttons, sliders, and wheels. 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 acquiring capacitive touch sensor signals. 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.
The PTC supports two sets of libraries, the QTouch Library and the QTouch
Safety Library. The QTouch Library supports both mutual and self capacitance
methods. The QTouch Safety Library is available for both GCC and IAR. The
QTouch Safety Library also supports both the mutual capacitance method and self
capacitance method along with the additional safety features.
Atmel QTouch Safety Library
Peripheral Touch Controller
USER GUIDE
3Atmel | SMART SAM QTouch Safety Library [USER GUIDE]
Atmel-42230G-SAM-Atmel-SAMD-QTouch-Safety-Library-UserGuide_07/2016
1. Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.1 Device Variants Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2. QTouch Safety Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 API Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Sequence of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Program Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.1 Pin Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.2 Sensor Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.3 Acquisition Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.4 Sensor Global Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.5 Common Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.6 Noise Immunity Global Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4.7 Noise Immunity Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4.8 Sensor Lockout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.9 Frequency Auto Tune . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5 Touch Library Error Reporting Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.6 Touch Library Program Counter Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.6.1 Logical Program Flow Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.6.2 Program Counter Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.7 CRC on Touch Input Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.8 Double Inverse Memory Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.8.1 Application to Touch Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.8.2 Touch Library to Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.9 Application Burst Again Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.10 Memory Requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.10.1 Memory Requirement for IAR Safety library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.11 API Execution Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.11.1 Mutual Capacitance API Execution Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.11.2 Self Capacitance API Execution Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.12 Error Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.12.1 Error Codes Returned Synchronously . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.12.2 Error Codes Returned Through Callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.13 Data and Function Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.14 Moisture Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.14.1 Moisture Tolerance Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.14.2 Multi-touch Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.15 Quick Re-burst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.15.1 Synchronizing Quick Re-burst and Application Burst again . . . . . . . . . . . . . . . . . . . . . . . 48
2.16 Reading Sensor States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.17 Touch Library Suspend Resume Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.18 Drifting on Disabled Sensors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3. QTouch Safety Library API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.1 Typedefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.2 Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.2.1 Touch Library Acquisition Status Bit Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.2.2 Sensor State Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.3 Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.3.1 Touch Library GAIN Setting(tag_gain_t) . . . . . . . . . . . . . . . . 53
Atmel | SMART SAM QTouch Safety Library [USER GUIDE]
Atmel-42230G-SAM-Atmel-SAMD-QTouch-Safety-Library-UserGuide_07/2016
4
3.3.2 Filter Level Setting (tag_filter_level_t) . . . . . . . . . . . . . . . 53
3.3.3 Touch Library AUTO OS Setting (tag_auto_os_t) . . . . . . . . . . . . 53
3.3.4 Library Error Code (tag_touch_ret_t) . . . . . . . . . . . . . . . . 54
3.3.5 Sensor Channel (tag_channel_t) . . . . . . . . . . . . . . . . . . 55
3.3.6 Touch Library State (tag_touch_lib_state_t) . . . . . . . . . . . . 55
3.3.7 Sensor Type (tag_sensor_type_t) . . . . . . . . . . . . . . . . . 55
3.3.8 Touch Library Acquisition Mode (tag_touch_acq_mode_t) . . . . . . . . . 55
3.3.9 AKS Group (tag_aks_group_t) . . . . . . . . . . . . . . . . . . . 56
3.3.10 Channel Gain Setting (tag_gain_t) . . . . . . . . . . . . . . . . . . 56
3.3.11 Sensor Recalibration Threshold (tag_recal_threshold_t) . . . . . . . . 57
3.3.12 Rotor Slider Resolution (tag_resolution_t) . . . . . . . . . . . . . . 57
3.3.13 Auto Tune Setting (tag_auto_tune_type_t) . . . . . . . . . . . . . . 57
3.3.14 PTC Clock Prescale Setting (tag_prsc_div_sel_t) . . . . . . . . . . . 58
3.3.15 PTC Series Resistor Setting (tag_rsel_val_t) . . . . . . . . . . . . . 58
3.3.16 PTC Acquisition Frequency Delay Setting (freq_hop_sel_t) . . . . . . . . 59
3.3.17 PTC Acquisition Frequency Mode Setting (tag_freq_mode_sel_t) . . . . . . 59
3.3.18 PTC Sensor Lockout Setting (nm_sensor_lockout_t) . . . . . . . . . . 60
3.3.19 Moisture Group Setting (moisture_grp_t) . . . . . . . . . . . . . . . 60
3.3.20 Multi-touch Group Setting (mltch_grp_t) . . . . . . . . . . . . . . . . 60
3.4 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.4.1 Touch Library Configuration Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.4.2 Touch Library Safety Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.4.3 Touch Library Double Inverse Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.4.4 Touch Library Parameter Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.4.5 Touch Library Measurement Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.4.6 Touch Library Filter Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.4.7 Touch Library Time Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.4.8 Touch Library Info Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.4.9 Touch Library Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.5 Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.5.1 touch_lib_fault_test_status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.5.2 touch_error_app_cb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.5.3 touch_suspend_app_cb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.6 Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.6.1 Touch Library Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.6.2 Touch Library Sensor Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.6.3 Touch Library Sensor Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.6.4 Touch Library Sensor Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.6.5 Touch Library Sensor Specific Touch Delta Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.6.6 Touch Library Sensor Specific Parameter Configuration Read-write . . . . . . . . . . . . . . . . 72
3.6.7 Touch Library Sensor Specific Acquisition Configuration Read-write . . . . . . . . . . . . . . . . 72
3.6.8 Touch Library Sensor Global Parameter Configuration Read-write . . . . . . . . . . . . . . . . . 73
3.6.9 Touch Library Info Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.6.10 Touch Library Program Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.6.11 Touch Library CRC Configuration Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.6.12 Touch Library Double Inverse check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.6.13 Touch Library Enable Disable Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.6.14 Touch Library Version Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.6.15 Touch Library Moisture Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.6.16 Touch PTC Peripheral Enable Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3.6.17 Touch Library Suspend Resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Especificaciones del producto

Marca: Microchip
Categoría: Niet gecategoriseerd
Modelo: ATSAMD20E16

¿Necesitas ayuda?

Si necesitas ayuda con Microchip ATSAMD20E16 haz una pregunta a continuación y otros usuarios te responderán




Niet gecategoriseerd Microchip Manuales

Niet gecategoriseerd Manuales

Últimos Niet gecategoriseerd Manuales