Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Octopus, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
T empe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memo ry and
analog products. In addition, Microchip’s quality system for the desig n
and manufacture of development systems is ISO 9001:2000 certified.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB
Select the Help menu, and then Topics to open a list of available online help files.
INTRODUCTION
This chapter contains general information that will be useful to know before you use an
mT ouch™ Advanced Ca pacitive Evaluation Kit. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Document Revision History
®
IDE online help.
DOCUMENT LAYOUT
This document describes how to use an mT ouch Advanced Capacitive Evaluation Kit as
a development and demonstrative tool for PIC16F, PIC18F, PIC24F, PIC24H and
PIC32MX MCU device capabilities and features. The document layout is as follows:
• Chapter 1. Introduction to the Evaluation Boards – This chapter introduces the
mTouch Advanced Capacitive Evaluation Kits and provides an overview of their
features.
• Chapter 2. Demonstration Application – This chapter describes the
preprogrammed capacitive touch sense demonstration application.
• Chapter 3. Using the mTouch™ Sensing Solution – This chapter describes the
diagnostic software and how to use it with an mTouch Advanced Capacitive
Evaluation Kit.
• Chapter 4. Evaluation Board Hardware – This chapter provides a functional
overview of the mTouch Advanced Capacitive Evaluation Kits and identifies the
major
hardware components.
• Chapter 5. Troubleshooting – This chapter provides troubleshooting tips for
commonly encountered issues.
• Appendix A. “Evaluation Board Schematics” – This appendix provides
Please complete the enclosed Warran ty Registration Card and mail it promptly.
Sending in the Warranty Registration Card entitles you to receive new product updates.
Interim software releases are available at th e Microchip web site.
RECOMMENDED READING
This user’s guide describes how to use an mTouch Advanced Capacitive Evaluation
Kit. Other useful documents are listed below. The following Microchip documents are
available and recommended as supplemental reference resources. The latest documentation is available from the mTouch web page (www.microchip.com/mtouch).
Readme Files
Preface
For the latest information on using other tools, read the tool-specific Readme files in
the Readme subdirectory of the MPLAB
contain update information and known issues that may not be included in this user’s
guide.
®
IDE installation directory. The Readme files
Family Reference Manual Sections
Family Reference Manual sections are available, which explain the operation of the
PIC microcontroller family architecture and peripheral modules. The specifics of each
device family are discussed in the individual family’s device data sheet.
Users are specifically directed to the “Charge Time Measurement Unit (CTMU)”
Family Reference Manual sections for a detailed discussion of this module, which is at
the heart of the capacitive touch sense demonstration. Please refer to the Microchip
web site for the latest version of these documents.
Device Data Sheets and Flash Programming Specifications
Refer to the appropriate device data sheet for device-specific information and
specifications. Also, refer to the appropriate device Flash Programming Specification
for information on instruction sets and firmware development. These documents may
be obtained from the Microchip web site or your local sales office.
16-bit MCU and DSC Programmer’s Reference Manual (DS70157)
This manual is a software developer’s reference for the 16-bit PIC24F and PIC24H
MCU, and 16-bit dsPIC30F and dsPIC33F DSC families of devices. It describes the
instruction set in detail and also provides general information to assist in developing
software for these device families.
®
Note:Refer to “MIPS32
Instruction Set” at www.mips.com for related information on PIC32 MCUs.
Architecture for Programmers Volume II: The MIPS32®
MPLAB® Assembler Linker and Utilities for PIC24 MCUs and dsPIC®
DSCs User’s Guide (DS51317)
This document details Microchip Technology’s language tools for dsPIC® DSC devices
based on GNU technology. The language tools discussed are:
MPLAB® Assembler Linker and Utilities for PIC32 MCUs User’s Guide
(DS51833)
This document details Microchip Technology’s language tools for PIC32 MCU devices
based on GNU technology. The language tools discussed are:
• MPLAB Assembler PIC32 MCUs
• MPLAB Linker PIC32 MCUs
• MPLAB Archiver/Librarian PIC32 MCUs
• Other Utilities
HI-TECH C® for PIC10/12/16 User’s Guide (DS51865)
This document details the use of Microchip’s HI-TECH C Compiler for PIC10/12/16
MCUs, which is a free-standing, optimizing ANSI C compiler. It supports all PIC10,
PIC12 and PIC16 series devices, as well as the PIC14000 device and the enhanced
Mid-Range PIC
MPLAB® C Compiler for PIC18 MCUs User’s Guide (DS51288)
This document details the use of Microchip’s MPLAB C Compiler for PIC18 MCU
devices to develop an application. The MPLAB C Compiler is a GNU-based language
tool, based on source code from the Free Sof tware Foundation (FSF). For more
information about the FSF, see www.fsf.org.
®
MCU architecture.
MPLAB® C Compiler for PIC24 MCUs and dsPIC® DSCs User’s Guide
(DS51284)
This document details the use of Micr ochip’s MPLAB C Compiler for PIC24 MCUs and
dsPIC DSC devices to develop an application. The MPLAB C Compiler is a
GNU-based language tool, based on source code from the Free Sof tware Foundation
(FSF). For more information about the FSF, see www.fsf.org.
MPLAB® C Compiler for PIC32 MCUs User’s Guide (DS51686)
This document details the use of Microchip’s MPLAB C Compiler for PIC32 MCU
devices to develop an application. The MPLAB C Compiler is a GNU-based language
tool, based on source code from the Free Sof tware Foundation (FSF). For more
information about the FSF, see www.fsf.org.
MPLAB® REAL ICE™ In-Circuit Emulator User’s Guide (DS51616)
This document describes how to use the MPLAB REAL ICE in-circuit em ulato r as a
development tool to emulate and debug firmware on a tar get board, as we ll as how to
program devices.
MPLAB® IDE User’s Guide (DS51519)
This document describes how to use the MPLAB IDE Integrated Development Environment, as well as the MPLAB project manager, MPLAB editor and MPLAB SIM simulator .
Use these development tools to help you develop and debug application code.
Microchip provides online support through our web site at www.microchip.com. This
web site is used as a means to make files and information easily available to
customers. Accessible by using your favorite Internet browser, the web site contains
the following information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip
products. Subscribers will receive e-mail notification whenever there are changes,
updates, revisions or errata related to a spec ified product family or development tool of
interest.
To register, access the Microchip web site at www.microchip.com, click on Customer
Change Notification and follow the registration instructions.
The Development Systems product group categories are:
• Compilers – The latest information on Microchip C compilers a nd other language
tools. These include the MPLAB C compiler; MPASM™ and MPLAB 16-bit
assemblers; MPLINK™ and MPLAB 16-bit object linkers; and MPLIB™ and
MPLAB 16-bit object librarians.
• Emulators – The latest information on Microchip in-circuit emulators.This
includes the MPLAB ICE 2000, MPLAB ICE 4000, MPLAB REAL ICE.
• In-Circuit Debuggers – The latest information on the Microchip in-circuit
debugger, MPLAB ICD 2, and MPLAB ICD 3.
• MPLAB
Integrated Development Environment for development systems tools. This list is
focused on the MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manager
and general editing and debugging features.
• Programmers – The latest information on Microchip programmers. These include
the MPLAB PM3 and PRO MATE
Plus and PICkit™ 1, 2 and 3 development programmers.
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
Thank you for purchasing a Microchip Technology mTouch Advanced Capacitive
Evaluation Kit. Depending on the kit purchased, up to four individua l evaluation boards
are provided. These ev aluation boards a re inten ded to intr od uce a nd de mon strate the
possibilities for capacitive touch sense applications on the PIC16F, PIC18F, PIC24F,
(DM183026-2 kit), PIC24H (AC243026 kit) and PIC32MX microcontroller platforms.
Note:This Evaluation Kit is intended as a functional evaluation of Microchip’s
mTouch Capacitive Sensing Solutions. It has not been designed for use in
noisy or production - level testing environment. Please refer Microchip
Application Notes for guidelines when attempting to design a product to be
used or deployed in such environments.
This chapter introduces the evaluation kits and provides an overview of th eir features.
Topics covered include:
•Overview
• Operational Requirements
• Initial Board Setup
1.1OVERVIEW
The mTouch Advanced Capacitive Evaluation Kits provide a simple platform for
developing a variety of capacitive touch sense applications. Depending on the kit
purchased, up to four evaluation boards are included with PIC16F, PIC18F, PIC24F,
PIC24H and PIC32MX microcontrollers, with four sensor daughter boar ds, as shown in
Figure 1-1 and Figure 1-2.
These evaluation kits are intended to be used to develop a capacitive touch sense
application using Microchip’s mTouch technologies. A kit is used by first connecting a
sensor board, and then supplying power to the board via USB, PICkit™ 3 or the PICkit
Serial Analyzer . The connector, J3/J4, with numbers from 0 to 15, is the connector for
sensing channels. The numbers, from 0 to 15 for PIC16F, PIC24F, PIC24H and
PIC32MX, and from 0 to 12 for PIC18F, represents the microcontroller’s sensing
channel. The vertical 2-row header is for debugging, to give easy access to some of
the microcontroller pins. Debugging may also be done by Microchip programmers and
the I
When using an evaluation kit out of the box, the default function of the LEDs is to
illuminate on a key press. All functionalities may be reprogrammed by using a
Microchip programmer and reprogramming the firmware in the device. The firmware
supplied with the evaluation kit is optimized to use with the four sensor boards supplied.
The USB connection supplies power to the board; no additional external power supply
is needed. For independent operation, the ev al ua ti o n board may be discon nected from
the PC and powered at test points. For the PIC18F, PIC24F and PIC32MX evaluation
boards, the USB also provides communications with the MPLAB mTouch Diagnostic
Tool. The PIC16F and PIC24H evaluation boards use the PICkit Serial Analyzer to
communicate via I
monitor the performance of the touch sensors and to optimize the sensor response. A
separate, 6-wire programming interface allows users to replace the preprogrammed
2
C™ or USB is used to communicate with the mTouch diagnostic tool.
2
C to the PC. The MPLAB mTouch application allows users to
demonstration firmware with their own applications using Microchip’s MPLAB
Integrated Development Environment (IDE) and In-Circuit Serial Programming™
(ICSP™). This allows the board to also be used as a test platform for capacitive touch
sense applications.
With its pre-installed demonstration a pplication, the evaluation board is designed to be
used straight out of the box. Except for a single connection to a computer , no additional
hardware or configuration is necessary.
1.3.1Installing the Software
Before connecting the eva lu at ion board to any computer for th e first time, it is important
to install the PC software found on the accompanying CD first. This ensures that the
proper USB drivers for communicating with the e valu ati on board are in stalled and ready
to recognize the board.
To install the software and driver, insert the evaluation kit CD into the CD-ROM drive.
The installation process starts automatically. The process pauses for user responses
to accept the Microchip software licenses, and to confirm the installation directories;
you must accept the license to use the software.
1.3.2Connecting the Hardware
Prior to connection, place the evaluation board on a flat surface near the computer.
Check to make sure that there are no objects underneath the board. Once the
evaluation kit sof tware is installed, connect the provided USB cable (A to mini-B) to
any available USB port on the PC or powered hub, and then to the board at the
mini-B receptacle. The PC USB connection provides power to the board.
The PIC24F and PIC18F CTMU and PIC32MX Capacitive Voltage Divider (CVD)
evaluation boards use the USB connection to power up the boards and also to
communicate with the mTouch diagnostic tool. The PIC16F Cap Sense Module (CSM)
and PIC24H CVD evaluation boards use the PICkit Serial Analyzer to communicate to
the PC. Connect the USB cable to the PICkit Serial Analyzer, and connect it to the J2
connector on the board and the PC’s USB port. The default code uses the 8-button
board.
When connecting the PIC24F and PIC18F CTMU and PIC32MX CVD boards, a
sequence of pop-up messages should appear in the system tray (lower right of the
desktop), stating that (1) new hardware has been fou nd, (2) drivers ar e being inst alled
and (3) the new hardware is ready for use. If you do not see these messages and the
eval u at io n board does not work, try u nplugging and reconnecting th e USB cable. If this
does not work, see Chapter 5. “Troubleshooting”.
This chapter describes the touch sense application that is preprogrammed on the
PIC16F, PIC18F, PIC24F, PIC24H and PIC32MX microcontrollers, and its general
principles of operation. Topics included in this chapter are:
• Introduction to the Touch Interface
• Individual Touch Sense Demonstrations
2.1INTRODUCTION TO THE TOUCH INTERFACE
For PIC24H and PIC32MX MCUs, touch sensing is achieved using a technique known
as the Capacitive Volt age Divider, which makes use of the ADC module. This technique
is based on successive charging/discharging cycles for sample and hold capacitance
and conversely, sensor plus finger capacitance, which basically cr eates a voltage
divider. For details, refer the application note, AN1298 “Capacitive Touch Using Only an ADC (“CVD”)” .
Control of the touch sense features is built on the PIC18F and PIC24F microcontrollers’
on-chip Charge Time Measurement Unit (CTMU) module. The CTMU consists of a
constant current source that charges each touch circuit to a voltage level. When any
additional capacitance is added to the circuit (from the touch of a fingertip, for example),
the fixed current source will now charge the circuit to a lower voltage. This change is
how the microcontroller detects a touch event. For detailed information on the CTMU
module, please refer to the related “Charge Time Measurement Unit (CTMU)” Family
Reference Manual sections, which are available from the Microchip web site.
On the PIC16F CSM Evaluation Board, the on-chip Cap Sense Module (CSM) creates
a relaxation oscillator to perform touch sensing. The period or frequency of the relaxation oscillator can be measured, and when the sensor is touched, the frequency will
drop and the period will increase, indicating a touched condition.
The microcontrollers use the CTMU, CVD or CSM to monitor it s input channels, which
are in turn, connected to capacitive touch pad sensors on the top layer of the circuit
board.
The evaluation board has four different sensor demonstration boards:
• 8-Key Direct Plug-in Daughter Board
• 12-Key Matrix Plug-in Daughter Board
• 2-Channel Slider Plug-in Daughter Board
• 4-Channel Slider Plug-in Daughter Board
A more detailed description of the e valuation boards ’ operation is pr ovided in Chapter
4. “Evaluation Board Hardware”.
2.1.1Touch Sensitivity
The response of the sensor to fingertip touch is influenced by many factors: touch
areas, voltage and current levels, ambient humidity, static buildup, and so on. The
capacitive touch sensing is done by a relative shift in the capacitance due to the addition of the finger capacitance to the touch sensor. The demonstration code supplied
takes most of the typical environmental factors into consideration. The demonstration
application is very flexible in the sense that it can be modified by the user.