| Electronic Components Datasheet Search |
|
AN1250 Datasheet(PDF) 9 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
AN1250 Datasheet(HTML) 9 Page - Microchip Technology |
|
9 / 22 page ![]() © 2009 Microchip Technology Inc. DS01250A-page 9 AN1250 IMPLEMENTATIONS OF SPECIAL PURPOSE CAPACITIVE TOUCH This section describes some of the special handling of the data that is available from reading the capacitive touch sensors using the CTMU. The following topics are covered: • Software algorithms for reliable touch operation • Software algorithms for special purpose capacitive touch sensor implementations • Physical board properties for optimal capacitive touch sensors Software Algorithms for Reliable Touch Operation There are several software methods used to combat problems with false sensing of capacitive touch sens- ing circuits. The following software algorithms are used not only in the PICDEM Touch Sense 2 Demo Board, but throughout all of the capacitive touch solutions offered by Microchip. • First method – This is to use a slow averaging routine. This is implemented by simply adding the value read for any capacitive touch sensor circuit into a running average. The key to this method is that a value is only added to the average at a rate much slower than the actual rate that the capacitive touch sensor is being read. On the PICDEM Touch Sense 2 Demo Board, for example, the average is only updated on every 16th read of the capacitive sensor channel. Since the update rate is 16 ms, the slower moving average value is updated at a rate of 256 ms. This slower moving value is then compared to the immediate value. If the immediate value varies by more than what has been established for the trip point for that capacitive sensor, the sensor is determined to be “pressed”, or touched. For more information on the method of slow averaging, refer to the specific averaging section in AN1103, “Software Handling for Capacitive Sensing”. • Second method – This is a debouncing routine. This algorithm is very similar to that used for debouncing of mechanical switches. In the case of capacitive sensors, the debouncing acts as a noise filtering mechanism. Since noise by definition is non-periodic, it should not occur repetitively in multiple sequential scans of a capacitive sensor channel. Figure 4 provides the routine setup for both a pressed and unpressed condition. It requires three consecutive values of pressed or unpressed before the actual state of the capacitive touch sensor is ultimately determined. The value can be changed to suit the application. It should be noted that if a higher number is used, a slower response time will be observed. FIGURE 4: DEBOUNCE ALGORITHM FLOWCHART Enter Read Sensor Unpressed No Unpressed_Count = 0 Yes Pressed Yes No No Yes Exit Sensor reading pressed? Pressed_Count > = 3? Pressed_Count ++ Unpressed_Count ++ Pressed_Count = 0 Unpressed_Count > = 3? |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |