Game Development Reference
In-Depth Information
To condense the description of its operation, we've outlined the three possible states in
Table 20-1 .
Table 20-1. Possible states for four-wire touch screen
Activity
Pin 1
Pin 2
Pin 3
Pin 4
Waiting for touch detection
Open
Open
Digital input [pull up]
Ground
Read X position
Voltage probe
Ground
Voltage source
Open
Read Y position
Voltage source
Open
Voltage probe
Ground
Voltage probe means the chip is sensing the voltage on that pin, voltage source is the pin
supplying a voltage to ground , and open means it is unused. The sequence of a touch
event begins with pin 1 and pin 2 open. Pin 3 is configured to digital input with pullup
signifying a voltage is supplied to the pin. When a finger presses on the outer layer and
makes contact with the lower layer, pin 3 goes to ground. When the controller senses
the voltage fall on pin 3, it moves to the second row and reads the X position.
To read the X position, the lower layer is energized from pin 3 to pin 2. The voltage
source creates a gradient along the layer. Pin 1, connected to the upper layer, delivers a
voltage to the controller when a touch pushes it down to make contact with the lower
energized layer. The value of this voltage depends on where the contact is made in the
gradient, much like the previous linear example. Once the X position is known, the
controller moves to the next row and reads the Y position.
The method of obtaining the Y position is much the same but in reverse. The voltage
supply is switched to pin 1, which develops a voltage gradient with pin 4. Then pin 3 is
probed and the voltage corresponds to the distance along the voltage gradient. As the
controller is capable of repeating the detect, read X , and read Y cycles approximately
500 times a second, the user is not aware that the screen doesn't actually register the X
and Y coordinates at the same time.
While the four-wire resistive touch screen is the simplest two-dimensional touch sensor,
there are issues with durability. The main drawback of this type of touch screen is that,
because the layers must be separated by an insulating gap, at least one of the layers must
be flexible. In the four-wire type, the constant flexing of the first conductive layer in‐
troduces microcracks in the coating, which lead to nonlinearities and reduce the accu‐
racy. Other models of resistive touch screens overcome this issue with additional layers
that remove the need for the flexible conductor. They have also been adapted to provide
multitouch capability. We will discuss multitouch and how it works with capacitive
touch screens in greater detail shortly.
Capacitive Touch Screens
A capacitive screen uses a piece of glass coated in a transparent conductor. When your
finger or other conductor comes into contact with the screen, the electrostatic field is
 
Search Nedrilad ::




Custom Search