Datasheet

2009-2012 Microchip Technology Inc. Preliminary DS41393B-page 47
AR1000 SERIES RESISTIVE TOUCH SCREEN CONTROLLER
10.2 AR1011/AR1021 Storing Default
Calibration Values to EEPROM
If you wish to implement fixed calibration values,
pre-loaded into the AR1000 EEPROM, then the
following procedure must be followed (See
Section 10.2.1 “Preparation for Fixed Calibration
Values).
10.2.1 PREPARATION FOR FIXED
CALIBRATION VALUES
Determine if fixed calibration values are suitable for
your application and determine your desired values.
Calculate a checksum for your custom data set. See
Section 9.3.4.3 “Calibration Data Encoded and
Stored in EEPROM” for additional details regarding
calibration data format.
An example of calculating the checksum is shown
below (See Table 10-1).
The Checksum is an 8-bit value calculated by
successive additions with overflow ignored, as shown
below.
Checksum = 0x45
For each of the 18 calibration values, starting at the
Block Key and ending with the Flip State
Checksum += Calibration value
Next Calibration value
TABLE 10-1: CHECKSUM CALCULATION EXAMPLE
Description Value Operation Checksum Result
Seed 0x45 n/a 0x45
Block Key 0x55 0x45 + 0x55 = 0x9A
Upper Left X Low byte 0x06 0x9A + 0x06 = 0xA0
Upper Left X High byte 0x1B 0xA0 + 0x1B = 0xBB
Upper Left Y Low byte 0xA5 0xBB + 0xA5 = 0x60
Upper Left Y High byte 0x08 0x60 + 0x08 = 0x68
Upper Right X Low byte 0x13 0x68 + 0x13 = 0x7B
Upper Right X High byte 0xDF 0x7B + 0xDF = 0x5A
Upper Right Y Low byte 0xF4 0x5A + 0xF4 = 0x4E
Upper Right Y High byte 0x0B 0x4E + 0x0B = 0x59
Lower Right X Low byte 0x98 0x59 + 0x98 = 0xF1
Lower Right X High byte 0xE4 0xF1 + 0xE4 = 0xD5
Lower Right Y Low byte 0x1E 0xD5 + 0x1E = 0xF3
Lower Right Y High byte 0xEC 0xF3 + 0xEC = 0xDF
Lower Left X Low byte 0xBF 0xDF + 0xBF = 0x9E
Lower Left X High byte 0x1A 0x9E + 0x1A = 0xB8
Lower Left Y Low byte 0x32 0xB8 + 0x32 = 0xEA
Lower Left Y High byte 0xE7 0xEA + 0xE7 = 0xD1
Flip State 0x01 0xD1 + 0x01 = 0xD2
Checksum 0xD2