EZscreen RS-232 Touchscreen Controller (V4.3) =================================================== Programming Note : ------------------ (A) Communication protocol is fixed as the following : Baud Rate = 38400 BPS Data Bit = 8 Bit Stop Bit = 1 Bit Parity = None (B) Data formats : ( from touchscreen controller to PC ) (1) TouchScreen Record : -------------------------------------- Bit # 7 6 5 4 3 2 1 0 ------ --- --- --- --- --- --- --- --- Byte 1 1 0 P 0 0 0 0 0 ------ --- --- --- --- --- --- --- --- Byte 2 0 0 X11 X10 X9 X8 X7 X6 ------ --- --- --- --- --- --- --- --- Byte 3 0 0 X5 X4 X3 X2 X1 X0 ------ --- --- --- --- --- --- --- --- Byte 4 0 0 Y11 Y10 Y9 Y8 Y7 Y6 ------ --- --- --- --- --- --- --- --- Byte 5 0 0 Y5 Y4 Y3 Y2 Y1 Y0 --------------------------------------- P = Touch Status ( 0 : released, 1: pressed ) X0-X11 = Horizontal coordiante Y0-Y11 = Vertical coordiantes Note : The controller is equipped with a 12 bit Analog Digital Converter (ADC) for providing a resolution of 4096x4096. The coordinates of X and Y are the reading from the ADC converter. The cursor coordinates are handled by the driver with the calibration data. X : 0 -> 4095, Y : 0 ->4095. X=0, Y=0 stands the coordinate of Left-Up corner. (2) Serial Mouse Record : -------------------------------------- Bit # 7 6 5 4 3 2 1 0 ------ --- --- --- --- --- --- --- --- Byte 1 1 1 L R Y7 Y6 X7 X6 ------ --- --- --- --- --- --- --- --- Byte 2 0 0 X5 X4 X3 X2 X1 X0 ------ --- --- --- --- --- --- --- --- Byte 3 0 0 Y5 Y4 Y3 Y2 Y1 Y0 -------------------------------------- L = Left key status ( 0 : released, 1 : pressed ) R = Right key status ( 0 : released, 1 : pressed ) X = X relative movement ( negative for moving left ) Y = Y relative movement ( negative for moving up ) (C) Power Up Detection : (1) Set RTS=0 (Low) (2) Wait at least 55 ms for controller (3) Set RTS=1 (High) (4) Read the controller ID The ID should be '[TS]' ( hex : 5B, 54, 53, 5D ) (D) Control Commands : (1) Set RTS=0 (Low) (2) Wait at least 55 ms for controller (3) Send the command byte listed in the following (4) Read the response byte from the controller ... Repeat step 3 and 4 for more commands (5) Set RTS=1 (High) Function Command Byte Response Byte Remark -------------- -------------- --------------- -------------------- Read model A1h D4h D4 -> TSR4COM Read F/W Ver. A2h Ver. # e.g. 10h -> V1.0 Illegal command ?? EFh