Hitachi SH7760 Solution Engine2 Overview page 87

Table of Contents

Advertisement

[Calibration Method]
(1) The SH7760 writes the dot points of points A and B to the registers XAPDR, YAPDR, XBPDR, and YBPDR.
(2) When point A is pen-touched, it is signaled by a pen touch interrupt. The A/D conversion result of the pen-touched
point A is written to the registers XAPAR and YAPAR.
(3) Next, when point B is pen-touched, it is signaled by a pen touch interrupt. The A/D conversion result of the pen-
touched point B is written to the registers XBPAR and YBPAR.
(4) Calibration takes place according to data in the above steps (1) to (3). Using the following expression, the SH7760
calculates the number of dots per data of the X position A/D conversion result and that of the Y position A/D
conversion result.
Number of dots per data of the X position A/D conversion result (DX)
DX = (DXA – DXB) / (TXB – TXA)
Number of dots per data of the Y position A/D conversion result (DY)
DY = (DYA – DYB) / (TYB- TYA) Where TYA < TYB, DYA > DYB
DXA: X position drawing dot point of point A (XAPDR)
DXB: X position drawing dot point of point B (XBPDR)
TXA: X position A/D conversion result of point A (XAPAR)
TXB: X position A/D conversion result of point B (XBPAR)
DYA: Y position drawing dot point of point A (YAPDR)
DYB: Y position drawing dot point of point B (YBPDR)
TXA: Y position A/D conversion result of point A (YAPAR)
TXB: Y position A/D conversion result of point B (YBPAR)
(5) The above calculation results are multiplied by 1,000, their decimal places are rounded, and the resulting integers are
written to the registers DXDR and DYDR.
DX dot register (DXDR) = DX x 1,000 (rounding the decimal places)
DY dot register (DYDR) = DY x 1,000 (rounding the decimal places)
(6) The power supply controller uses data stored in the registers DXDR, DYDR, XAPDR, YAPDR, XAPAR, and YAPAR
to calculate dot position data (XPDR, YPDR) of the pen-touched point on the LCD. The power supply controller
uses the following expression to calculate dot position data.
X position dot register (XPDR)
XPDR = (DXA – (DX x (TXD – TXA)) / 1,000
Y position dot register (YPDR)
YPDR = (DYA – (DY x (TYD – TYA)) / 1,000
DXA: XA position dot register (XAPDR) data
DX: DX1 dot register (DXDR) data
TXA: XA position A/D register (XAPAR) data
TXD: X position A/D register (XPAR) data
DYA: YA position dot register (YAPDR) data
DY: DY dot register (DYDR) data
TYA: YA position A/D register (YAPAR) data
TYD: X position A/D register (YPAR) data
The power supply controller outputs data stored in the X position A/D register (XPAR) and Y position A/D register
(YPAR). When the values stored in the DX dot register (DXDR) and DY dot register (DYDR) are not 0, the power
supply controller outputs the data derived from the above expressions to the X position dot register (XPDR) and Y
position dot register (YPDR). When either value is 0, it does not use the above expression for calculation and outputs
only XPAR and YPAR data.
Where TXA < TXB, DXA > DXB
84

Advertisement

Table of Contents
loading

Table of Contents