ATMEL QTAN0016

Diagnostic Modes for Products with Atmel®
Capacitive-touch ICs
1. Introduction
There are many types of Atmel capacitive-touch integrated circuits (QT™ ICs) with
interfaces as diverse as simple pin-per-key (PPK) to serial links for data
communication. To support product development throughout production testing, it is
often useful to obtain data from the QT IC by using the diagnostic modes in a
product’s main microcontroller (MCU).
This application note discusses the various points to be considered when designing
diagnostic modes for your product.
Diagnostic
Modes for QT
ICs
The topics in this application note include:
• Diagnostic mode entry
• Diagnostic data output
• Displayed information
Application Note
QTAN0016
• Pass-through from QT IC to PC
• Production testing
2. Why Do I Need Diagnostics?
Making diagnostic information readily available encourages monitoring and promotes
understanding of the product under development. It also permits the detection of
unusual conditions or, in the event of a fault, the retrieval of useful information while
the fault condition prevails.
3. Diagnostic Mode Entry
There are three basic methods of initiating diagnostic mode during product testing:
• Key sequence
• External command
• Option setting
3.1
Entry by Key Sequence
Key sequences are particularly useful because external equipment or product
modifications are not required. However, the method is not always successful if the
touch is not calibrated or if an error condition occurs.
A typical key sequence could be:
1. Press key A for 3 seconds, then release.
2. Press key B for 3 seconds, then release.
3. Press key C for 3 seconds, then release.
10704A–AT42–10/08
This is preferable to a multi-key instruction such as:
1. Press key A, key B and key C simultaneously for three seconds, then release.
Multi-key instructions restrict the use of Atmel’s Adjacent Key Suppression™ (AKS™) feature,
available in many QT ICs, and may therefore require that key centers are more widely spaced.
3.2
Entry by External Command
Diagnostic mode can be initiated by external commands issued via RS-232, USB, or a similar
communications protocol. The interface can also be used to log data. However, the
disadvantages of this method are that:
• External equipment is required – which is not always convenient.
• Test results may be affected – for example by creating alternate paths to ground.
3.3
Entry by Option Setting
To initiate diagnostic mode, options such as jumpers, DIP switches, non-volatile memory
settings, etc. can be read at start-up and/or during operation. This method is particularly useful
for tests that cycle the product's power, but is not always convenient or easy to implement.
3.4
Mode Entry Considerations
Usually, it is advantageous to support all three methods of initiating diagnostic modes. If several
diagnostic modes are used, consider using a single entry method to step through the modes
(including normal display). The benefits are that:
• Operators need only remember a single key sequence or serial command.
• Code size is minimized.
• Additional diagnostic modes can be added without changing the base code or the product
documentation.
If the product has an OFF, CANCEL or CLEAR key, it can be used to cancel all diagnostics: for
example, by pressing the key for two or three seconds, or consecutively. This arrangement
offers users an intuitive exit from diagnostic mode.
Diagnostic software builds (i.e. using #ifdef DIAG) are also an option, but they are inconvenient
because the code is not available in the production compile. Often, optional code is not updated
with software changes, so it may not be usable when needed. Moreover, special compiles may
be necessary when product memory is limited.
4. Diagnostic Data Output
Diagnostic information can be read by using the product's own display and/or an external
interface. The product display (for example, an LED or LCD) is particularly convenient because
additional external equipment is not required.
An external interface such as RS-232 or USB allows data to be logged and commands to be
entered. The disadvantage is that external equipment is necessary, which may affect test results
(for example, by presenting alternate paths to ground).
External jigs with simple LED displays on PPK or binary interfaces are useful for products that
are not equipped with an MCU.
2
Diagnostic Modes for QT ICs
10704A–AT42–10/08
Diagnostic Modes for QT ICs
5. Displayed Information
If the product does not have sufficient display elements to simultaneously present a set of
information, consider the use of a single diagnostic mode that displays the data in a timed
sequence (see Figure 5-1).
Figure 5-1.
Example of Displayed Diagnostic Information
“QTL”, Last Touched Key ID, Reference Level, Signal Level, Delta, Repeat.
If [n] keys are detected at same time: “QTn”, First Key ID, Second Key ID ... Last Key ID, Repeat.
“QTS”, Key Status Byte 0, Key Status Byte 1 ... Repeat.
“QTE”, QT Error Byte 0 ... “QTF”, QT FMEA Byte 0 ... Repeat.
Note that using an identifier in diagnostic modes is useful in understanding what is being
displayed (for example, the identifiers “QTL”, “QTS” and “QTE” in Figure 5-1).
For products with PPK interfaces, it is useful to have a diagnostic mode that displays an idle
pattern when no keys are pressed, and which cycles the identities of all pressed keys.
6. Pass-through from QT IC to PC
There are demonstration kits and matching PC software for many QT ICs. A diagnostic mode
that passes data directly from the QT IC to the PC (as in the demonstration kits), allows the PC
software to be used to diagnose and tune the product. In some circumstances it is necessary to
configure the product's MCU to buffer data and thus accommodate different data rates and flow
control signals such as DRDY.
7. Production Testing
By keeping production testing in mind during design, diagnostic modes can be embedded in
production jigs.
Key-activated modes can be used by manual test operators to perform and view test results.
Modes selected via external interfaces allow automated test equipment to select tests, retrieve
results for pass/fail logs, and monitor variations in product criteria over the production life of the
product.
3
10704A–AT42–10/08
Headquarters
International
Atmel Corporation
2325 Orchard Parkway
San Jose, CA 95131
USA
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Atmel Asia
Unit 01-05 & 16, 19/F
BEA Tower, Millennium City 5
418 Kwun Tong Road
Kwun Tong
Kowloon
Hong Kong
Tel: (852) 2245-6100
Fax: (852) 2722-1369
Atmel Europe
Le Krebs
8, Rue Jean-Pierre Timbaud
BP 309
78054 Saint-Quentin-enYvelines Cedex
France
Tel: (33) 1-30-60-70-00
Fax: (33) 1-30-60-71-11
Atmel Japan
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Japan
Tel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Technical Support
[email protected]
Sales Contact
[email protected]
Touch Technology Division
1 Mitchell Point
Ensign Way
Hamble
Southampton
Hampshire SO31 4RF
United Kingdom
Tel: (44) 23-8056-5600
Fax: (44) 23-8045-3939
Product Contact
Web Site
www.atmel.com
Literature Requests
www.atmel.com/literature
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDITIONS
OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY
WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL
OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make
changes to specifications and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein.
Unless specifically provided otherwise, Atmel products are not approved for use in automotive applications, medical applications (including, but not limited to, life support systems and other medical equipment), avionics, nuclear applications, or other high risk applications (e.g., applications that, if they fail, can be reasonably
expected to result in significant personal injury or death).
© 2008 Atmel Corporation. All rights reserved. Atmel®, Atmel logo and combinations thereof, and others are registered trademarks, QT ™, AKS ™,
Adjacent Key Suppression™ and others are trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be registered trademarks or trademarks of others.
10704A–AT42–10/08