Datasheet

AR1000 SERIES RESISTIVE TOUCH SCREEN CONTROLLER
DS41393B-page 40 Preliminary 2009-2012 Microchip Technology Inc.
9.3.4.3 Calibration Data Encoded and
Stored in EEPROM
System integrators may prefer to pre-load a calibration
into their design. This allows the user to properly
navigate to the calibration routine icon or shortcut
without the use of a mouse. This also addresses the
need to calibrate each system individually before
deploying it to the field.
The raw touch coordinates, decoded by the controller,
for each of the four calibration touches are extrapolated
if CalibrationInset was non-zero. The four coordinate
pairs are then re-oriented, if required, such that the
upper left corner is the minimum (X,Y) “origin” value
pair and the lower right corner is the maximum (X,Y)
value pair.
Coordinates are 10-bit significant values, scaled to
16-bit and stored in a High (Hi) and Low (Lo) byte pair.
Decode the above data to as follows:
1. Swap the order of stored low and high bytes for
a given coordinate.
2. Convert the 16-bit value (stored high and low
bytes) from hexadecimal to decimal.
3. Divide the result by 64 to properly rescale the
16-bit stored value back to a 10-bit significant
coordinate.
Example of Low = 0x40 and High = 0xF3:
Swap: 0xF340
Hex to Decimal: 62272
Divide by 64: 973
REGISTER 9-2: Flip State Byte
For storing desired calibration values to the EEPROM:
AR1010/AR1020 (See Section 9.3.12 “EEPROM
Map”).
AR1011/AR1021 (See Section 9.3.12 “EEPROM
Map” and Section 10.2 “AR1011/AR1021 Stor-
ing Default Calibration Values to EEPROM”).
Separator Upper Left (Node 1) Upper Right (Node 2) Lower Right (Node 3) Lower Left (Node 4) Flip State
XY X YX Y X Y
Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi
U-0 U-0 U-0 U-0 U-0 R/W R/W R/W
XYFLIP XFLIP YFLIP
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0
bit 7-3 Unimplemented: Read as0
bit 2 XYFLIP: X and Y Axis Flip bit
1 = X and Y axis are flipped
0 = X an Y axis are not flipped
bit 1 XFLIP: X-Axis Flip bit
1 = X-axis flipped
0 = X-axis not flipped
bit 0 YFLIP:Y-Axis Flip bit
1 = Y-axis flipped
0 = Y-axis not flipped