Texas Instruments | Apply TI TSC for Various and Multiple Functions | Application notes | Texas Instruments Apply TI TSC for Various and Multiple Functions Application notes

Texas Instruments Apply TI TSC for Various and Multiple Functions Application notes
Application Report
SLAA339 – December 2006
Apply TI TSC for Various and Multiple Functions
Wendy Fang and Tony Chang
........................................................................................... DAP Nyquist
ABSTRACT
This application report presents several examples showing how a touch screen
controller (TSC) from Texas Instruments provides a variety of functions such as graphs,
scroll bars, pressure buttons, and analog dials. A simple resistive TSC can be used to
achieve all of these functions as long as they are not activated simultaneously. This
application report demonstrates a few simple examples how these can be implemented
in software.
1
Introduction
In today's world, the touch sensor, also known as a touch screen or touch panel, is used in many different
fields and applications. It has become one of the most popular tools for human-machinery and /or
human-computer interfaces. In more and more devices and places, the touch sensor has become the sole
interface .
Among the several different types of touch sensors or touch screens (TS), the resistive ones are currently
the most widely used. TI provides a family of resistive touch screen controller (TSC) devices to control the
resistive TSs, which include: ADS7843, ADS7845, ADS7846, TSC2000, TSC2003, TSC2046, and the
latest new devices: TSC2004, TSC2005, TSC2006, TSC2007, and TSC2008. For the performance and
digital interface of these devices, see the relevant data sheets on the TI Web site.
With a TI TSC device, a user can obtain the 2-dimensional (X-axis and Y-axis) or 3-dimensional (X-axis,
Y-axis, and Z-axis) data that indicates or represents the touch position (X and Y) and pressure (Z) on the
TS.
The most common usage of a touch screen system, including a TS and a TSC, is to locate the touch
position so as to obtain the X, Y, and Z data. With this data, users can obtain a graphic view of the finger
or stylus touch and its traces. An example is shown in Figure 1, where the motion on the TS is translated
into pixels on the picture.
SLAA339 – December 2006
Submit Documentation Feedback
Apply TI TSC for Various and Multiple Functions
1
www.ti.com
Use TS as Multiple Scroll Bars
Figure 1. Use TSC Data for Graph and Position
Besides locating touching positions, the touch data and its other mathematical expression can be further
used in various other applications, and to perform various and multiple functions/tools/devices. This
application report presents several simple examples for the user's reference.
2
Use TS as Multiple Scroll Bars
A scroll bar can be used to continuously move and adjust various physical volumes, values, or
parameters, such as the multiple audio EQ bars.
The finger or stylus moving direction on a TS can be sensed and computed to generate multiple virtual
scroll bars as shown in Figure 2.
2
Apply TI TSC for Various and Multiple Functions
SLAA339 – December 2006
Submit Documentation Feedback
www.ti.com
Use TS as Multiple Scroll Bars
Figure 2. Use TSC Data for Scroll Bars
In the example of Figure 2 are four scroll bars. When a touch occurs along the Y-axis within the first
quarter of the X-axis, the Band 0 is active; when a touch moves on the 2nd quarter, the Band 1 is active;
…, and when a touch is on the last quarter, the Band 3 is active, as shown in Figure 3.
SLAA339 – December 2006
Submit Documentation Feedback
Apply TI TSC for Various and Multiple Functions
3
www.ti.com
Use TS as Multiple Scroll Bars
Y-Axis
Touch Panel
4096
Band#0
Touch Area
Band#1
Touch Area
Band#2
Touch Area
Band#3
Touch Area
0
X-Axis
100
900 1100
1900 2100
2900 3100
3900
Figure 3. Divide TS or Touch Panel for Scroll Bars
You may hold or drag the yellow handle in Figure 2 and move up/down along the TS's Y-axis or roll a
finger up/down on a small area on the TS.
More scroll bars can be placed along the X-axis even though Figure 2 shows only four bars as an
example.
The Action green LED in Figure 2 lights as soon as a touch on the TS is sensed; the Active Band indicator
shows which of the four bands the touching occurs in, and the Speed slider beneath the bands can be
used to select the bar moving rate.
To program the scroll bar in Figure 2, the expression was used:
Ybar =
Ybar + Yδ
if ∆Y = Y(k) − Y(k−1) > 0
Ybar
if ∆Y = Y(k) − Y(k−1) = 0
Ybar − Yδ
if ∆Y = Y(k) − Y(k−1) < 0
(1)
Where Ybar is the scroll bar position; and Yδ is the moving rate of the scroll bar, programmable through the
Speed slider.
4
Apply TI TSC for Various and Multiple Functions
SLAA339 – December 2006
Submit Documentation Feedback
www.ti.com
Use TS as Multiple Scroll Bars
2.1
Use Touch on a Point as Pressure Button
The pressure on any single point of a touch screen can be used through the pressure button function, as
shown in Figure 4.
Figure 4. Use TSC Data for Pressure Button
In Figure 4, the instant Pressure, P, on the TS is summed and shown in the Pressure Accumulation
indicator. The pressure accumulation PAccum is obtained from:
P Accum + PAccum ) P
If P u 0
(2)
Because the indicator is a logarithmic scale, it seems that it rises slower as pressure goes higher. The
reset bottom is used to reset the indicator to zero.
SLAA339 – December 2006
Submit Documentation Feedback
Apply TI TSC for Various and Multiple Functions
5
www.ti.com
Use TS as Multiple Scroll Bars
The instant Pressure of a touch on the TS is indicated in the Pressure box of Figure 4 and is calculated
from:
P + A * B R TOUCH
(3)
where the A and B are two constants that convert the measured data to the proper pressure unit. In this
example, A=5 and B=9 were used. And the RTOUCH in Equation 3 was obtained from:
Xposition Z
2
R TOUCH + RX*plate
*1
4096 Z 1
ǒ
Ǔ
(4)
which is the pressure measurement equation, as described in the TI TSC data sheet. See a TI touch
screen data sheet for a detailed explanation of Equation 4.
In Figure 4, the green LED, labeled Pressure ON, indicates a pressure has been detected. The LED is ON
whenever a touch is on the TS, and OFF when releasing.
Any one point on a TS can be designated as a pressure button.
6
Apply TI TSC for Various and Multiple Functions
SLAA339 – December 2006
Submit Documentation Feedback
www.ti.com
Use TS as Multiple Scroll Bars
2.2
Use Area Rotation Touch as Dial
Finger tip rotating, clockwise or counter-clockwise, on the top of a TS can be sensed and used to simulate
an analog dial, as shown in Figure 5.
Figure 5. Using TI TSC Data for Multiple Virtual Dial Panel/Knob and Switch/Bottom
In Figure 5, a dial is located at the center of the TS. To perform the virtual analog dial function, the rolling
angle, or α of the dial is calculated from:
a + arc tanƪǒY * Y 0ǓńǒX * X0Ǔƫ
(5)
Where Y0 = X0 = 2048, the center location of the dial.
SLAA339 – December 2006
Submit Documentation Feedback
Apply TI TSC for Various and Multiple Functions
7
www.ti.com
Use TS as Multiple Scroll Bars
The dial needle position, Pdial, has been programmed as an inverting proportional function of ∆α or the
differential of α, as expressed by Equation 6:
P dial +
* PdĂĂĂĂĂ if Da u 0
ȡPPdialĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂ
+0
ȥP dial ) PdĂĂĂĂĂĂ ifif Da
Da
t0
Ȣ dial
(6)
Where ∆α = α(k) –α(k-1). When the α increases (turning the dial counter-clockwise), Pdial decreases; if α
decreases (turning clockwise), Pdial increases.
Additionally, two switching buttons are located under the dial in the Figure 5; they can be turned ON or
OFF. Touching the left-bottom corner of the TS, the Button#1 is switched ON (red) or OFF (black);
touching the right-bottom corner, the Button#2 is turned ON (green) or OFF (black). Thus, a touch
becomes a switcher and can be used as a Boolean or digital device, such as a power ON/OFF switcher, a
Start/Stop button, and so on.
Figure 6 shows the dial and buttons position on the screen, designated for this particular example.
Y-Axis
Touch Panel
4096
2500
Dial
Area
2048
1500
500
0
Red
Button
0
500
Green
Button
1500 2048 2500
3500 4096
X-Axis
Figure 6. Divide Touch Panel for Multiple Functions
As one can see from these illustrations, there are spare areas on the TS that can be used as more
switches, buttons, dials, bars, and other devices/parts, as is discussed in the next section.
2.3
Use One Screen for Multiple Functions
The foregoing examples used one (or two) function with one TS. Obviously, a TS can be divided into
many areas/points to perform multiple functions. As an example, Figure 7 shows dividing a single screen
into sections to perform all multiple functions previously discussed.
8
Apply TI TSC for Various and Multiple Functions
SLAA339 – December 2006
Submit Documentation Feedback
www.ti.com
Conclusions
Touch Panel
Band#1
Touch
Area
Band#2
Touch
Area
Band#3
Touch
Area
Band#4
Touch
Area
Band#5
Touch
Area
Band#6
Touch
Area
Band#7
Touch
Area
Pressure
#1
Dial #1
Pressure
#2
Graphic Function Area
Dial #2
Pressure
#3
Button
#1
Button
#2
Button
#3
Button
#4
Button
#5
Button
#6
Figure 7. Diving One Screen for Multiple Functions
3
Conclusions
This application report presents examples that have been programmed, applied, and tested on a TI
TSC2005EVM-PDK set.
By using simple differential (scroll bar or dial), integrate (pressure accumulator), or trigonometric (dial)
expressions of the touch data X, Y, and/or Z, a variety of virtual tools/devices can be generated and
applied, with a resistive TS controlled under a TI resistive TSC.
Users can use a single TS, by programming multiple software tabs, to perform many different functions,
and/or divide the panel into many different areas for these multiple functions.
To obtain the foregoing functions in demonstration software, which have been tested on a TI
TSC2005EVM-PDK and can run on your personal computer, send a request to:
dataconvapps@list.ti.com
SLAA339 – December 2006
Submit Documentation Feedback
Apply TI TSC for Various and Multiple Functions
9
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to
discontinue any product or service without notice. Customers should obtain the latest relevant information
before placing orders and should verify that such information is current and complete. All products are sold
subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent
TI deems necessary to support this warranty. Except where mandated by government requirements, testing
of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible
for their products and applications using TI components. To minimize the risks associated with customer
products and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent
right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine,
or process in which TI products or services are used. Information published by TI regarding third-party
products or services does not constitute a license from TI to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or
other intellectual property of the third party, or a license from TI under the patents or other intellectual
property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices.
Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not
responsible or liable for such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for
that product or service voids all express and any implied warranties for the associated TI product or service
and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs where you can obtain information on other Texas Instruments products and application
solutions:
Products
Applications
Amplifiers
amplifier.ti.com
Audio
www.ti.com/audio
Data Converters
dataconverter.ti.com
Automotive
www.ti.com/automotive
DSP
dsp.ti.com
Broadband
www.ti.com/broadband
Interface
interface.ti.com
Digital Control
www.ti.com/digitalcontrol
Logic
logic.ti.com
Military
www.ti.com/military
Power Mgmt
power.ti.com
Optical Networking
www.ti.com/opticalnetwork
Microcontrollers
microcontroller.ti.com
Security
www.ti.com/security
Low Power Wireless
www.ti.com/lpw
Telephony
www.ti.com/telephony
Mailing Address:
Video & Imaging
www.ti.com/video
Wireless
www.ti.com/wireless
Texas Instruments
Post Office Box 655303 Dallas, Texas 75265
Copyright © 2007, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising