AP08113
Capacitive-Touch Color Wheel Implementation
Implementation of Color Wheel Software
Application Note
7
V1.0, 2010-08
3
Implementation of Color Wheel Software
The Color Wheel software enables some XC822T device functions, such as Real-Time Clock, Power Down Mode
and LEDTSCU for example. When the Color Wheel board is turned off, it actually enters Power Down Mode. The
device will wake-up every 1 second for less than 500
µ
s, to check if a touch is detected on the centre button. If no
touch is detected, Power Down Mode is re-entered. When a touch is detected, the device will initialize all
parameters and jump to software execution from the main routine. The Color Wheel software flowchart is shown
in
Section 3.4
.
3.1
Touch Detection Methodology (using Touch-Wheel and LEDTS ROM Library)
The LEDTS ROM Library is enabled, with a customized trip point for touch detection threshold and an oscillation
window for the 4 touch-sense inputs. The centre button uses the TSIN3 touch-sense input, while the touch-wheel
is made up of 3 touch-sense inputs, TSIN0, TSIN1 and TSIN2, as shown in
Figure 2
. The 4 touch-sense inputs
are represented by bit 3-0 of the output parameters (PADFLAG, PADRESULT and PADERROR) of the LEDTS
ROM Library, FINDTOUCHEDPAD function.
There are two touch detection methodologies used in the Color Wheel Application Kit:
•
LEDTS ROM Library touch detection methodology
•
Touch-Wheel Library (Library_TouchWheel.lib) touch detection methodology
The centre button uses the LEDTS ROM Library touch detection methodology, while the touch-wheel uses the
Touch-Wheel Library touch detection methodology, as described in
Section 3.1.1
and
Section 3.1.2
respectively.
Figure 2
Four touch-sense inputs of Color Wheel Application Kit
Note: TSIN3, TSIN0, TSIN1 and TSIN2 are named WHEEL_C, wheel1 (WHEEL_1), wheel2 (WHEEL_2) and
wheel3 (WHEEL_3) respectively, as shown in the diagrams in
Figure 2
and
Figure 7
.
3.1.1
Touch Detection Methodology for the Centre Button
The LEDTS ROM Library is used to detect a touch on the centre button. The outputs of the FINDTOUCHEDPAD
function show whether the centre pad is being touched; i.e. PADRESULT.3 = 1 indicates that the centre pad is
being touched, and the color mode and its respective LED will be updated accordingly.
Touch Detection Methodology by
LEDTS ROM Library
:
- PADRESULT (Bit 3 – TSIN3)
- PADERROR (Bit 3 – TSIN3)
- PADFLAG (Bit 3 – TSIN3)
- PDC value
Touch Detection Methodology by
Touch- Wheel Library
and
parameters from LEDTS ROM
Library
:
- AVERAGEL/H of TSIN0, TSIN1
and TSIN2
- User’s inputs for Touch-Wheel
Library
All manuals and user guides at all-guides.com