0% found this document useful (0 votes)
75 views

Microchip CTMU For Capacitive Touch Applications: General Features of The Ctmu

nose

Uploaded by

WilmarGuerra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Microchip CTMU For Capacitive Touch Applications: General Features of The Ctmu

nose

Uploaded by

WilmarGuerra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

AN1250

Microchip CTMU for Capacitive Touch Applications

Author: Bruce Bohn GENERAL FEATURES OF THE CTMU


Microchip Technology Inc. The CTMU is made up of a constant current source and
several logic blocks for it to operate:
INTRODUCTION • The constant current source is connected to the
A/D converter of the microcontroller.
This application note describes the use of Microchip’s
Charge Time Measurement Unit (CTMU) for capacitive • A switch connected to the CTMU constant current
touch applications. The CTMU is an excellent periph- source (and the A/D converter) is provided to
eral for use in touch sensing applications. The following allow accumulated charge to be drained.
are some of the benefits of using the CTMU for touch • Two external pins are provided to trigger the
sensing applications: constant current source.
• Easy hardware setup • An output pin is also available for CTMU use.
• Simple to use software algorithms, available free For the purposes of capacitive touch, the external
of charge pins for triggering the CTMU and the CTMU output
pin are not used.
• High speed allows for greater scan rate of
capacitive touch switches and for many other The connection of the CTMU to the A/D converter is all
processor tasks that is needed for capacitive touch applications. For a
• Low cost and low component count; no external more in-depth discussion on the CTMU module and
hardware other than a connection to the copper how it is used to measure charge or time, refer to the
sensor pad CTMU chapter of the “PIC24F Family Reference Man-
ual” for PIC24F microcontrollers, or the appropriate
The purpose of this application note is to inform data sheet for PIC18F microcontrollers on the
prospective users of the CTMU for capacitive touch on Microchip web site (http://www.microchip.com).
general usage guidelines, CTMU setup and software
See Figure 1 for a block diagram of the CTMU hardware.
algorithms, hardware and layout considerations, and
advanced capacitive touch applications, such as matrix Note that there are a few slight differences in the CTMU
keys, sliders and multiple press keys. module from the PIC18F and the PIC24F. The PIC18F
The CTMU is currently available on selected PIC24 CTMU module does not have an automatic ADC
and PIC18F parts. Wherever possible, sample code for conversion trigger. This is of no consequence for
both has been included. capacitive touch applications. For clarity, the automatic
ADC trigger present on the PIC24F has not been used
All hardware examples used in this application note in the sample code so that it more closely matches the
directly pertain to the PICDEM™ Touch Sense 2 PIC18F code.
Demonstration Board (Part Number DM164128). The
Also note that the CTMU on the PIC18F has different
PICDEM Touch Sense 2 Demo Board uses a PIC24F
device-based microcontroller (PIC24FJ256GB110). internal trigger sources. (ECCP1 and ECCP2 for
This demo board is not necessary for understanding this PIC18F and Timer1 and OC1 for PIC24F). This is
application note. 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.

© 2009 Microchip Technology Inc. DS01250A-page 1


AN1250
FIGURE 1: CTMU BLOCK DIAGRAM

CTMUCON
(CTMUCONH and CTMUCONL for PIC18F)

CTMUICON

Current Source

External Edge
Trigger Pins

Edge CTMU A/D Conversion


Control Control Trigger
Logic Logic (PIC24F only)
Current
Control

Pulse
Timer1 Generation
(PIC24F only) Logic Pulse Output
OC1
(PIC24F only) Pin
ECCP1/ECCP2
A/D Converter Comparator 2 Input
(PIC18F only)

Comparator 2
Output

DS01250A-page 2 © 2009 Microchip Technology Inc.


AN1250
OVERVIEW OF CAPACITIVE TOUCH itance of the touch circuit will ultimately affect the
voltage that the circuit charges to in the fixed period.
APPLICATIONS The A/D converter is used to read the voltage that the
The CTMU is used in capacitive touch applications by touch circuit is charged to with the CTMU.
applying the constant current source of the CTMU to When the capacitance of a human finger is added to
the capacitive touch pad using the following equation: the touch sensor pad, the capacitance increases and
IxT=CxV the result is a lowering of the voltage seen by the A/D
converter (since I and T are held constant).
Where:
• I is the constant current source of the CTMU Setting Up of the CTMU
• T is a fixed period that the CTMU charges the For a capacitive touch application, each sensor must
capacitive touch circuit
be connected directly to a channel of the A/D converter.
• C is the capacitance of the touch circuit See Figure 2 for a block diagram of a Microchip
• V is the voltage read by the A/D converter after microcontroller with a CTMU peripheral. This diagram
the capacitive touch circuit is finished charging illustrates that the CTMU is internally connected to the
It is possible to sense a relative shift in capacitance by A/D converter and allows for selection of any of the A/D
observing a change in voltage. The above equation can channels. With this configuration, a single CTMU unit
be rearranged to: can measure many capacitive touch sensors. Note that
the CTMU has been simplified in order to show only the
V = (I x T)/C elements required for capacitive touch, namely the cur-
Since the CTMU current source is constant (I), the rent source, the current source control and the current
voltage present on the capacitive touch sensor (V) drain mechanism. These will be explained in detail in
relies on two variables: the amount of time the touch later sections. The current source control, labeled
circuit is charged (T) and the capacitive size of the “Trigger” in Figure 2, is manually controlled in software
touch circuit (C). If the amount of time the touch circuit by manipulating bits in the CTMU Control register.
is charged is held constant, then changes in the capac-

FIGURE 2: CAPACITIVE TOUCH BLOCK DIAGRAM

Current Source
Sensor 0

Discharg
Trigger
e

CTMU

C A/D

A/D Converter
A/D MUX

© 2009 Microchip Technology Inc. DS01250A-page 3


AN1250
The current source of the CTMU is available in three source is configured using the CTMUICON register.
ranges: 0.55 μA, 5.5 μA and 55 μA. The current range For detailed information on the CTMU registers on the
selection is made in the CTMUICON register. The cur- PIC24F, refer to Section 11. “Charge Time Measure-
rent precision for each of the three ranges is ±20%. For ment Unit (CTMU)” of the “PIC24F Family Reference
many capacitive touch applications, the highest current Manual”.
range setting (55 μA) works best. This allows for the The registers that control the CTMU on the PIC18F parts
quickest charging of the capacitive touch circuit. The are identical, with the exception that they are 8-bit
CTMUICON register also has bits used to trim the registers: CTMUCONH and CTMUCONL. The CTMU
current source in ±2% increments up to ±62% for each also has different external trigger sources available,
of the three current ranges. namely the ECCP1 and ECCP2 Special Event Triggers.
The CTMU current source is enabled and disabled For detailed information on the CTMU registers for
using software. Two control bits, EDG1STAT and PIC18F, refer to the specific product data sheet.
EDG2STAT in the CTMU control register, determine if See Example 1 for a typical setup of the required
the current source is enabled. These bits are exclu- CTMU and A/D converter registers. Note that the
sively ORed. That is, if EDG1STAT and EDG2STAT are CTMU has been configured so that the external pins
both set or cleared, the current source is off. If either bit are not enabled. For the purposes of this application
is set while the other is cleared, the current source is note, all control of the CTMU is handled through
enabled and charging the circuit. software. The A/D converter is set up to do manual
The IDISSEN bit is enabled to drain charge from the conversion.
A/D converter to insure the charging process begins at For capacitive touch sensing, a relative change in
zero potential. If the bit is set, the circuit is connected to capacitance due to the presence of a finger is required.
VSS (grounded). Note that the discharge of the entire The absolute measurement of capacitance is not
circuit is not accomplished with this feature. This is required.
because the A/D converter is not always connected to
the external circuitry (i.e., touch sensor pad). Note: All PIC18F code examples are written for
The CTMU Configuration register (CTMUCON) is set the PIC18F46J11 family. For other PIC18F
parts with the CTMU module, see the
up so that the external triggers are not used (these pins
device data sheet for specific CTMU
may be used for general purpose I/Os). The same is
register configurations and CTMU usage.
true of the CTMU pulse output pin. The CTMU current

EXAMPLE 1: CTMU AND A/D CONVERTER SETUP FOR PIC24F


//setup CTMU
//CTMUCON
CTMUCONbits.CTMUEN = 0; //make sure CTMU is disabled
CTMUCONbits.CTMUSIDL = 0; //CTMU continues to run in idle mode
CTMUCONbits.TGEN = 0; //disable edge delay generation mode of the CTMU
CTMUCONbits.EDGEN = 0; //edges are blocked
CTMUCONbits.EDGSEQEN = 0; //edge sequence not needed
CTMUCONbits.IDISSEN = 0; //Do not ground the current source
CTMUCONbits.CTTRIG = 0; //Trigger Output is disabled
CTMUCONbits.EDG2POL = 0;
CTMUCONbits.EDG2SEL = 0x3; //Edge2 Src = OC1 (don’t care)
CTMUCONbits.EDG1POL = 1;
CTMUCONbits.EDG1SEL = 0x3; //Edge1 Src = Timer1 (don’t care)

//CTMUICON
CTMUICON = 0x300; //55uA
CTMUICON.ITRIM = 0; //Nominal - No Adjustment

//setup A/D converter

AD1PCFGL = 0x0000;
AD1CON1 = 0x0000;
AD1CHS = 0x0000; //select the analog channel 0
AD1CSSL=0x0000;
AD1CON1bits.FORM = 0x0; //Unsigned fractional format
AD1CON3 = 0x0000; //bits.ADRC=0;
AD1CON2 = 0x0000;
AD1CON1bits.ADON = 1; //Turn On A/D
CTMUCONbits.CTMUEN = 1; //Enable CTMU

DS01250A-page 4 © 2009 Microchip Technology Inc.


AN1250
EXAMPLE 2: CTMU AND A/D CONVERTER SETUP FOR PIC18F
//setup CTMU
//CTMUCON
CTMUCONHbits.CTMUEN = 0; //make sure CTMU is disabled
CTMUCONHbits.CTMUSIDL = 0; //CTMU continues to run in idle mode
CTMUCONHbits.TGEN = 0; //disable edge delay generation mode of the CTMU
CTMUCONHbits.EDGEN = 0; //edges are blocked
CTMUCONHbits.EDGSEQEN = 0; //edge sequence not needed
CTMUCONHbits.IDISSEN = 0; //Do not ground the current source
CTMUCONHbits.CTTRIG = 0; //Trigger Output is disabled
CTMUCONLbits.EDG2POL = 0;
CTMUCONLbits.EDG2SEL = 0x0; //Edge2 Src = ECCP2 (don’t care)
CTMUCONLbits.EDG1POL = 1;
CTMUCONLbits.EDG1SEL = 0x1; //Edge1 Src = ECCP1 pin (don’t care)
//CTMUICON
CTMUICON = 0x03; //55uA
CTMUICON.ITRIM = 0; //Nominal - No Adjustment
//setup A/D converter
ANCON0bits.PCFG = 0x00;
ANCON1 = 0x0000;
ADCON0bits.CHS = 0x00; //select the analog channel 0
ADCON1bits.ADFM = 0x00; //right justified result
ADCON1bits.ADON = 1; //Turn On A/D
CTMUCONHbits.CTMUEN = 1; //Enable CTMU

In the case of the PIDEM Touch Sense 2 Demo Board, the capacitive sensor connected to that channel is read.
all 16 A/D channels are used for capacitive touch. Read- After all 16 touch sensors have been read, the Timer1
ing of each of the sensor channels (A/D channels) is interrupt handler sets a flag called, “dataReadyCTMU”,
controlled by Timer1. Timer1 is setup to fire at a 1 ms and the main routine uses this flag to know when to
interval. Each time that the Timer1 interrupt handler process the new data just gathered from all 16 capacitive
runs, it increments the channel number of the A/D and touch sensors.

© 2009 Microchip Technology Inc. DS01250A-page 5


AN1250
The software routine for reading each of the sensor This step turns on the CTMU current source to
channels consists of the following 13 steps: the selected A/D channel and begins charging
1. Set all of the A/D converter channels to digital the connected capacitive touch sensor.
I/O pins and set them to logic zero (‘0’). 9. Wait for a fixed period of time. For most capacitive
This has the effect of grounding all of the touch applications, this is approximately 2-10 μS.
capacitive touch sensor pads, so they are at In this case, the fixed time period is a loop set up
zero (0) volts potential. to do nothing until the allotted time has expired.
2. Set the A/D channel to be read to an analog input. 10. Clear the edge status bit that was set above.
3. Set the A/D converter to the selected channel. For PIC24F:
4. Set the discharge bit, IDISSEN, of the CTMUCON EDG1STAT OR EDG2STAT (CTMUCON) bits
register. For PIC18F:
This step insures that the internal capacitance of EDG1STAT OR EDG2STAT (CTMUCONL) bits
the A/D converter starts at zero (0) volts potential. This step turns off the CTMU current source and
5. Wait for charge to drain (a few NOPs). stops charging the connected capacitive touch
sensor.
6. Clear the discharge bit, IDISSEN.
11. Initiate an A/D conversion on the selected
7. Set the sample bit, SAMP (AD1CON1), to begin
channel:
sampling the selected channel (PIC24F only).
a) On PIC24F, clear the SAMP bit (AD1CON1).
8. Set either of the edge status bits of the CTMU.
b) On PIC18F, set the GO/DONE bit (ADCON0).
For PIC24F:
12. Wait for the conversion to complete.
EDG1STAT OR EDG2STAT (CTMUCON) bits
For PIC18F: 13. Store the value read by the A/D converter.
EDG1STAT OR EDG2STAT (CTMUCONL) bits Figure 3 provides a software flowchart of the CTMU
capacitive touch sensor, reading as outlined above.

FIGURE 3: CTMU CAPACITIVE TOUCH SENSOR READ FLOWCHART

Set all of ADC as


digital outputs (‘0’) Set selected ADC Set ADC to sample Set Discharge bit,
Start
to insure all sensors channel to analog selected channel IDISSEN
at zero potential

1 2 3 4

Begin sampling by Wait for the


Set the Edge 1
Wait for charge to Clear Discharge bit, setting the SAMP Status bit of the Capacitive Touch
drain (a few NOPs) IDISSEN bit of the ADC Circuit to charge
CTMU (EDG1STAT)
(PIC24F only)

5 6 7 8 9
End

Start ADC Wait for conversion to


Clear Edge 1 conversion by: Move the data
to complete:
Status bit of the Clearing the SAMP Wait for ADC Interrupt from the ADC
bit (PIC24F) flag (PIC24F) conversion to a
CTMU (EDG1STAT)
Setting GO/DONE Wait for GO/DONE = 0 temporary variable
bit (PIC18F) (PIC18F)
10 11 12 13
ADC Operation

DS01250A-page 6
© 2009 Microchip Technology Inc.

CTMU Operation
AN1250
Example 3 provides the equivalent code for reading the the corresponding Index variable so that the correct
capacitive touch sensors using the CTMU on a PIC24F channel is set to an analog A/D. The A/D value is
device. Example 4 has the same algorithm for a temporarily stored in the variable, immediateValue.
PIC18F device. Note that the channel number being The LoopCount determines how long the CTMU
read is referenced by the Index variable. The current source charges the capacitive touch circuit.
ADSELECT array is setup to have the correct bits set for

EXAMPLE 3: READING THE CAPACITIVE TOUCH SENSOR CIRCUIT SOFTWARE ALGORITHM


(PIC24F)
//Read CTMU (Get the raw sensor reading)
AD1PCFGL= 0xFFFF; //set all A/D channels to digital I/O pins
TRISB = 0x0000;
LATB = 0x0000;
PORTB = 0x0000; //set all channels to logical 0 outputs
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
//Wait for charge to drain
TRISB = ADSELECT[Index]; //set selected channel to input
AD1PCFGL = ~ADSELECT[Index]; //set selected channel to analog A/D input
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
//wait for A/D to connect to channel
AD1CHS = Index; //select A/D channel
CTMUCONbits.IDISSEN = 1; //Drain any charge on the A/D circuit
Nop(); Nop(); Nop(); Nop(); Nop();
//Wait for charge to drain
CTMUCONbits.IDISSEN = 0; //Stop discharge of A/D circuit
IFS0bits.AD1IF = 0; //Make sure A/D interrupt flag = 0
AD1CON1bits.SAMP = 1; //Manually start sampling
CTMUCONbits.EDG2STAT = 0; // Make sure edge2 is 0
CTMUCONbits.EDG1STAT = 1; // Set edge1 - Start Charge
for (count = 0; count < loopCount; count++); // Delay for CTMU charge time
CTMUCONbits.EDG1STAT = 0; //Clear edge1 - Stop Charge
IFS0bits.AD1IF = 0;
AD1CON1bits.SAMP = 0; //Clear SAMP bit to begin manual A/D conversion
while(!IFS0bits.AD1IF); //Wait for the A/D conversion to finish
immediateValue = ADC1BUF0; //Read the value from the A/D conversion
AD1CON1bits.SAMP = 0;
IFS0bits.AD1IF = 0;
AD1CON1bits.DONE = 0; //Make sure A/D bits are cleared
//End of CTMU read

© 2009 Microchip Technology Inc. DS01250A-page 7


AN1250
EXAMPLE 4: READING THE CAPACITIVE TOUCH SENSOR CIRCUIT SOFTWARE ALGORITHM
(PIC18F)
//Read CTMU (Get the raw sensor reading)
ANCON0bits.PCFG= 0xFF; //set all A/D channels to digital I/O pins
ANCON1bits.PCFG= 0x1F; //set all A/D channels to digital I/O pins
TRISA = 0x00;
TRISB = 0x00;
TRISC = 0x00;
TRISE = 0x00;
LATA = 0x00;
LATB = 0x00;
LATC = 0x00;
LATE = 0x00;
PORTB = 0x00; //set all channels to logical 0 outputs
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
//Wait for charge to drain
TRISA = ADPASELECT[Index];
TRISB = ADPBSELECT[Index];
TRISC = ADPCSELECT[Index];
TRISE = ADPESELECT[Index]; //set selected channel to input
ANCON0bits.PCFG = ~AD0SELECT[Index];
ANCON1bits.PCFG = ~AD1SELECT[Index]; //set selected channel to analog A/D input
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
//wait for A/D to connect to channel
ADCON0bits.CHS = Index; //select A/D channel
CTMUCONHbits.IDISSEN = 1; //Drain any charge on the A/D circuit
Nop(); Nop(); Nop(); Nop(); Nop();
//Wait for charge to drain
CTMUCONHbits.IDISSEN = 0; //Stop discharge of A/D circuit
Nop(); Nop();
CTMUCONLbits.EDG2STAT = 0; // Make sure edge2 is 0
CTMUCONLbits.EDG1STAT = 1; // Set edge1 - Start Charge
for (count = 0; count < loopCount; count++); // Delay for CTMU charge time
CTMUCONLbits.EDG1STAT = 0; //Clear edge1 - Stop Charge
AD1CON0bits.GODONE = 1; //Set Go bit to begin A/D conversion
while(ANCON0bits.GODONE); //Wait for the A/D conversion to finish
immediateValue = ADRESH;
immediateValue = immediateValue << 8;
immediateValue = immediateValue + ADRESL; //Read the value from the A/D conversion
//End of CTMU read

The main() function contains a while(1) loop sensor data is complete, and the LED display informa-
(endless) that checks for the dataReadyCTMU flag (set tion is also updated, Timer1 is re-enabled, and the whole
by the Timer1 interrupt handler). If the dataReadyCTMU process begins again.
flag is not set, other tasks are performed while it waits. In The structuring of the code in this manner is done to
the case of the PICDEM Touch Sense 2 Demo Board, make the system deterministic. Using a fixed timer to
communication of data over the USB is serviced. If the read each capacitive touch sensor channel at a 1 ms
dataReadyCTMU flag is set, the main() function clears rate fixes the update rate to approximately 16 ms (1 ms
the flag and calls the routines necessary to process the times 16 channels). The actual update rate is slightly
newly acquired data. The main() function temporarily slower, since Timer1 is disabled while the new data is
disables Timer1 to insure that no new data is introduced processed.
in the middle of the routines that are handling data
processing. After all processing of the capacitive touch

DS01250A-page 8 © 2009 Microchip Technology Inc.


AN1250
IMPLEMENTATIONS OF SPECIAL capacitive touch sensor is being read. On the
PICDEM Touch Sense 2 Demo Board, for
PURPOSE CAPACITIVE TOUCH example, the average is only updated on every
This section describes some of the special handling of 16th read of the capacitive sensor channel. Since
the data that is available from reading the capacitive the update rate is 16 ms, the slower moving
touch sensors using the CTMU. The following topics average value is updated at a rate of 256 ms. This
are covered: slower moving value is then compared to the
• Software algorithms for reliable touch operation immediate value. If the immediate value varies by
more than what has been established for the trip
• Software algorithms for special purpose point for that capacitive sensor, the sensor is
capacitive touch sensor implementations determined to be “pressed”, or touched. For more
• Physical board properties for optimal capacitive information on the method of slow averaging,
touch sensors refer to the specific averaging section in AN1103,
“Software Handling for Capacitive Sensing”.
Software Algorithms for Reliable Touch • Second method – This is a debouncing routine.
Operation This algorithm is very similar to that used for
debouncing of mechanical switches. In the case of
There are several software methods used to combat
capacitive sensors, the debouncing acts as a noise
problems with false sensing of capacitive touch sens- filtering mechanism. Since noise by definition is
ing circuits. The following software algorithms are used non-periodic, it should not occur repetitively in
not only in the PICDEM Touch Sense 2 Demo Board, multiple sequential scans of a capacitive sensor
but throughout all of the capacitive touch solutions channel. Figure 4 provides the routine setup for
offered by Microchip. both a pressed and unpressed condition. It
• First method – This is to use a slow averaging requires three consecutive values of pressed or
routine. This is implemented by simply adding the unpressed before the actual state of the capacitive
value read for any capacitive touch sensor circuit touch sensor is ultimately determined. The value
into a running average. The key to this method is can be changed to suit the application. It should be
that a value is only added to the average at a rate noted that if a higher number is used, a slower
much slower than the actual rate that the response time will be observed.

FIGURE 4: DEBOUNCE ALGORITHM FLOWCHART

Enter

Read Sensor

Yes Sensor reading No


Unpressed_Count = 0 pressed? Pressed_Count = 0

Yes Unpressed_Count Yes


Pressed_Count > = 3?
> = 3?

Pressed Unpressed

No No
Unpressed_Count ++
Pressed_Count ++

Exit

© 2009 Microchip Technology Inc. DS01250A-page 9


AN1250
• Third method – This is used to improve capacitive extended to an area shared with an adjacent touch pad
touch sensor reliability in oversampling. This sensor. The PICDEM Touch Sense 2 Demo Board has
method takes advantage of the high-speed an area designated as the “directional wheel”. This
capability of the CTMU. Using the PICDEM Touch area has four capacitive touch sensors laid out as the
Sense 2 Demo Board as an example, each four main ordinal compass directions (north, south,
reading of any of the 16 capacitive touch channels east and west). Each of these sensors is extended to
takes approximately 12 μs. Since the scan rate an area equal to one half (1/2) of the main portion of the
has been determined by Timer1 to be 1 ms, there sensor. These “dual” touch sensor areas make up four
is sufficient time to reread the capacitive touch more directions (northeast, southeast, southwest and
sensor channel multiple times. The PICDEM northwest). Each of the four main sensors also extends
Touch Sense 2 Demo Board reads each channel to the center of the wheel, with each having one quarter
64 times. The sum of all 64 readings for the (1/4) of the area of the main portion of the sensor. A
channel is then divided by 64, and this final value “quad” touch sensor is then formed in the center. See
is used as the data used by all other software Appendix A: “PICDEM™ Touch Sense 2 Demo
routines in the application. Board”. Note that the cover plate is removed in
To use this method, a loop is added around the Figure A-2. The software algorithm now looks first for
routine that reads the capacitive touch sensor. The all four sensors being pressed at approximately one
sum of the reads is tallied for each iteration through quarter (1/4) of the value of a single pressed key. If all
the loop, and at the end of all of the iterations, the four are in range, it is determined that the center button
sum is divided by the number of times through the is pressed. Next, it looks for two adjacent keys pressed
loop (64 in this case). This routine has the effect of at approximately one half (1/2) of a single pressed key.
a low-pass filter. Since the average value of Lastly, single key presses at a full level of the trip value
multiple readings is taken, a noise source that may are checked. Using this multiple press setup, nine
cause an incorrect reading is averaged in with distinct keys are created from only four capacitive
multiple correct readings and has a very minimal touch sensor inputs. The directional wheel works nicely
effect on the overall value. when a finger is moved around the wheel, either clock-
• Fourth method – This is similar to that used for wise or counter-clockwise. It provides a smooth
slow averaging. In this scenario, an array of fluid-like transition between the keys.
previously read values is kept, and when a new Capacitances for each of the sensors should be
value is read, it is introduced into the data array matched as closely as possible, especially when consid-
and the oldest value is removed. The average ering that the software algorithm is searching for multiple
value of the array is used as the data value button presses. The trace lengths to each sensor and
passed to all of the other software routines in the adjacent sensors, LEDs and other board traces become
application. This method again causes a spurious important. The CTMU current trimming capability is a
incorrect value to have only a slight impact on the great aid in achieving a “level playing field” in this
final value used. This routine is used on every respect. The PICDEM Touch Sense 2 Demo Board uses
value read by the capacitive touch routine. this trimming capability to match up each of the four
Note that the PICDEM Touch Sense 2 Demo Board sensors of the directional wheel.
uses all of these methods combined to provide the This was done using a manual process, and each of the
most reliable sensing solution. A/D readings for the sensors was adjusted using the
Capacitive touch sensors can go beyond a simple CTMUICON register to slightly alter the CTMU current
button that is pressed and released. In this section, we source up or down so that the unpressed readings
will explore some different capacitive touch topologies, matched. The adjusted values required for each channel
such as multiple key press, paired button press, matrix were then stored in an array, and the CTMUICON regis-
keyboard implementation and the use of capacitive ter was written to with a value that was selected from the
touch sensors as a slider. array to match the selected channel being read. This is
done for each channel and is applied to the CTMUICON
register at the beginning of the CTMU channel read
Multiple Keys Press routine provided in Example 3.
Using software algorithms, it is possible to detect when Note: For clarity, the code for CTMU current
two or more buttons are simultaneously pressed. In a adjustment is not included in the example
multiple press scenario, the buttons are specifically code, but may be found in the code listing for
designed to allow for multiple presses. The physical the PICDEM Touch Sense 2 Demo Board.
layout of the touch pad sensors is such that an area
exists for a single button press, and the button area is

DS01250A-page 10 © 2009 Microchip Technology Inc.


AN1250
Paired Keys Press Matrix Keys Implementation
The paired keys press is similar to the multiple key Matrix keys use a set of capacitive touch sensors
press with the exception that all of the combinations of arranged in rows and columns to provide a maximum
one half (1/2) are used. In Figure 5, it can be seen that number of buttons or keys with respect to the number of
each button is made up of either a full circle single capacitive touch sensor inputs. The PICDEM Touch
touch pad, or two half (1/2) circle touch pads. The soft- Sense 2 Demo Board makes use of a matrix of four rows
ware for the paired press is similar to that used for the by five columns (4 x 5) to implement a 20-key calculator
multiple key press described above. The “half” pressed type keypad. Notice that the number of channels (9)
keys are looked for first, and then single keys are yields a total of 20 distinct keys. The number of possible
scanned for if no paired press keys are found. This keys is the multiplication of the number of rows and
implementation has the distinction of generating columns (4 x 5), while the number of channels required
10 keys from only four capacitive touch sensor inputs. is the sum of the number of rows plus the number of
It should be noted that it is somewhat difficult to columns (4 + 5). Appendix A: “PICDEM™ Touch
differentiate between two single keys being pressed Sense 2 Demo Board” depicts the PICDEM Touch
and a single paired press key. Sense 2 Demo Board with the cover plate removed. The
keypad matrix is in the center of the board. Each key is
FIGURE 5: PAIRED KEY PRESS a unique combination of a row and a column of the
CAPACITIVE TOUCH matrix. Each key is made up of two touch sensors
SENSOR KEYS shaped as half circles, one half circle for the row and one
half circle for the column. See Figure 6 for a visual
example of a keypad matrix. The software algorithm for
the keypad matrix looks for a row pressed and a column
pressed, and decodes the key pressed. The software for
this implementation also looks for the most pressed row
and column. This is done since the proximity of the sen-
sors can sometimes cause adjacent rows or columns to
cross the tripped threshold level. It is important to note
that using matrix keys causes the overall capacitance to
increase. For example, a matrix with four (4) rows will
have approximately two (2) times the capacitance of a
single sensor key of equal size. This factor becomes
important, since the software is looking for the relative
change in capacitance due to a finger on the capacitive
touch sensor key. Another key factor is that since the
rows and columns are very close to each of the actual
keys, capacitive coupling also increases the amount of
capacitance seen by each of the sensor inputs.
CTMU Channel: 1 It is important to keep the capacitances for each of the
2
rows and each of the columns matched as closely as
possible, especially when considering that the software
3
algorithm is searching for the “most pressed” row and
4 column. The trace lengths to each row/column and
adjacent sensors, LEDs and other board traces
become important. The CTMU current trimming capa-
bility, mentioned in the “Multiple Keys Press” section,
is applicable to the matrix keypad as well.
The difference between paired press and matrix keys is
that for the matrix, there is a key for each combination
of row and column, and for the paired press, there is a
key assigned to each capacitive touch channel and a
key assigned to each combination of two capacitive
touch channels.

© 2009 Microchip Technology Inc. DS01250A-page 11


AN1250
FIGURE 6: MATRIX KEY PRESS CAPACITIVE TOUCH SENSOR KEYS

C1 C2 C3 C4

R1
R1 R1 R1 R1

C1 C2 C3 C4

R2
R2 R2 R2 R2

C1 C2 C3 C4

R3
R3 R3 R3 R3

C1 C2 C3 C4

DS01250A-page 12 © 2009 Microchip Technology Inc.


AN1250
CAPACITIVE TOUCH SLIDER from the captured base value. The position of a finger
on the slider is then determined by the following
The capacitive touch slider senses the position of a equations.
finger along a strip of the circuit board. The area desig-
nated as the strip has two capacitive sensor channels, EQUATION 1:
each formed in the shape of a triangle (see Figure 7 and
Delta Left = (Captured Left Base Capacitance – Current Left Value)
Figure A-2). The schematic of the PICDEM Touch
Sense 2 Demo Board with the cover plate removed Delta Right = (Captured Right Base Capacitance – Current Right Value
shows the slider toward the right hand side of the board.

Since the left triangular sensor has its point at the


FIGURE 7: SLIDER IMPLEMENTATION
bottom of the slider, it is expected that the shift in
COPPER PAD SHAPE capacitance from a finger on the slider at the bottom will
be minimal, and maximum when a finger is positioned
at the top. The position of the left sensor (scaled for a
value of 0 to 100) is shown in Equation 2:
To Input Pin A
EQUATION 2:

Left Position = (Delta Left * 100)/(Delta Left + Delta Right)

Similarly, the right triangular sensor is large at the bottom


of the slider and a finger positioned at the bottom would
cause the largest shift in capacitance, while a finger at
the top of the slider would produce a minimum amount
of capacitance shift. The position of the right sensor
(again scaled for a value 0 to 100) is shown in
Equation 3:

EQUATION 3:

Right Position = ((1 – Delta Right) * 100)/(Delta Left + Delta Right))


To Input Pin B

Finally, the two values may be averaged for the final


position calculation:

EQUATION 4:

Note: Slider is not to scale. Position = (Left Position + Right Position)/2

Notice that the trace between the two triangular pads is It should also be noted that when neither the left nor
grounded. This trace provides additional isolation right slider has crossed the tripped value (base or
between the two triangular capacitive touch sensors by unpressed), the position is not calculated. This
reducing the effect of capacitive coupling. prevents jitter between values that are displayed on the
The slider works by reading the amount of shift in slider LEDs.
capacitance from a normal untouched sensor. The slow To achieve maximum linearity and accuracy of the slider,
moving average described earlier is used to track the it is important to keep the capacitance for each of the
untouched “base” capacitance of each of the two triangular sensors matched as closely as possible since
sensors. When the value is shifted from this base value the software algorithm is using and comparing the
to a value where the trip point is reached for either of values for two triangular sensors. The trace lengths to
the two slider sensors, the base value is then locked each triangular sensor and adjacent sensors, LEDs and
and the slow moving average is no longer used for other board traces become important. The CTMU cur-
slider position calculations until the value of both slider rent trimming capability, mentioned in the “Multiple
sensors is again above the trip threshold. The base Keys Press” section, is applicable to the slider sensors
values for each of the two sensors is captured and as well.
used for the slider position calculations. The software
algorithm then looks at the change in the slider value

© 2009 Microchip Technology Inc. DS01250A-page 13


AN1250
APPLICATION-SPECIFIC Capacitive Touch Covering (Overlay)
CONSIDERATIONS Considerations
Every application will have unique needs relative to its The material and thickness of the covering over the
capacitive touch features. Some of the factors include: capacitive touch sensors is very significant. It deter-
environment, response time, number and type of mines how much of the capacitance of a human finger is
capacitive touch sensors, and the number of other actually transmitted to the capacitive touch sensor.
tasks that the microcontroller is ultimately responsible Therefore, thinner is better than thicker. If a material is
for (such as USB, graphics, I2C™, SPI, UART, etc). too thin, it may not be mechanically sufficient to support
and protect the circuit board. The dielectric constant of
There are typically three common variables that affect
the material also is a determining factor. A higher
overall performance of capacitive touch sensors.
dielectric constant will give better results. Two common
These are:
materials used are PLEXIGLAS™ and tempered
• Printed Circuit (PC) board layout including sensor window glass. PLEXIGLAS has a dielectric constant of
pad size, shape and proximity to other sensors 2.5-3.5, while window glass has a dielectric constant in
• Material and thickness of covering over the the range of 4-8. More information on the topic of
capacitive touch sensors covering capacitive touch sensors can be found in
• Noise susceptibility, both conducted and radiated AN1102, “Layout and Physical Guidelines for Capacitive
Sensing”.
PC Board Layout
Noise Susceptibility
Basic considerations for PC Board (PCB) layout
include keeping traces as short as possible. Traces to The existing noise, which affects capacitive touch appli-
capacitive touch sensors should not run for long cations, should always be considered. The factors
lengths in parallel due to capacitive coupling effects. affecting how to protect against noise are very applica-
The PICDEM Touch Sense 2 Demo Board was laid out tion-specific. The PICDEM Touch Sense 2 Demo Board,
so that the most sensitive area (i.e., the matrix keypad) for example, is open on both the front and back. A
was closest to the microprocessor, so that the traces hatched ground pattern was added to the back of the
run to the capacitive sensors were the shortest, and board wherever possible to minimize the effects of noise
capacitance due to trace length was kept to a minimum. that could be introduced from the bottom of the board.
The subject of board layout practice can be quite intri- The cross hatched pattern provides a good path to
cate; refer to AN1102, “Layout and Physical Guidelines conduct unwanted noise to ground, and at the same
for Capacitive Sensing” for more information. The pad time, it does not cause an appreciable increase in the
shape, size and proximity to other sensors is also capacitance of the touch sensors due to the coupling
covered in AN1102. The PICDEM Touch Sense 2 effect of the sensor pad through the PC board material
Demo Board uses a half inch (½") diameter pad with a to the ground plane.
quarter inch (¼") spacing between adjacent sensors. Some applications may have a completely shielded
The matrix keypad uses half circle sensor pads that enclosure which would allow for less ground plane
have a ½" diameter. The directional wheel sensors added to the PC board. Another consideration is the
have a total area that is approximately double that of proximity of the capacitive touch sensors to other noise
the ½" diameter pads. This was required to allow the producing circuitry on the board, such as communication
double and quad button areas. busses, inverting power supplies for back lighting dis-
plays, RF radio transmitters such as those used for Wi-Fi
or other radio based communications, and so on. In the
case of a radio transmitter and capacitive touch sensors,
it is best to read the buttons only when the RF transmitter
is disabled.

DS01250A-page 14 © 2009 Microchip Technology Inc.


AN1250
APPENDIX A: PICDEM™ TOUCH SENSE 2 DEMO BOARD
Figure A-2 displays the PICDEM Touch Sense 2 Demo Board schematic with the cover plate removed.

FIGURE A-1: PICDEM™ TOUCH SENSE 2 DEMO BOARD WITH COVER REMOVED

© 2009 Microchip Technology Inc. DS01250A-page 15


RE0 RE1 RE2 RE3 RE4

R8 R5 R4 R9 R3
470 470 470 470 470
FIGURE A-2:

BTN_4 BTN_5 BTN_6 BTN_7 BTN_8 D8 D5 D4 D9 D6

DS01250A-page 16
RED RED RED RED RED
AN1250

BTN_0 R6
MC 7 8 9
RE5
MC 7 8 9
47
S1 S2 S3 S26 S22
D1 D10 D7 D2 D3
BTN_1 RED RED RED RED RED
MR 4 5 6 R1
MC 4 5 6
RE6
S4 S5 S6 S28 S24
47
BTN_2 /
D28 D29 D30 D31 D32
MS 1 2 3 */ RED RED RED RED * RED
S7 S8 S9 S25 S21 R10
MS 1 2 3
RE7
BTN_3
47
+/- 0 + -=
D37 D36 D35 D34 D33
S11 S10 S12 S27 S23 RED RED RED RED - RED
R2
+/- 0 + =
RE8
47

*
.

RD1 RD2 RD3 RD4

R12 R13 R14 R15


470 470 470 470

D12 D13 D14 D15


RED RED RED RED

R7 RED RED RED RED


D39 D40 D41 D42
BTN_10 RD5
47 D16 D17 D45 D47
ORN ORN ORN ORN

S14 R16 ORN ORN ORN ORN


D43 D44 D46 D48
RD8
47 D52 D53 D54 D50
YEL YEL YEL YEL
PICDEM™ TOUCH SENSE 2 DEMO BOARD SCHEMATIC (PAGE 1 OF 3)

Slider
BTN_9

R17 YEL YEL YEL YEL


D49 D51 D55 D56
RD9
47 D60 D61 D62 D58
GRN GRN GRN GRN

R31 GRN GRN GRN GRN


D57 D59 D63 D64
RD10
47

© 2009 Microchip Technology Inc.


C3

10F +3.3V
FIGURE A-3:

RE4
RE3
RE2
RE1
RE0
RD7
RD6
RD5
RD4
RD3
RD2
RD1

RD13
RD12

99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76

100
RE4
RE3
RE2
RE1
RE0
RA7
RA6
RD6

RG0
RG1
RD13
RD12

RG13
RG12
RG14
TA5/RD3
TA3/RD1

TC6/RF1
TC1/RD7

ENVREG
1 75

TA4D/RD2
RG15 Vss

PMPRD/RD5

© 2009 Microchip Technology Inc.


2 74

PMPWR/RD4
+3.3V Vdd TA0/RC14

TC7/VBUSS/RF0
3 73

VCAP/VDDCORE
C1 RE5 PMPD5/RE5 TA1/RC13
4 72
.1F RE6 SCL3/PMPD6/RE6 INT0/RD0
5 71
RE7 SDA3/PMPD7/RE7 RD11
6 70
RC1 RC1 RD10 RD10
+5V 7 69
RC2 RC2 RD9 RD9
BZ1 8 68
RC3 RC3 RD8 RD8
+3.3V
9 67
RC4 RC4 SDA1/RA15
10 66
RG6 PMPA5/RG6 SCL1/RA14
R24
+
11 U1 65 NL
- BUZZ PMPA4/RG7 Vss R25
1K 12 64
R41 PMPA3/RG8 OSC2/CLK0/RC15 OSC2 Y1
13 63
+3.3V MCLR MCLR PIC24FJ256GB110 OSC1/CLKI/RC12 OSC1 OSC2
10K 14 62 8MHz
PMPA2/RG9 Vdd +3.3V
15 61
Vss TDO/RA5 C4
C5 16 60
+3.3V Vdd TDI/RA4 .1F
.1F 17 59 C9 C10
C2 RA0 SDA2/RA3
18 58 22pF 22pF
.1F RE8 RE8 SCL2/RA2
19 57
RE9 RE9 D+/RG2 D+
20 56
BTN_5 AN5/SCK1/RB5 D-/RG3 D-
21 55
BTN_4 AN4/SDO1/RB4 VUSB +3.3V
22 54
BTN_3 AN3/RB3 VBUS VBUS
23
BTN_2 AN2/RB2 RF8
53
24
BTN_1 AN1/RB1 RF2
52
25
BTN_0 AN0/SDI1/RB0 USBID
51

AN11/RB11

AVss
AVdd

VREF-/RA9
Vss
Vss

TCK/RA1
RF4
RF5

VREF+/RA10

AN7/RB7
AN8/RB8
AN9/RB9
Vdd
RF13
RF12
Vdd
RD14
RD15

AN6/SCK1/RB6
AN10/RB10
AN12/RB12
AN13/RB13
AN14/RB14
AN15/RB15

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
PICDEM™ TOUCH SENSE 2 DEMO BOARD SCHEMATIC (PAGE 2 OF 3)

BTN_6
BTN_7
BTN_8
BTN_9
BTN_11
BTN_10
BTN_12
BTN_13
BTN_14
BTN_15

+3.3V +3.3V

C13 C6
.1F .1F +3.3V

C7
.1F
AN1250

DS01250A-page 17
BTN_14 +3.3V +3.3V +3.3V +3.3V +3.3V +3.3V +3.3V +3.3V +3.3V +3.3V

R19 R20 R21 R22 R23 R26 R28 R27 R30 R32
BTN_13 BTN_11 470 470 470 470 470 470 470 470 470 470
FIGURE A-4:

D19 D20 D21 D22 D23 D24 D27 D26 D38 D65
GRN YEL GRN YEL GRN YEL GRN YEL RED YEL

DS01250A-page 18
BTN_12
AN1250

RD6 RD7 RC1 RC2 RC3 RC4 RD12 RD13 RG6 RE9

South Southeast East Northeast North hwesttroN West Southwest

retneC rewoP

J3
mini-B PICkit™2Program
D11
VBUS
1
VBUS +5V
HeaderforU1
BTN_15 POWER
S20 2 PICkit2
D- D- MBR0520L
3 R18 100
D+ D+ VPP MCLR
6
4 VDD +5V
5
5 VSS GND
4
Shield PICkit2PROGRAM
ICSPDAT PGM2 HEADERFORU1
3
6
ICSPCLK PGM1
2
NOCONNECT
1
J1

1
BTN_6
4
PGM1
3
2
BTN_7
PGM2
219-2MST

Optional(unpopulated)

D25 LM1117IMP-5.0CT-ND TP2 MCP1702T-3302E/CB


+9V +5V TP4
MRA4003
J4
PICDEM™ TOUCH SENSE 2 DEMO BOARD SCHEMATIC (PAGE 3 OF 3)

D18
1 3 2 3 2
IN OUT IN OUT +3.3V
3 MRA4003
GND GND
2 C14 C16 C27
C15 C17 C26 C18
1 1
.1F 47F 47F.1F 1F 33F .1F
PJ-002B

TP3

© 2009 Microchip Technology Inc.


AN1250
APPENDIX B: OSCILLOSCOPE TRACE

FIGURE B-1: OSCILLOSCOPE TRACE OF CHARGING OF CAP SENSOR CIRCUIT

1 2 1 2

3
3

4 4

Legend: 1. CTMU Current Source OFF.


2. ADC Conversion takes place.
3. Discharge of Capacitive Sense Circuit.
4. CTMU Current Source ON.

© 2009 Microchip Technology Inc. DS01250A-page 19


AN1250
CONCLUSION REFERENCES
Microchip’s CTMU-based capacitive touch solutions • http://www.microchip.com/mTouch
provide a reliable solution for the implementation of • AN1103, “Software Handling for Capacitive
capacitive touch and require minimal external hard- Sensing”
ware. The CTMU unit is fast and software needed for • AN1102, “Layout and Physical Guidelines for
operation is easy to set up, configure and integrate into Capacitive Sensing”
any application requiring capacitive touch.
• “PICDEM™ Touch Sense 2 Demo Board User's
Guide” (DS51748)
• “Section 11. Charge Time Measurement Unit
(CTMU)” in the “PIC24F Family Reference
Manual” (DS39724)

DS01250A-page 20 © 2009 Microchip Technology Inc.


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 Trademarks


applications and the like is provided only for your convenience The Microchip name and logo, the Microchip logo, Accuron,
and may be superseded by updates. It is your responsibility to dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro,
ensure that your application meets with your specifications. PICSTART, rfPIC, SmartShunt and UNI/O are registered
MICROCHIP MAKES NO REPRESENTATIONS OR
trademarks of Microchip Technology Incorporated in the
WARRANTIES OF ANY KIND WHETHER EXPRESS OR U.S.A. and other countries.
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION, FilterLab, Linear Active Thermistor, MXDEV, MXLAB,
INCLUDING BUT NOT LIMITED TO ITS CONDITION, SEEVAL, SmartSensor and The Embedded Control Solutions
QUALITY, PERFORMANCE, MERCHANTABILITY OR Company are registered trademarks of Microchip Technology
FITNESS FOR PURPOSE. Microchip disclaims all liability Incorporated in the U.S.A.
arising from this information and its use. Use of Microchip Analog-for-the-Digital Age, Application Maestro, CodeGuard,
devices in life support and/or safety applications is entirely at dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
the buyer’s risk, and the buyer agrees to defend, indemnify and ECONOMONITOR, FanSense, In-Circuit Serial
hold harmless Microchip from any and all damages, claims, Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB
suits, or expenses resulting from such use. No licenses are Certified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM,
conveyed, implicitly or otherwise, under any Microchip PICDEM.net, PICtail, PIC32 logo, PowerCal, PowerInfo,
intellectual property rights. PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Total
Endurance, 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.
© 2009, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.

Microchip received ISO/TS-16949:2002 certification for its worldwide


headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.

© 2009 Microchip Technology Inc. DS01250A-page 21


WORLDWIDE SALES AND SERVICE
AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE
Corporate Office Asia Pacific Office India - Bangalore Austria - Wels
2355 West Chandler Blvd. Suites 3707-14, 37th Floor Tel: 91-80-3090-4444 Tel: 43-7242-2244-39
Chandler, AZ 85224-6199 Tower 6, The Gateway Fax: 91-80-3090-4080 Fax: 43-7242-2244-393
Tel: 480-792-7200 Harbour City, Kowloon Denmark - Copenhagen
India - New Delhi
Fax: 480-792-7277 Hong Kong Tel: 45-4450-2828
Tel: 91-11-4160-8631
Technical Support: Tel: 852-2401-1200 Fax: 45-4485-2829
Fax: 91-11-4160-8632
http://support.microchip.com Fax: 852-2401-3431 India - Pune France - Paris
Web Address:
Australia - Sydney Tel: 91-20-2566-1512 Tel: 33-1-69-53-63-20
www.microchip.com
Tel: 61-2-9868-6733 Fax: 91-20-2566-1513 Fax: 33-1-69-30-90-79
Atlanta Fax: 61-2-9868-6755
Japan - Yokohama Germany - Munich
Duluth, GA
China - Beijing Tel: 81-45-471- 6166 Tel: 49-89-627-144-0
Tel: 678-957-9614
Tel: 86-10-8528-2100 Fax: 81-45-471-6122 Fax: 49-89-627-144-44
Fax: 678-957-1455
Fax: 86-10-8528-2104 Italy - Milan
Boston Korea - Daegu
China - Chengdu Tel: 39-0331-742611
Westborough, MA Tel: 82-53-744-4301
Tel: 86-28-8665-5511 Fax: 82-53-744-4302 Fax: 39-0331-466781
Tel: 774-760-0087
Fax: 774-760-0088 Fax: 86-28-8665-7889 Netherlands - Drunen
Korea - Seoul
China - Hong Kong SAR Tel: 82-2-554-7200 Tel: 31-416-690399
Chicago
Tel: 852-2401-1200 Fax: 82-2-558-5932 or Fax: 31-416-690340
Itasca, IL
Tel: 630-285-0071 Fax: 852-2401-3431 82-2-558-5934 Spain - Madrid
Fax: 630-285-0075 China - Nanjing Malaysia - Kuala Lumpur Tel: 34-91-708-08-90
Tel: 86-25-8473-2460 Tel: 60-3-6201-9857 Fax: 34-91-708-08-91
Dallas
Addison, TX Fax: 86-25-8473-2470 Fax: 60-3-6201-9859 UK - Wokingham
Tel: 972-818-7423 China - Qingdao Tel: 44-118-921-5869
Malaysia - Penang
Fax: 972-818-2924 Tel: 86-532-8502-7355 Fax: 44-118-921-5820
Tel: 60-4-227-8870
Detroit Fax: 86-532-8502-7205 Fax: 60-4-227-4068
Farmington Hills, MI China - Shanghai Philippines - Manila
Tel: 248-538-2250 Tel: 86-21-5407-5533 Tel: 63-2-634-9065
Fax: 248-538-2260 Fax: 86-21-5407-5066 Fax: 63-2-634-9069
Kokomo China - Shenyang Singapore
Kokomo, IN Tel: 86-24-2334-2829 Tel: 65-6334-8870
Tel: 765-864-8360 Fax: 86-24-2334-2393 Fax: 65-6334-8850
Fax: 765-864-8387
China - Shenzhen Taiwan - Hsin Chu
Los Angeles Tel: 86-755-8203-2660 Tel: 886-3-572-9526
Mission Viejo, CA Fax: 86-755-8203-1760 Fax: 886-3-572-6459
Tel: 949-462-9523
China - Wuhan Taiwan - Kaohsiung
Fax: 949-462-9608
Tel: 86-27-5980-5300 Tel: 886-7-536-4818
Santa Clara Fax: 86-27-5980-5118 Fax: 886-7-536-4803
Santa Clara, CA
China - Xiamen Taiwan - Taipei
Tel: 408-961-6444
Tel: 86-592-2388138 Tel: 886-2-2500-6610
Fax: 408-961-6445
Fax: 86-592-2388130 Fax: 886-2-2508-0102
Toronto
China - Xian Thailand - Bangkok
Mississauga, Ontario,
Canada Tel: 86-29-8833-7252 Tel: 66-2-694-1351
Fax: 86-29-8833-7256 Fax: 66-2-694-1350
Tel: 905-673-0699
Fax: 905-673-6509 China - Zhuhai
Tel: 86-756-3210040
Fax: 86-756-3210049

01/16/09

DS01250A-page 22 © 2009 Microchip Technology Inc.

You might also like