TWR-K60N512-KEIL Freescale Semiconductor, TWR-K60N512-KEIL Datasheet - Page 164

no-image

TWR-K60N512-KEIL

Manufacturer Part Number
TWR-K60N512-KEIL
Description
K60N512 Keil Tower Kit
Manufacturer
Freescale Semiconductor
Series
Kinetisr
Type
MCUr

Specifications of TWR-K60N512-KEIL

Rohs Compliant
YES
Contents
4 Boards, Documentation, DVD
Peak Reflow Compatible (260 C)
Yes
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
Freescale Tower System, K60N512
TSI configuration
17.4.1.1 Code Example and Explanation
After initialization, in the
seen in the figure, the end-of-scan interrupt is used. At each end of scan the interrupt
subroutine is called by the TSI module and all post processing is done in the ISR. There
is no baseline tracking, baseline is assumed to be constant and this way the main
algorithm to implement is debouncing. Debouncing is the process of validating that a
button push or in this case, a touch, is valid. Debouncing is something that needs to be
done even in standard mechanical keyboards or buttons. In mechanical buttons electrical
disturbances caused by the two metal contacts approaching may cause more than one
button press event to be logged or detected. In capacitive touch sensors, as the finger
approaches the electrode, capacitance varies, the same as with mechanical buttons.
Variations in capacitance due to finger approaching or moving away may falsely trigger
more than one touch.
Debouncing code can be read in the QRUG application code.
diagram that explains the debouncing algorithm.
The interrupt subroutine is also in charge of checking if the "ValidTouch" flag was
enabled after debouncing for each of the four electrodes and toggling the appropriate
LED. The DBOUNCE_COUNTS macro can be found in the TSI.h file. This value
164
Counter > touch
Debounce = 0
Set Touch flag
Yes
Yes
Debounce
count - 1
Set Valid
Touch flag
threshold?
No
No
Clear Touch flag
Kinetis Quick Reference User Guide, Rev. 0, 11/2010
Figure 17-6. Debounce algorithm flowchart
Clear Touch flag
TSI configuration
Next electrode
Initialize
debounce
counter
the next step is to detect touches. As can be
Figure 17-6
Freescale Semiconductor
shows a flow

Related parts for TWR-K60N512-KEIL