EEWORLDEEWORLDEEWORLD

Part Number

Search

AN1250

Description
Microchip CTMU for Capacitive Touch Applications
File Size805KB,22 Pages
ManufacturerMicrochip
Websitehttps://www.microchip.com
Download Datasheet View All

AN1250 Overview

Microchip CTMU for Capacitive Touch Applications

AN1250
Microchip CTMU for Capacitive Touch Applications
Author:
Bruce Bohn
Microchip Technology Inc.
GENERAL FEATURES OF THE CTMU
The CTMU is made up of a constant current source and
several logic blocks for it to operate:
• The constant current source is connected to the
A/D converter of the microcontroller.
• A switch connected to the CTMU constant current
source (and the A/D converter) is provided to
allow accumulated charge to be drained.
• Two external pins are provided to trigger the
constant current source.
• An output pin is also available for CTMU use.
For the purposes of capacitive touch, the external
pins for triggering the CTMU and the CTMU output
pin are not used.
The connection of the CTMU to the A/D converter is all
that is needed for capacitive touch applications. For a
more in-depth discussion on the CTMU module and
how it is used to measure charge or time, refer to the
CTMU chapter of the
“PIC24F Family Reference Man-
ual”
for PIC24F microcontrollers, or the appropriate
data sheet for PIC18F microcontrollers on the
Microchip web site (http://www.microchip.com).
See Figure 1 for a block diagram of the CTMU hardware.
Note that there are a few slight differences in the CTMU
module from the PIC18F and the PIC24F. The PIC18F
CTMU module does not have an automatic ADC
conversion trigger. This is of no consequence for
capacitive touch applications. For clarity, the automatic
ADC trigger present on the PIC24F has not been used
in the sample code so that it more closely matches the
PIC18F code.
Also note that the CTMU on the PIC18F has different
internal trigger sources. (ECCP1 and ECCP2 for
PIC18F and Timer1 and OC1 for PIC24F). This is
mentioned purely for reference, and again, makes no
difference for capacitive touch applications. The sample
code listings in this application note manually set/clear
the EDG1STAT1 and/or EDG2STAT bits in the CTMU
control register for starting and stopping the CTMU
current source.
INTRODUCTION
This application note describes the use of Microchip’s
Charge Time Measurement Unit (CTMU) for capacitive
touch applications. The CTMU is an excellent periph-
eral for use in touch sensing applications. The following
are some of the benefits of using the CTMU for touch
sensing applications:
• Easy hardware setup
• Simple to use software algorithms, available free
of charge
• High speed allows for greater scan rate of
capacitive touch switches and for many other
processor tasks
• Low cost and low component count; no external
hardware other than a connection to the copper
sensor pad
The purpose of this application note is to inform
prospective users of the CTMU for capacitive touch on
general usage guidelines, CTMU setup and software
algorithms, hardware and layout considerations, and
advanced capacitive touch applications, such as matrix
keys, sliders and multiple press keys.
The CTMU is currently available on selected PIC24
and PIC18F parts. Wherever possible, sample code for
both has been included.
All hardware examples used in this application note
directly pertain to the PICDEM™ Touch Sense 2
Demonstration Board (Part Number DM164128). The
PICDEM Touch Sense 2 Demo Board uses a PIC24F
device-based microcontroller (PIC24FJ256GB110).
This demo board is not necessary for understanding this
application note.
©
2009 Microchip Technology Inc.
DS01250A-page 1
Pioneer Semiconductor, a high-performance RISC-V company, and SEGGER jointly launched a free commercial version of Embedded Studio
First of all, let me give you a preview. This high-performance MCU will be launched on ourfrequency measurement channel in the near future . Interested netizens are welcome to support it~Recently, Pio...
nmg Domestic Chip Exchange
STM32SPI bus driving capability
May I ask the class leader, how strong is the SPI bus driving capability of STM32, and how many SPI FLASH can it support at the same time? I can't find it in the manual. Please tell me if you know, an...
zqiaoshi stm32/stm8
How to install the downloaded offline version of windows embedd compact 7
How to install the downloaded offline version of Windows Embed Compact 7? It always prompts: a product key could not be found on the system to allow the installation....
haohaoxuexittxs Embedded System
After the exhibition, the company moved again
May was an unusual month. I was busy preparing for the Guangzhou Elevator Exhibition and then the company moved after I came back. I only had the chance to open my computer and browse the forums now. ...
眼大5子 Talking
Can multiple AD7949 chips share a common SPI interface?
[size=6]According to the timing requirements of the data sheet, CNV is used to start the conversion. So can it also be used as a chip select signal? Has anyone done this before? Please give me some ad...
flying510 ADI Reference Circuit
Very simple 3-color alternating flashing light engineering test kl25z keil
This is my first kl25z test program. It is simple and has a sense of presence. After I bought the kl25z board, I didn't know how to start the test. Later, I found this on the Internet. I compiled and ...
liwenz NXP MCU

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Robot
development
community

Index Files: 569  471  1307  514  1762  12  10  27  11  36 
Datasheet   0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Room 1530, 15th Floor, Building B, No. 18 Zhongguancun Street, Haidian District, Beijing Telephone: (010) 82350740 Postal Code: 100190
Copyright © 2005-2026 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号