Cirrus Logic EP93xx User Manual

Page 746

Advertising
background image

25-8

DS785UM1

Copyright 2007 Cirrus Logic

Analog Touch Screen Interface
EP93xx User’s Guide

2

5

2

5

25

The difference between this new X value and the last valid X value is then compared against
the XMIN value stored in the TSXYMaxMin register (unless the X interrupt pending flag is
set). If the difference is less than this value no action is taken, and the algorithm continues by
discharging and scanning the Y-axis. If the difference between the new X value and the last X
value is greater than the XMIN value, the algorithm continues by comparing the difference
between the new X value and the last X value to the XMAX value in the TSXYMaxMin
register. If the difference is greater than XMAX, it is assumed that this distance is too far for a
touch input to possibly move in the short scan time interval and that the key press is invalid.
However, it is stored as the last recorded X location in case a truly new location is being
determined. The X move interrupt pending flag is also set at this point to cause the algorithm
to skip over the comparison to XMIN on consecutive sample sets. This flag will also cause a
ARM Core interrupt after valid X and Y samples have been established.

The algorithm then starts again, discharging and detecting a valid press. If the difference
between the new X value and the last stored X value is less than the XMAX value, the
algorithm stores the new X value, sets the X move interrupt pending flag and continues by
discharging and scanning a Y-axis value.

Figure 25-4

is the flow chart demonstrating the

scanning process.

The Y-axis scan proceeds in the same fashion as the X-axis scan, except that the switch
matrix is now controlled by the TSYSample register. When the new Y value has been
calculated, the difference between this new Y value and the last valid Y value is then
compared against the YMIN value stored in the TSXYMaxMin register (unless the Y interrupt
pending flag is set). If the difference is less than this value, no Y action is taken and the
algorithm continues by checking the X interrupt pending flag. If this flag is set the Y value is
stored in the Y last register and the interrupt to the ARM Core is generated.

Advertising