English
Language : 

AR1000 Datasheet, PDF (24/37 Pages) Microchip Technology – Resistive Touch Screen Controller
7.15.3.1 How the Calibration Data is Encoded and Stored in EEPROM
This section is informational only. No user action is required.
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.
The manipulated calibration values are stored in 17 address locations of the EEPROM. In the EEPROM, the
calibration data follows the storage of the controller operating parameters. The controller operating parameters
and the calibration data are each preceded by a separator value of 0x55. Coordinates are 10-bit significant
values, scaled to 16-bit and stored in a Hi and Lo byte pair.
Address
Value
Separator
0x14
0x55
Upper Left (Node 1)
X
Lo Hi
Y
Lo Hi
0x15 0x16 0x17 0x18
Upper Right (Node 2)
X
Lo Hi
Y
Lo Hi
0x19 0x1A 0x1B 0x1C
Lower Right (Node 3)
X
Lo Hi
Y
Lo Hi
0x1D 0x1E 0x1F 0x20
Lower Left (Node 4)
X
Lo Hi
Y
Lo Hi
0x21 0x22 0x23 0x24
Flip
State
0x25
Decode the above data to as follows:
1) Swap the order of stored Lo and Hi bytes for a given coordinate.
2) Convert the 16-bit value (stored Hi and Lo 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 Lo = 0x40 and Hi = 0xF3:
Swap
: 0xF340
Hex to Decimal : 62272
Divide by 64 : 973
Flip State Byte: R = Readable bit, W = Writable bit, U = Unimplemented bit read as ‘0’
U–0
U–0
U–0
U–0
U–0
R/W
R/W
–
–
–
–
–
XYFLIP XFLIP
Bit 7
R/W
YFLIP
Bit 0
bit 7-3 Unimplemented: Read as ‘0’
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
DS41393A-Page 20
© 2009 Microchip Technology, Inc.