COACh V Application Manual
Transcription
COACh V Application Manual
COACh V Application Manual 1-800-ELOTOUCH (1-800-356-8682) www.elotouch.com COACh V Application Manual SW601575 Revision E Page 1 of 73 Copyright ©2013 Elo Touch Solutions, Inc. All Rights Reserved No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, including, but not limited to, electronic, magnetic, optical, chemical, manual, or otherwise without prior written permission of Elo Touch Solutions. Disclaimer The information in this document is subject to change without notice. Elo Touch Solutions makes no representations or warranties with respect to the contents hereof, and specifically disclaims any implied warranties of merchantability or fitness for a particular purpose. References in this publication to Elo Touch Solutions products or services do not imply that Elo Touch Solutions intends to make them available in all countries in which Elo Touch Solutions operates. Elo Touch Solutions reserves the right to revise this publication and to make changes from time to time in the content hereof without obligation of Elo Touch Solutions to notify any person of such revisions or changes. Trademark Acknowledgments Elo Touch Solutions, COACh, Elo logo, and AccuTouch, are trademarks. Other product names mentioned herein may be trademarks or registered trademarks of their respective companies. Elo Touch Solutions claims no interest in trademarks other than its own. COACh V Application Manual SW601575 Revision E Page 2 of 73 REVISION HISTORY Revision ECO A n/a B ECO-11-007722 C ECO-11-020015 Date n/a 2011-04-20 2011-09-30 D ECO-12-003565 2012-02-22 E ECO-13-0835 2013-11-12 COACh V Application Manual SW601575 Revision E Description Intentionally skipped Initial release Clarified schematic and pinout RS232 net names and schematic symbols. Fixed a few Smartset command errors. Fixed pinout information. Document clarifications only, not a result of any COAChV design change. -Corrected mistake in reference schematic (layout error in RS-232 transceiver U3) -Clarified “Pin Description” and “Pin Function Application Notes” sections -Added note about firmware update capabilities Document clarification only, not a result of any COAChV design change Minor document formatting and branding updates, removed firmware dependency in Scope. Page 3 of 73 Table of contents 1 Introduction......................................................................................................................................................... 8 Purpose................................................................................................................................................................ 8 Scope ................................................................................................................................................................... 8 General ................................................................................................................................................................ 8 Pin Description.................................................................................................................................................. 10 Pin Function Application Notes ........................................................................................................................ 11 VDD1/VDD2/VDD3 Power Supply Pins ..................................................................................................... 11 VDDA Power Supply Pin ............................................................................................................................. 11 VBAT Power Supply Pin .............................................................................................................................. 11 NRST and Reset Circuit................................................................................................................................ 11 Clock Inputs .................................................................................................................................................. 12 RS-232 pins................................................................................................................................................... 12 USB Pins ....................................................................................................................................................... 13 Touchscreen Drive Interface ......................................................................................................................... 13 Touch Detect ................................................................................................................................................. 13 Touchscreen Measurement Inputs ................................................................................................................ 13 LED STATUS pin......................................................................................................................................... 13 Reserved Pins ................................................................................................................................................ 13 Package Dimensions ......................................................................................................................................... 14 Layout Land Patterns ........................................................................................................................................ 15 Soldering ........................................................................................................................................................... 15 2 Electrical Specifications ................................................................................................................................. 16 Absolute Maximum Ratings ............................................................................................................................. 16 General Operating Conditions .......................................................................................................................... 16 DC Electrical Characteristics ............................................................................................................................ 17 AC Characteristics ............................................................................................................................................ 18 Clock source characteristics .............................................................................................................................. 20 NRST pin characteristics .................................................................................................................................. 21 AccuTouch Touchscreen .................................................................................................................................. 21 Interface Signals............................................................................................................................................ 21 Electrical Specifications................................................................................................................................ 21 3 Applications ...................................................................................................................................................... 22 Reference Schematic ......................................................................................................................................... 22 Reference Bill of Materials ............................................................................................................................... 29 4 Functional Operation ..................................................................................................................................... 30 Touchscreen Characteristics ............................................................................................................................. 30 Touchscreen Configuration ........................................................................................................................... 30 Touchscreen Interface Control ...................................................................................................................... 30 Touch Resolution .......................................................................................................................................... 30 Touchscreen Compatibility ........................................................................................................................... 30 Start-up Requirements ...................................................................................................................................... 30 Self-Diagnostic Capability ................................................................................................................................ 30 SmartSet LED ............................................................................................................................................... 31 Diagnostic Self-Tests .................................................................................................................................... 31 Nonvolatile Memory ..................................................................................................................................... 31 5 Communications .............................................................................................................................................. 32 Overview of Serial Communication ................................................................................................................. 32 Flow Control ................................................................................................................................................. 32 COACh V Application Manual SW601575 Revision E Page 4 of 73 Hardware Handshaking ................................................................................................................................. 32 USB Communication Protocol ......................................................................................................................... 33 USB Physical Layer ...................................................................................................................................... 33 USB Electrical Layer .................................................................................................................................... 33 USB Protocol Layer ...................................................................................................................................... 33 USB SmartSet Logical Layer........................................................................................................................ 35 6 SmartSet™ ......................................................................................................................................................... 40 SmartSet™ Protocol ......................................................................................................................................... 40 Command/Response Interchange.................................................................................................................. 40 The SmartSet™ RS-232 Serial Packet ......................................................................................................... 41 Command Format ......................................................................................................................................... 41 Command Function – Set, Query, and Response ......................................................................................... 41 Padding Unassigned Positions ...................................................................................................................... 43 SmartSet™ Command Set ................................................................................................................................ 43 Acknowledge Command - 'a' ........................................................................................................................ 43 Coordinate Calibration Command - 'C', 'c' ................................................................................................... 45 Diagnostics Command - 'D', 'd' ..................................................................................................................... 47 Emulate Command - 'E', 'e' ........................................................................................................................... 48 Filter Command - 'F', 'f' ................................................................................................................................ 50 Configuration - 'g' ......................................................................................................................................... 51 Timer Command - 'H', 'h' .............................................................................................................................. 51 ID Command - 'i' ........................................................................................................................................... 51 Jumpers Command - 'j' .................................................................................................................................. 52 Key Command - 'K', 'k' ................................................................................................................................. 52 Low Power Command - 'L', 'l'....................................................................................................................... 53 Mode Command - 'M', 'm' ............................................................................................................................. 53 Nonvolatile RAM Command - 'N' ................................................................................................................ 55 Owner Command - 'o' ................................................................................................................................... 56 Parameter Command - 'P','p' ......................................................................................................................... 57 Quiet Command - 'Q', 'q' ............................................................................................................................... 58 Reset Command - 'R', 'r' ................................................................................................................................ 58 Coordinate Scaling Command - 'S', 's' .......................................................................................................... 59 Touch Command - 't' ..................................................................................................................................... 61 Upload Command - 'U', 'u' ............................................................................................................................ 62 Subcommands 'W' and 'N' - Set or Query Serial Number ............................................................................ 62 7 Touch Report Formats ................................................................................................................................... 65 SmartSet Binary Format ................................................................................................................................... 65 SmartSet ASCII Format .................................................................................................................................... 66 140 ASCII Format............................................................................................................................................. 67 140 Binary Format ............................................................................................................................................ 68 280 ASCII Format............................................................................................................................................. 68 280 Binary Format ............................................................................................................................................ 69 E281A-4002 ASCII Format .............................................................................................................................. 70 E281A-4002 Binary Format ............................................................................................................................. 70 E271-60 ASCII Format ..................................................................................................................................... 71 Appendix - Calibration and Scaling ................................................................................................................. 72 Calibration and Scaling Calculations ................................................................................................................ 72 Table of Figures Figure 1 Pin Configuration for COACh V.............................................................Error! Bookmark not defined. COACh V Application Manual SW601575 Revision E Page 5 of 73 Figure 2 Resonator ................................................................................................................................................ 12 Figure 3 External clock ......................................................................................................................................... 12 Figure 4 COACh V package style, 48 pin 7 x 7 mm LQFP ................................................................................. 14 Figure 5 Recommended land pattern dimensions for the COACh V ................................................................... 15 Figure 6 Touch packet retry strategy .................................................................................................................... 34 Table of Tables Table 1 Definition of Terms ................................................................................................................................... 9 Table 2 Pin description ......................................................................................................................................... 10 Table 3 7 x 7 mm LQFP, 48-pin low-profile quad flat package mechanical data ............................................... 14 Table 4 Absolute maximum ratings Symbol Ratings Min. Max. Unit ................................................................. 16 Table 5 General operating conditions ................................................................................................................... 16 Table 6 Package thermal characteristics ............................................................................................................... 17 Table 7 I/O static characteristics ........................................................................................................................... 17 Table 8 Recommended I/O AC characteristics ..................................................................................................... 18 Table 9 Timing requirements ................................................................................................................................ 18 Table 10 A/D converter characteristics................................................................................................................. 19 Table 11 RAIN max for fADC = 12 MHz (1) ...................................................................................................... 20 Table 12 High-speed external user clock characteristic ....................................................................................... 20 Table 14 NRST pin characteristics ....................................................................................................................... 21 Table 15 Touchscreen interface DC characteristics.............................................................................................. 21 Table 16 Maximum drive currents ........................................................................................................................ 21 Table 17 Bill of materials ..................................................................................................................................... 29 Table 18 COACh V serial communication signals ............................................................................................... 32 Table 19 Controller touch report data ................................................................................................................... 34 Table 20 Host “send SmartSet command” request data ....................................................................................... 35 Table 21 Host “get SmartSet response” request data............................................................................................ 36 Table 22 Controller “get SmartSet response” reply data ...................................................................................... 36 Table 23 Host “get SmartSet response status” request data ................................................................................. 37 Table 24 Controller “get SmartSet response status” reply data ............................................................................ 37 Table 25 Host “get SmartSet response status wide” request data ......................................................................... 37 Table 26 Controller “get SmartSet response status wide” reply data ................................................................... 38 Table 27 Host “flush SmartSet responses” request data ....................................................................................... 38 Table 28 Host “set SmartSet touch filter” request data ........................................................................................ 38 Table 29 Host “flush SmartSet responses” request data ....................................................................................... 39 Table 30 Host “get SmartSet touch filter” request data ........................................................................................ 39 Table 31 Controller “get SmartSet touch filter” reply data .................................................................................. 39 Table 32 Host “get SmartSet send status” request data ........................................................................................ 40 Table 33 Controller “get SmartSet touch filter” reply data .................................................................................. 40 Table 34 SmartSet error reporting codes .............................................................................................................. 44 Table 35 MaskC bit position ................................................................................................................................. 48 Table 36 TouchFlag formats ................................................................................................................................. 49 Table 37 Configuration 'g' packet order ................................................................................................................ 51 Table 38 Mask1 bit positions ................................................................................................................................ 54 Table 39 Mask2 bit positions ................................................................................................................................ 54 Table 40 X values ................................................................................................................................................. 54 Table 41 Special mode functions .......................................................................................................................... 55 Table 42 Areas byte bit positions.......................................................................................................................... 56 Table 43 Mask1 bit positions ................................................................................................................................ 57 Table 44 Mask1 values ......................................................................................................................................... 57 COACh V Application Manual SW601575 Revision E Page 6 of 73 Table 45 Mask2 bit definitions ............................................................................................................................. 58 Table 46 Mask2 bit positions ................................................................................................................................ 58 Table 47 Mask bit positions .................................................................................................................................. 60 Table 48 Touch response status bitmap ................................................................................................................ 61 Table 49 Touch report status bitmap .................................................................................................................... 65 Table 50 SmartSet ASCII format without touch status ........................................................................................ 66 Table 51 SmartSet ASCII format with touch status.............................................................................................. 67 Table 52 140 ASCII format without touch status ................................................................................................. 67 Table 53 140 ASCII format with touch status ...................................................................................................... 68 Table 54 140 binary packet format ....................................................................................................................... 68 Table 55 280 ASCII without touch status ............................................................................................................. 69 Table 56 280 ASCII with touch status .................................................................................................................. 69 Table 57 280 binary without touch status ............................................................................................................. 69 Table 58 280 binary with touch status .................................................................................................................. 69 Table 59 E281A-4002 ASCII format without touch status .................................................................................. 70 Table 60 E281A-4002 binary format without touch status ................................................................................... 70 Table 61 E271-60 ASCII format without touch status ......................................................................................... 71 Table 62 E271-60 ASCII format with touch status .............................................................................................. 71 COACh V Application Manual SW601575 Revision E Page 7 of 73 1 Introduction Purpose This document is designed to be used by Elo Touch Solutions customers who are using the COACh V AccuTouch controller chip. Scope Specifications in this document apply to the COACh V integrated circuit only. General The Elo Touch Solutions COACh V is a single IC capable of interfacing a five-wire resistive touchscreen. It is capable of automatically detecting the touchscreen configuration as well as the installed communication system. The COACh V can communicate via either an RS232-style serial interface or the Universal Serial Bus (USB) interface. Only one of the two interfaces is permitted to be in use at any given time and detection and implementation is automatic. The communication protocol is RS232 TTL with full handshaking (RTS, CTS) if the serial port is used. RS232 level signals can be achieved by adding RS232 level translators. If using the USB, it configures as a human interface device (HID) and it reports touch data on an interrupt basis. Elo SmartSet command protocol is supported in both communication modes, with the USB mode doing so by placing SmartSet commands and responses in USB vendor-specific device request “wrappers.” The measurement system is a 12-bit ADC touch resolution with a minimum report rate of 13 ms/point. The COACh V can be operated from a supply voltage of 5 volts at up to 60 mA operating current. If configured for USB operation the COACh V is classified as self powered. COACh V Application Manual SW601575 Revision E Page 8 of 73 Table 1 Definition of Terms SmartSet™ USB Frame Field Packet Token Transaction Interrupt transaction Control transfer Control read Control write Suspend Resume COACh V Application Manual SW601575 Revision E An Elo proprietary communication packet protocol generally applied to serial controllers, but also intended for use in other communication formats. Universal Serial Bus is a low- to medium-throughput serial interface specified for use with desktop computers. USB terms A frame is a fixed period of time, one millisecond in duration, demarcated by a “start of frame” packet from the USB host. A field is a timed sequence of data bits. Fields combine to produce packets. Each packet contains a SYNC field, a packet identifier (PID) field and an end of packet (EOP) field. Other fields may also appear in a packet. The basic message unit passed between the USB host and a device is a packet. A token is a control packet issued by the host. A token contains five fields – SYNC, PID, device address, endpoint number and EOP. Tokens are used mainly for traffic management purposes, acting as headers for set-up, data input and data output transactions. A transaction is a sequence of packets passed between the USB host and a device. A transaction comprises a total message exchange. A transaction usually has three phases – a token packet containing control instructions is issued by the host, a data phase containing one or several data packets, and a handshake phase containing an acknowledgement packet. In the data phase, either the host may send to the device or the device may send to the host. In the handshake phase, the direction of data flow changes from that in the data phase. Touch reports are communicated to the host as “interrupt transactions”, which are really periodically polled by the host. A control transfer is the procedure that performs a configuration or set-up command between the host and a device. The host may either request data from the device, or it may send configuration commands to the device. A control transfer comprises either two or three transactions. In a control read, the host obtains configuration data from the device. There are three transactions in this kind of control transfer – one setup transaction, one or more input data transactions and one output data transaction. In a control write, the host sends configuration data to the device. A control write is used when the host must send more data than can be carried in a set-up packet. There are three transactions in this kind of control transfer – one setup transaction, one or more output data transactions and one input data transaction. In the suspend state, USB devices go into a low power shut down mode of operation. Devices sense the absence of periodic frame marker packets sent by the host. After three milliseconds, devices begin to shut down. After ten milliseconds, all devices are shut down. Resume marks the end of the suspend state. All devices on the bus exit their low-power shut down modes, and operate normally. Page 9 of 73 Pin Description Table 2 Pin description Pin Number 24 36 48 1 9 39 23 35 47 8 44 2 5 6 30 31 32 33 7 34 37 45 46 40 41 42 43 10 11 12 13 29 14 15 16 17 18 19 20 21 22 25 26 3 4 27 28 38 Type P P P P P O P P P P I I/O I/O I/O I P I/O I/O I/O I/O I/O I/O I/O I O O I I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O COACh V Application Manual SW601575 Revision E Name/Function VDD1 VDD2 VDD3 VBAT VDDA LED STATUS VSS1 VSS2 VSS3 VSSA BOOT0 TAMPER-RTC OSC_IN OSC_OUT USBVIN TRON USB_DUSB_D+ NRST NC NC NC NC CTS RTS TXD RXD X_DrvL X_DrvH S_DrvL S_DrvH TOUCH DETECT L_DrvL A/D_H A/D_L A/D_S A/D_X A/D_Y L_DrvH Y_DrvL Y_DrvH H_DrvL H_DrvH NC NC NC NC NC Page 10 of 73 Pin Function Application Notes VDD1/VDD2/VDD3 Power Supply Pins These pins should have a high-frequency bypass capacitor connected between the supply voltage and ground. This bypass capacitor should be physically located as near as possible to the pin. A ceramic capacitor of 10.0 uF is recommended. VDDA Power Supply Pin VDDA and VSSA are the reference voltage input and ground for the USB block, the internal 12-bit analog-todigital converter, and other analog functions inside the chip. They should be connected respectively to +3.3V and ground. This pin should have a high-frequency bypass capacitor connected between the supply voltage and ground. This bypass capacitor should be physically located as near as possible to the pin. A ceramic capacitor of 10.0 uF is recommended. VBAT Power Supply Pin VBAT is the power supply voltage input for the RTC, external clock 32kHz oscillator and backup register (through power switch) when VDD1/VDD2/VDD3 are not present. BOOT0 Pin The BOOT0 pin should be tied directly to ground. TAMPER-RTC Pin This pin should be connected to ground through a 10K resistor. NRST and Reset Circuit The NRST pin’s input driver uses CMOS technology, and is internally connected to a 40 kOhm pullup resistor. NRST controls the chip’s integrated power on reset (POR)/power down reset (PDR) circuitry. It is always active, and ensures proper operation starting from/down to 2V. The COACh V remains in reset mode when the external voltage; +3.3V, is below a specified threshold, VPOR/PDR, without the need for an external reset circuit. The VPOR/PDR threshold is 2.0V. COACh V Application Manual SW601575 Revision E Page 11 of 73 Clock Inputs OSC_IN and OSC_OUT pins are used for clock input. The input clock frequency for the COACh V is 8.000 MHz. An oscillation circuit can be formed by connecting a resonator or crystal between OSC_IN and OSC_OUT. Circuit components should be used in accordance with the resonator or crystal manufacturer’s recommended values for load capacitor C12 and C13 in shown in Figure 2. The value of R18 shown in figure 2 is in range of 5 to 6Rs . Rs is the equivalent serial resistance of the crystal. The crystal/resonator and load capacitors should be placed as close to the OSC_IN and OSC_OUT pins as possible. Figure 1 Resonator An external clock can be used to drive the system clock by directly connecting to the OSC_IN input pin and leaving the OSC_OUT pin unconnected (floating). Figure 2 External clock RS-232 pins RxD, TxD, RTS, and CTS comprise the serial communication interface at 3.3V levels. These signals should be passed through an RS-232 transceiver to translate the signals to appropriate reference levels. Maxim’s MAX3223 or MAX3232E are used on the provided reference schematic. See the section “Overview of Serial Communcation” for more detailed description of the serial interface. COACh V Application Manual SW601575 Revision E Page 12 of 73 USB Pins USBVIN is an input designed to detect the presence of a connected USB cable. It is recommended to use a resistor divider to create 3.3V from VBUS, and connect this +3.3V signal to USBVIN. USB D0- and USB D0+ are the USB differential data lines. The USB pins are required serial resistor of 22 Ohm between the USB pins and the USB connector. To be compliant with the USB 2.0 full-speed electrical specification, the USBDP (D+) pin should be pulled up with a 1.5kOhm resistor to +3.3V. The voltage source on the pull-up resistor must be derived from or controlled by the power supplied on the USB cable, such that when VBUS is removed, the pull-up resistor does not supply current on the data line to which it is attached. The TRON output pin provides this voltage source. Special attention should be paid to the layout of the USB traces to comply with USB specification. If USB communication will not be used, it is recommended to pull down the USBVIN, D+, and D- lines to ground with 10K resistors, and to leave the TRON pin floating. Touchscreen Drive Interface Ten output pins control an external touchscreen drive interface circuit. These are the H_DrvL, H_DrvH, X_DrvL, X_DrvH, S_DrvL, S_DrvH, L_DrvL, L_DrvH, Y_DrvL, and Y_DrvH pins. Refer to DIGITAL IO page of Reference schematic for touch screen drive interface circuit.. TOUCH DETECT Pin The TOUCH DECTECT pin is an active low input that detects a valid touch. Connect this as shown in DIGITAL IO page of Reference schematic for touchscreen touch detect circuit. Touchscreen Measurement Inputs A/D_H, A/D_L, A/D_S, A/D_X, and A/D_Y are the five input pins are used for touch measurements. Refer to DIGITAL IO page of Reference Schematic for touchscreen measurement input circuit. LED STATUS pin An open-drain output capable of sinking 10mA to provide a diagnostic indicator. The indicator can be visual by connecting an LED (with current-limiting resistor of appropriate value) between LED STATUS and a power supply. The indicators are described in the “SmartSet LED” section. Reserved Pins All pins pin 3, 4, 27,28,38, 34, 37, 45, and 46 noted as reserved are used for internal operation or for future expansion and should be unconnected (floating). COACh V Application Manual SW601575 Revision E Page 13 of 73 Package Dimensions Figure 3 COACh V package style, 48 pin 7 x 7 mm LQFP Table 3 7 x 7 mm LQFP, 48-pin low-profile quad flat package mechanical data COACh V Application Manual SW601575 Revision E Page 14 of 73 Layout Land Patterns See Figure 4 Recommended land pattern dimensions for the COACh V below for the recommended land pattern dimensions for mounting the COACh V to a printed circuit board. Figure 4 Recommended land pattern dimensions for the COACh V Soldering Lead-free soldering generally requires higher reflow temperature. The COACh V packaging is able to withstand 260°C reflow temperatures required for Sn-Ag-Cu or similar high-melting point lead-free solder. The heat-resistant solder reflow profile for COACh V follows JEDEC standard J-STD-020. The moisture sensitivity level per J-STD-020 is 3. COACh V Application Manual SW601575 Revision E Page 15 of 73 2 Electrical Specifications The following tables list the operating characteristics and requirements of the COACh V. Absolute Maximum Ratings Table 4 Absolute maximum ratings Symbol Ratings Min. Max. Unit General Operating Conditions Table 5 General operating conditions 1. When the ADC is used, refer to Table 10 A/D converter characteristics. 2. It is recommended to power VDD and VDDA from the same source. A maximum difference of 300mV between VDD and VDDA can be tolerated during power-up and operation. 3. If TA is lower, higher PD values are allowed as long as TJ does not exceed TJmax (see Table 6 Package thermal characteristics) COACh V Application Manual SW601575 Revision E Page 16 of 73 Table 6 Package thermal characteristics DC Electrical Characteristics In Table 7 below, the temperature range for the electrical specifications is -20 to 85°C, unless otherwise noted. Table 7 I/O static characteristics COACh V Application Manual SW601575 Revision E Page 17 of 73 AC Characteristics Table 8 Recommended I/O AC characteristics Table 9 Timing requirements COACh V Application Manual SW601575 Revision E Page 18 of 73 Table 10 A/D converter characteristics 1. Guaranteed by design, not tested in production. 2. VREF+ is internally connected to VDDA and VREF is internally connected to VSSA. 3. For external triggers, a delay of 1/fPCLK2 must be added to the latency specified in Table 10. 4. The maximum external impedance is calculated from the formula below: Where N = 12 (12 bits resolution). COACh V Application Manual SW601575 Revision E Page 19 of 73 Table 11 RAIN max for fADC = 12 MHz (1) 1. Data guaranteed by design, not tested in production. Clock source characteristics Using a crystal/ceramic resonator: Using an external user-provided clock: Table 12 High-speed external user clock characteristic COACh V Application Manual SW601575 Revision E Page 20 of 73 NRST pin characteristics The NRST pin input driver used CMOS technology. It is connected to a permanent pull-up resistor, RPU Table 13 NRST pin characteristics AccuTouch Touchscreen Interface Signals The touchscreen interface signals are designed to drive a transistor stage to provide sufficient current to drive the touchscreen. Table 14 Touchscreen interface DC characteristics SYMBOL PARAMETER VTDH VTDL ITDH ITDL tTDr , tTDf CONDITION Touchscreen interface ITDH = 1 mA drive voltage high Touchscreen interface ITDH = 3 mA drive voltage low Touchscreen interface source current Touchscreen interface sink current MIN TYP MAX 0.7 VDD UNIT V 0.3 0.5 V 1 mA 3 mA Touchscreen interface ∆VO = 0.6V drive rise/fall time to 3V 100 Ns Electrical Specifications below shows the maximum drive currents assuming X:Y = 4:3 resistance. Table 15 Maximum drive currents Type X Axis maximum drive current Y Axis maximum drive current COACh V Application Manual SW601575 Revision E Current 250 mA 250 mA Drive 5 Volts 5 Volts Page 21 of 73 3 Applications Reference Schematic COACh V Application Manual SW601575 Revision E Page 22 of 73 COACh V Application Manual SW601575 Revision E Page 23 of 73 COACh V Application Manual SW601575 Revision E Page 24 of 73 COACh V Application Manual SW601575 Revision E Page 25 of 73 COACh V Application Manual SW601575 Revision E Page 26 of 73 COACh V Application Manual SW601575 Revision E Page 27 of 73 COACh V Application Manual SW601575 Revision E Page 28 of 73 Bill of Materials for Reference Schematic Table 16 Bill of materials COACh V Application Manual SW601575 Revision E Page 29 of 73 4 Functional Operation Touchscreen Characteristics Touchscreen Configuration The COACh V is capable of automatically detecting then interfacing to a five-wire touchscreen. Detection and operation are transparent to the end user. The detection algorithm occurs during initialization and changing the screen type after power on requires a hard reset to reconfigure the controller. Touchscreen Interface Control Touchscreen interface signals drive a transistor stage, which in turn directly drives the touchscreen substrate and/or coversheet. There are three phases of touchscreen drive configuration, touch_detect, measure_X, and measure_Y. Touch Resolution The measurement system is a 12-bit ADC, which provide the coordinate range of {0,..,4095} for both X and Y axes. Touchscreen Compatibility The COACh V along with the appropriate drive circuit provides a touch measurement interface when connected to a five-wire touchscreen. Compatible five-wire touchscreens meet the signal specification in Table 14 Touchscreen interface DC characteristics. Start-up Requirements Following power on, the following events occur. • Vcc begins to rise from 0 to its final value of 3.3 Volts. • COACh V remains in reset until Vcc exceeds 2.18V (typical) • The micro controller firmware program begins to execute. • The internal operating system is initialized. • The USB communication hardware and firmware is initialized. • The touch measurement subsystem is initialized. The COACh V complies with reset and start-up timing requirements described in the USB rev 2.0 specifications. Self-Diagnostic Capability The COACh V can run diagnostic self-tests including verification of the touchscreen interface. Operation of available self-tests are described here. COACh V Application Manual SW601575 Revision E Page 30 of 73 SmartSet LED The LED output pin can control an LED to indicate the controller’s status. Its function is as follows: • At power on, the LED is not lit. • Upon completion of firmware initialization, the LED blinks at a rate of once per second. • Thereafter, when a touch is detected, the LED lights continuously. • When no touch is detected, the controller LED resumes blinking at a rate of once per second. • If an error condition is detected, the LED blinks at a rate of twice per second. The error code associated with the error condition can be read by a SmartSet command. When the error code is read, the error condition is cleared and the LED resumes blinking at a rate of once per second. Diagnostic Self-Tests The micro controller drives the touchscreen drivers in a specific sequence to detect the X/Y channels’ voltage levels and determine valid touchscreen connections. Nonvolatile Memory All variable parameters are stored in nonvolatile memory (NVRAM). The content of nonvolatile memory is protected by redundant storage of data and by error detection encoding. If NVRAM content is found to be corrupted during firmware initialization, then the operation of the controller is based on standard defaults stored in program ROM. An error condition is asserted. The NVRAM is not automatically re-programmed. NVRAM can be reprogrammed by issuing the appropriate SmartSet command. Firmware Updates COAChV firmware can be updated over the USB interface. It cannot be updated over the serial interface. Contact TE Connectivity Touch Solutions application engineer for details. COACh V Application Manual SW601575 Revision E Page 31 of 73 5 Communications Overview of Serial Communication The serial communication link used by the COACh V supports a subset of EIA RS-232. Voltage levels are TTL compatible and can be converted to RS-232 levels by adding the appropriate level translators. The controller supports a character frame of 8 bits data, 1 stop bit, and no parity. Serial signals supported by the COACh V include handshake signals and are given in Table 18. The controller supports hardware handshaking. The controller stops transmitting when CTS (RTS from the host side) is asserted by the host. When the controller’s receive buffer is full, it asserts the RTS (CTS from the host side) signal to halt the host. Table 17 COACh V serial communication signals Signal Name I/O RXD TXD RTS CTS in out out in Signal Function serial data from host to controller serial data from controller to host host may send, active low controller may send, active low Flow Control The term “flow control” is used to describe the rules that determine when it is appropriate for commands or responses to be sent across the serial data lines. Flow control is a multi layered protocol that includes hardware handshaking, and rules of conduct for both the controller and the host. Hardware Handshaking The COACh V recognizes hardware handshake signals typically implemented in EIA RS-232 communications. In this type of flow control, the host receives data generated by the controller until the host’s available resources (buffer space or processing time) limit the flow. At this point the host can turn off the flow of data from the controller by asserting the RTS handshake signal. For PC applications, typically a circuit is employed DTR or RTS from the host and connects this output to the CTS of the COACh V. When the controller receives a valid command, it asserts the handshaking signal CTS. This allows a host conforming to the EIA RS-232 to properly suppress further output. When the command has been processed, the controller negates this handshaking signal. Hardware flow control is required for firmware Rev 2.1, so pin 40 (CTS) and pin 41 (RTS) should be associated with the UART controller of the host. 3-wire communication (RXD, TXD, and CTS) is not supported COACh V Application Manual SW601575 Revision E Page 32 of 73 USB Communication Protocol The USB is a cable bus that supports data exchange between a host computer and a wide range of simultaneously accessible peripherals. The attached peripherals share USB bandwidth through a host-scheduled, token-based protocol. The bus allows peripherals to be attached, configured, used, and detached while the host and other peripherals are in operation. The COACh V is an interrupt-type, full-speed USB function device capable of establishing a connection and communicating according to the requirements in Chapter 9 of the USB specification version 2.0. USB Physical Layer The USB connector on the CTR-221800-AT-RSU provides termination for the VBUS and I/O signals. The PC board connector may be cabled in either of two ways to connect to the USB system. • • An interim cable can be constructed that terminates in a USB Series “B” receptacle at the touchmonitor bulkhead. This configuration supports an interface with a detachable external USB cable. A captive USB cable terminating in a Series “A” plug can be plugged into the PC board connector. USB Electrical Layer The USB interface is composed of four signals: • D+ the non-inverted sense of the differential data signal • D- the inverted sense of the differential data signal • VBUS the nominal 5-volt supply to bus-powered devices • GND return for the 5-volt supply and system common For a full-speed device such as the COACh V, the D+ signal must have a 1.5 kilohm +/-5% pull up resistor connected to 3.3 volts with respect to the USB ground. The voltage source on the pull-up resistor must be derived from or controlled by the power supplied on the USB cable, such that when VBUS is removed, the pull-up resistor does not supply current on the data line to which it is attached. The TRON output pin provides this voltage source. USB Protocol Layer The USB protocol specifies the kinds of messages that can be transferred between the host and devices on the bus. The COACh V supports a subset of the protocol sufficient for the controller to configure and operate on the USB. This section describes the vendor specific message types and transactions that the COACh V supports. Touch Report Format The controller is configured as an “interrupt” transfer, input-only function. In this mode of operation, the host periodically sends an IN packet to controller endpoint 1. • If no touch data is available, then the controller handshakes with a NAK packet. • If touch data is available, then the controller sends a properly-sequenced DATA0 or DATA1 packet containing the data structure shown in the table below. The host acknowledges successful receipt of the touch data by sending and ACK packet to the controller. If any packet in the IN/DATAx/ACK sequence or IN/NAK sequence contains detectable errors, the controller tries to re-send the same data when it receives another IN packet COACh V Application Manual SW601575 Revision E Page 33 of 73 from the host. The following state diagram describes the scenarios for error handling. Table 18 Controller touch report data Content Header byte touch status byte Value ‘T’ varies X Y Z Comments status.b7 = 1 if Z is a measured value = 0 if Z is disabled status.b6,…,b5 = 0 always, reserved status.b4 = 1 if warning message is pending = 0 if no warning status.b3 = 0 always, reserved status.b2 = 1 if coordinate value is untouch = 0 if coordinate is initial or stream touch status.b1 = 1 if coordinate value is initial touch = 0 if coordinate is stream or untouch status.b0 = 1 if coordinate value is stream touch = 0 if coordinate is initial or untouch word length value between 0000h and 1000h word length value between 0000h and 1000h word length value between 0000h and 0100h token arrives corrupted idle IN token from host STALL sent respond to IN NAK sent data available & sequence bit = 0 data available & sequence bit = 1 device error ACK from host, toggle sequence bit, no ACK clear data available stalled response no data available no data response data1 response data0 response DATA1 sent DATA0 sent wait for ACK Figure 5 Touch packet retry strategy COACh V Application Manual SW601575 Revision E Page 34 of 73 USB SmartSet Logical Layer Elo’s proprietary SmartSet protocol is supported by the COACh V controller. A subset of the full command set is supported as specified in this section. SmartSet commands are exchanged between the host and controller by enclosing the 8-byte SmartSet packets in USB vendor-specific device requests. The device requests provide all necessary functions for the host to send commands, receive single-packet or multiple-packet responses, terminate multiple-packet responses, and control whether or not touch packets can be interspersed with response packets. The basic message unit passed between the host and the COACh V is a “command.” A command is 8 bytes long. Content of the command depends on a token contained in the first byte, which determines the context for interpreting the remaining 7 bytes. Most SmartSet commands retain the same format regardless of the communication link between host and controller. When a SmartSet command is sent across the USB, it is enclosed in a vendor-specific device request. The device request serves as a wrapper for the command. The vendor-specific device requests require that both the host and the device agree on the vendor’s identity. So, the device descriptor must have been successfully received by the host prior to any vendor-specific request. If the controller receives a vendor-specific device request before it sends its device descriptor, then the controller issues a STALL handshake. The controller does not disable USB communication following the STALL. SEND_SMARTSET_COMMAND Elo-specific Device Request If the SEND_SMARTSET_COMMAND request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. Table 19 Host “send SmartSet command” request data Content Value Comments ( DATA0 following SETUP PID ) device request type 40h SEND_SMARTSET_COMMAND code unused word unused word (index) Length 05h 0000h 0000h 0008h vendor-specific, device level function, host-to-device transfer direction - length of data packet following ( DATA1 following OUT PID ) SmartSet command id – byte[0] SmartSet byte [1] SmartSet byte [2] SmartSet byte [3] SmartSet byte [4] SmartSet byte [5] SmartSet byte [6] SmartSet byte [7] - GET_SMARTSET_RESPONSE Elo-specific Device Request If the GET_SMARTSET_RESPONSE request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with COACh V Application Manual SW601575 Revision E Page 35 of 73 a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. Some SmartSet commands elicit more than one 8-byte response from the controller. The COACh V supports multiple-packet responses in two different modes. Backward-compatible segmented response mode mimics the operation of the Elo 2600 and 2601 USB/serial translator boards. In this mode, the host requests the device to respond with data that has a length of 8 bytes. The COACh V sends exactly one SmartSet response to fulfill this request. The host can determine whether additional SmartSet responses await transmission by using the Elo-specific device request Get SmartSet Response Status. The host can elect to terminate a sequence of SmartSet responses by sending the Elo-specific device request Flush SmartSet Responses. Table 20 Host “get SmartSet response” request data Content device request type Value C0h GET_SMARTSET_RESPONSE code unused word unused word (index) Length 06h 0000h 0000h varies Comments vendor-specific, device level function, deviceto-host transfer direction maximum length data packet to respond with Table 21 Controller “get SmartSet response” reply data Content SmartSet command id – byte[0] SmartSet byte [1] SmartSet byte [2] SmartSet byte [3] SmartSet byte [4] SmartSet byte [5] SmartSet byte [6] SmartSet byte [7] Value Comments - ( Additional SmartSet responses may follow. ) In continuous response mode the host requests the controller to send all its SmartSet responses in a contiguous block. If, for example, the host anticipates the controller’s reply to a SmartSet command contains two 8-byte responses, the host can specify a length of 16. The COACh V sends one block of data comprising both of the 8byte SmartSet response packets. To receive a continuous response, the host must specify correctly the sum of bytes in all response packets in the device request length parameter. If the length parameter specified by the host in the device request is greater than the maximum data length supported by the controller, then the controller sends multiple DATAx packets, each of the maximum size. If the host specifies a length that is greater than the controller’s total response, then the controller sends its response. If length is an integer multiple of the controller’s maximum data length, then the controller signals the end of the response by sending a zero-length DATAx packet. If length is not a multiple of the controller’s maximum data length, then the transmission ends with a partial DATAx packet. This partial DATAx packet signals the end of the response. COACh V Application Manual SW601575 Revision E Page 36 of 73 If the host specifies a length less than the controller’s total response, then the controller transmits the number of bytes specified by the host. The controller then waits for another Get SmartSet Response device request to complete the data transfer. While it is in this state, the controller does not accept another Send SmartSet Command from the host. It honors other Elo-specific device requests. If the controller receives a Get SmartSet Response device request, but it has not previously received a corresponding Send SmartSet Command device request, then it replies with a null packet. This is an 8-byte data packet containing all zeros. GET_SMARTSET_RESPONSE_STATUS Elo-specific Device Request If the GET_SMARTSET_RESPONSE_STATUS request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. Table 22 Host “get SmartSet response status” request data Content device request type Value C0h GET_SMARTSET_RESPON SE_STATUS code unused word unused word (index) length 01h Comments vendor-specific, device level function, device-to-host transfer direction - 0000h 0000h 0001h controller responds with 1 byte If the controller has more than 255 SmartSet responses waiting, then the controller reply is 255. The count value saturates rather than “wrapping.” GET_SMARTSET_RESPONSE_STATUSW Elo-specific Device Request If the GET_SMARTSET_RESPONSE_STATUSW request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. FLUSH_SMARTSET_RESPONSES Elo-specific Device Request Table 23 Controller “get SmartSet response status” reply data Content Value 00h to 0FFh Count Comments Number of SmartSet response packets waiting to be sent Table 24 Host “get SmartSet response status wide” request data Content device request type Value C0h GET_SMARTSET_RESPONSE _STATUSW code unused word 07h Comments vendor-specific, device level function, device-tohost transfer direction - 0000h - COACh V Application Manual SW601575 Revision E Page 37 of 73 Content unused word (index) length Value 0000h 0002h Comments controller responds with 2 bytes Table 25 Controller “get SmartSet response status wide” reply data Content Count Value 0000h to 0FFFFh Comments Number of SmartSet response packets waiting to be sent Table 26 Host “flush SmartSet responses” request data Content device request type Value 02h Comments vendor-specific, device level function, host-to-device transfer direction - 0000h 0000h 0000h no data phase in this command 40h FLUSH_SMARTSE T_RESPONSES code unused word unused word (index) length If the FLUSH_SMARTSET_RESPONSES request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. When it receives this device request, the controller terminates transmission of any pending SmartSet responses. The count value returned in response to the Get SmartSet Response Status device request is reset to zero. Further processing of the pending SmartSet command is abandoned. SET_SMARTSET_TOUCH_FILTER Elo-specific Device Request If the SET_SMARTSET_TOUCH_FILTER request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. Table 27 Host “set SmartSet touch filter” request data Content Value Comments ( DATA0 following SETUP PID ) device request type 40h SET_SMARTSET_TO UCH_FILTER code Touch packet enable 03h unused byte unused word (index) length 0000h 0000h 0000h COACh V Application Manual SW601575 Revision E 00h or 01h vendor-specific, device level function, host-to-device transfer direction bit mapped byte bit 0 = 1 to enable touch coordinate reporting during SmartSet command processing = 0 to disable touch coordinate reporting during SmartSet command processing. no data packet Page 38 of 73 Table 28 Host “flush SmartSet responses” request data Content device request type Value C0h GET_SMARTSET_TO UCH_FILTER code unused word unused word (index) length 04h Comments vendor-specific, device level function, device-to-host transfer direction - 0000h 0000h 0001h the controller responds with one byte of data The Set SmartSet Touch Filter device request is used to enable or disable reporting of touches on endpoint 1 while SmartSet commands are being processed on endpoint 0. The default value for this parameter is zero. When a SmartSet command is received, the controller does not measure touches until command processing is complete. GET_SMARTSET_TOUCH_FILTER Elo-specific Device Request If the GET_SMARTSET_TOUCH_FILTER request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. The Get SmartSet Touch Filter device request allows the host to determine whether controller reporting touches on endpoint 1 while SmartSet commands are being processed on endpoint 0. Because the COACh V does not support SmartSet command processing while a touch is active, GET_SMARTSET_TOUCH_FILTER always returns a value of zero. GET_SMARTSET_SEND_STATUS Elo-specific device request Table 29 Host “get SmartSet touch filter” request data Content device request type Value C0h GET_SMARTSET_TO UCH_FILTER code unused word unused word (index) length 04h Comments vendor-specific, device level function, device-to-host transfer direction - 0000h 0000h 0001h the controller responds with one byte of data Table 30 Controller “get SmartSet touch filter” reply data Content Touch packet enable COACh V Application Manual SW601575 Revision E Value 00h or 01h Comments bit mapped byte bit 0 = 1 to enable touch coordinate reporting during SmartSet command processing = 0 to disable touch coordinate reporting during SmartSet command processing. Page 39 of 73 Table 31 Host “get SmartSet send status” request data Content device request type Value C0h GET_SMARTSET_SEND_ STATUS code Unused word Unused word (index) Length 00h Comments vendor-specific, device level function, device-to-host transfer direction - 0000h 0000h 0001h the controller responds with one byte of data If the GET_SMARTSET_SEND_STATUS request is received before a Get Device Descriptor response is successfully sent to the host, then the controller handshakes with a STALL to indicate a request error. Otherwise, the controller handshakes with an ACK packet. The Get SmartSet Send Status device request is supported to guarantee backward compatibility with earlier USB interfaces. This device request has no function in the COACh V. The controller accepts the command, and it returns a fixed reply. Table 32 Controller “get SmartSet touch filter” reply data Content constant 6 Value 00h Comments - SmartSet™ SmartSet™ Protocol Command/Response Interchange Every time the controller receives a command from the host, it performs the action needed to process the command and then sends a generic acknowledge response packet back to the host. The host must wait for the acknowledgment packet from the controller before sending another command. The acknowledgment packet not only indicates completion of command processing. It also reports any errors or warnings that occur during command processing. COACh V does not return an acknowledgment to the host for receiving a “HARD” RESET” ('R0') command. This command returns the controller to its power on state. The controller’s outgoing handshake signal RTS is a valid indicator that the command has completed. COACh V Application Manual SW601575 Revision E Page 40 of 73 The SmartSet™ RS-232 Serial Packet The structure of the standard RS-232 serial communication packet is: <Lead-In><Eight-byte SmartSet Command or Response><Checksum> The total length for this packet is 10 bytes. The components of the packet are described in the following paragraphs. The "Lead-In" is a character which is used to signal the start of a packet. For the standard serial packet, the lead-in is the ASCII character 'U' (55h). This value was chosen due to its distinct alternating bit pattern. The command or response format is described below in Command Format The trailing checksum byte is a value which may be used to check the validity of the communication. It is calculated as follows: Checksum = AAh + Lead-In + 8 Data Bytes, where the addition retains only the least significant byte of the sum. The SmartSet mode binary response packet format always contains this calculated checksum value. Other response formats do not. The host is generally not required to send a properly calculated value (although a dummy value is required to provide the correct packet length). Command Format The structure for a SmartSet command consists of an array of 8 bytes. The structure is defined as: <Command Byte><7-Byte Command Body> where “Command Byte” is a byte chosen to have a value equivalent to a printable ASCII character code. The “Command Body” is a sequence of 7 bytes whose context is determined by the command byte. The syntax of each command and response type is given in section “SmartSet™ Command Set” on page 43. Command syntax is shown in this manual by diagrams called “command frames.” Here is an example: Function: The numbers on the top line of the diagram identify the byte order of the 8-byte sequence. The sequence is shown in time order from left to right. The “command byte” is byte 0 and bytes 1 through 7 make up the “command body.” The word “Function” is replaced by one or more of “Set,” “Query,” or “Response” to indicate the function being depicted. The chambers inside the diagram are labeled with descriptions of the command parameters. An empty chamber indicates that no parameter is assigned to the corresponding byte, and the position is reserved. Unassigned byte positions should be filled with the value 00H, an ASCII 'NUL'. Command Function – Set, Query, and Response When the host sends a command to the controller, it is doing one of two things. Either the host is asking for information that is stored in the controller, or the host is instructing the controller to perform some action. In many cases, these two operations could relate to the same controller characteristic. For example, the host asks, “What is your mode?” or the host tells, “Set your mode to this.” Most SmartSet commands are formatted so that the asking or telling operation is clarified by the command byte. (Those that aren’t formatted this way either can’t be asked or can’t be told.) When the host is asking for controller data, the command byte it sends is in the form of an ASCII lower case letter between 'a' and 'u'. A command of this kind is called a “query” in the protocol documentation. When the host is telling the controller to perform an action, the command byte it sends is in the form of an ASCII upper case letter between 'A' and 'U'. A command of this kind is called a “set” in the protocol documentation. COACh V Application Manual SW601575 Revision E Page 41 of 73 For example, the Report Control Command ('B') is used to set various report control parameters while its query equivalent ('b') simply asks how these parameters are currently set up. When the controller sends a SmartSet command to the host, it uses the “response” format. A response begins with an upper case command byte, the same as a set command. This makes it possible for controllers and host drivers to communicate with a considerable degree of forward and backward compatibility. To maintain compatibility with various revision levels of firmware, a host should query the current settings of the controller parameters. The response it receives is formatted the same as the corresponding set command for those parameters. The host should change only the values that it understands within the response and send the modified response back to the controller. This way, the host does not make assumptions about unrecognized parameters. THIS TECHNIQUE GUARANTEES UPWARD AND DOWNWARD COMPATIBILITY BETWEEN THE HOST AND CONTROLLER. Here is an example of how the Report Control Command might be used. The generic description of the command is: Query: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ‘B’ B1 B2 0 1 2 3 4 5 6 7 ‘B’ B1 B2 ‘b’ Response: Set: The format of the response is the same as that of the set command. To get information about the controller’s setup, the host issues the ‘b’ query command. Query: COACh V Application Manual SW601575 Revision E 0 1 2 3 4 5 6 7 ‘b’ 00h 00h 00h 00h 00h 00h 00h Page 42 of 73 The controller sends back a response with valid parameters filled in. Response: 0 1 2 3 4 5 6 7 ‘B’ 02h 02h 00h 00h 00h 00h 00h The host edits the received string of data to change the parameter in byte 1 to 07h. The host sends the command. Set: 0 1 2 3 4 5 6 7 ‘B’ 07h 02h 00h 00h 00h 00h 00h The host driver did not need to interpret the values in bytes 2 through 7. By sending the same values back, the host has not altered any controller operating characteristics except the intended one. Padding Unassigned Positions Unused positions in the command packets are filled with ASCII 'NUL' characters (= 00H). These areas are used as positions for future expansion and should be considered by a host program to be reserved. The host should not REQUIRE these to be 00H but should treat them as “don’t cares.” Similarly, in the definitions given in the command set, only the data given is required and the remainder of the 8-byte packet should be padded with 00H characters to provide for compatibility with future enhancements to the command set. This technique of padding unassigned positions with 00H is recommended as an alternate only when it is not possible to follow the technique described in section “Command Function – Set, Query, and Response”. The preferred practice is to query the current controller settings, modify only those applicable to the situation, and send the modified response packet back to the controller. SmartSet™ Command Set The format of each command in the command set is shown here. The first line consists of the command name followed by the appropriate command bytes. Next, a list of the host-to-controller command formats is given. A list of the valid controller-to-host packets follows that. The command frame notation described in section “Command Format” on page 41 is used here. The format finishes up with a description of any characteristics that are unique to the command. Acknowledge Command - 'a' Query: 0 1 2 3 4 5 6 7 ‘a’ Set: This command may not be set. COACh V Application Manual SW601575 Revision E Page 43 of 73 Response: 0 1 2 3 4 ‘A’ X X X X 5 6 7 Where: Each X denotes the location for any returned error or warning codes. The acknowledge query allows the host to receive any warnings or error messages that the controller might have pending. An acknowledge response is sent to the host following any valid transaction with the controller (with the exception of the “hard” Reset command). The acknowledge response contains up to four error codes. A table of the error and warning codes is shown below. Table 33 SmartSet error reporting codes ERROR VALUE MEANING ‘0’ (30H) ‘1’ (31H) ‘2’ (32H) ‘3’ (33H) ‘4’ (34H) ‘5’ (35H) ‘6’ (36H) ‘7’ (37H) ‘8’ (38H) ‘9’ (39H) ‘:’ (3aH) ‘;’ (3bH) ‘<’ (3cH) ‘=’ (3dH) ‘>’ (3eH) ‘?’ (3fH) ‘@’ (40H) ‘A’ (41H) ‘B’ (42H) ‘C’ (43H) ‘D’ (44H) ‘E’ (45H) ‘F’ (46H) ‘G’ (47H) ‘H’ (48H) ‘I’ (49H) ‘J’ (4aH) ‘K’ (4bH) ‘L’ (4cH) ‘M’ (4dH) No Warning Divide by Zero Bad Input Packet Bad Input CRC Input Packet Overrun Illegal Command Calibration Command Canceled Reserved (contact Elo Touch Solutions) Bad Setup Combination EEPROM not valid - initializing reserved reserved reserved reserved reserved reserved reserved No Set Available for this command Unsupported in the Firmware Version Illegal Subcommand Operand Out of Range Invalid Type Fatal Error Condition Exists No Query Available for this command reserved EEPROM failure reserved Power on self test failure Operation failed Measurement warning COACh V Application Manual SW601575 Revision E Page 44 of 73 ERROR VALUE MEANING ‘N’ (4eH) Measurement error Report Control Command - 'B', 'b' Query: 0 1 2 3 4 5 6 7 ‘b’ Set: 0 1 2 3 ‘B’ Untouch RepDelay 4 5 6 7 6 7 Response: 0 1 2 ‘B’ Untouch RepDelay 3 4 5 Where: Untouch is a byte value in the range of 0-255. The untouch timer byte specifies the number of 10ms time increments to use for timing a valid untouch condition. The default value for Untouch is 3. RepDelay is a byte value in the range of 0-255. The report delay value specifies the number of 10ms time increments to wait between coordinate reports. This is used to slow the output rate of the controller without changing other interface characteristics. The default value for RepDelay is 1. Coordinate Calibration Command - 'C', 'c' Query: (SwapFlag) COACh V Application Manual SW601575 Revision E 0 1 'c' 'S' 2 3 4 5 6 7 Page 45 of 73 Set: (SwapFlag) 0 1 2 3 'C' 'S' Enable 4 5 6 7 Response: (SwapFlag) 0 1 'C' 2 'S' 3 4 5 6 7 3 4 5 6 7 Enable Query: (Calibration parameters) 0 1 'c' axis 2 Set: (Calibration range) 0 1 2 Low point 'C' AXIS (LSB) 3 4 5 6 ... (MSB) High point (LSB) ... (MSB) 7 Set: (Calibration parameters) 0 'C' 1 2 3 4 5 6 7 Offset ... Numerator ... Denominator ... axis (LSB) (MSB) (LSB) (MSB) (LSB) (MSB) Response: (Calibration parameters) 0 1 2 3 Offset ... 'C' axis (LSB) (MSB) 4 Numerator (LSB) 5 6 7 ... Denominator ... (MSB) (LSB) (MSB) Where: axis specifies the coordinate axis to calibrate by using lower case ASCII characters 'x' or 'y'. AXIS specifies the coordinate axis to calibrate by using upper case ASCII characters 'X' or 'Y'. COACh V Application Manual SW601575 Revision E Page 46 of 73 Enable specifies an ASCII character of '0' to disable or '1' to enable the function. In reality, only the least significant bit is used in this determination so any odd byte value turns the function on and any even byte value turns the function off. Low Point and High Point are Intel-format 2-byte integers specifying an axis range. For example, if two calibration points are specified as (Xlow,Ylow) and (Xhi,Yhi). The range for the X axis would then be: Low Point = Xlo and High Point = Xhi. Offset, Numerator and Denominator are Intel-format 2-byte integers specifying the physical calibration parameters used by the COACh V to manipulate returned points. Typically this input method is used only as a means of restoring previously queried calibration parameters or by a host implementing a high level calibration function. This function provides access to the onboard calibration facilities of the COACh V. As with most commands, the packet returned when querying is a valid packet type to set the desired quantity. Note that there is no direct way of requesting the range values as the COACh V doesn’t store them. In general, the calibration command is used to set mathematical constants used to calibrate numerical values to physical position on the touchscreen surface. CALIBRATED OUTPUT IS ENABLED BY THE MODE COMMAND, 'M'. Default values for the scaling parameters are: X offset = 0; X numerator = 4095; X denominator = 4095 Y offset = 0; Y numerator = 4095; Y denominator = 4095 Z offset = 0; Z numerator = 255; Z denominator = 255 Diagnostics Command - 'D', 'd' Query: 0 1 2 3 4 5 6 7 ‘d’ Set: 0 1 ‘D’ MaskC 0 1 ‘D’ MaskC 2 3 4 5 6 7 2 3 4 5 6 7 Response: COACh V Application Manual SW601575 Revision E Page 47 of 73 During a Set, MaskC is a bitmap specifying the individual tests to run by the COACh V. During a Response, the mask contain set bits for tests that failed and cleared bits for tests that passed. This command allows the user to either run or query the results of the on board diagnostic routines. When a set command is issued, a bit set to 1 in the test mask byte would run the corresponding test while a bit reset to 0 would ignore the test. When a query is issued, the result byte has bits set to one corresponding to failed tests while successfully completed tests have these bits cleared. NOTE: This command does an implicit query after a set command is issued retrieving the results of the tests run by the set. The available tests are mapped into the test mask and result bytes as follows. NOTE: Upon running the tests, bits specified as zero in the test mask cause corresponding bits in the result to be set to zero. This effectively masks any failed values from previous tests. Table 34 MaskC bit position MASKC BIT POSITION .0 .1 .2 .3 .4 .5 .6 .7 ERROR INDICATION Reserved Reserved ROM Test RAM Test EEPROM Test Drive Test reserved reserved Emulate Command - 'E', 'e' THIS COMMAND ONLY AVAILABLE IN RS-232 SERIAL COMMUNICATION Query: 0 1 2 3 4 5 6 7 3 4 5 'e' Set: 0 'E' COACh V Application Manual SW601575 Revision E 1 2 6 7 TouchFlag Format Page 48 of 73 Response: 0 1 'E' 2 3 4 5 6 7 TouchFlag Format Where: TouchFlag is an ASCII value of '0' to not include touch/untouch information in some formats and '1' to include the information. Format is a byte in the range of ASCII '0' through ASCII '8'. This function is used to set the output format used by a serial COACh V. Combining the TouchFlag and Format number into a two digit decimal number produces the following list of formats. Table 35 TouchFlag formats TOUCH FLAG '0' '0' '0' '0' '0' '0' '0' '0' '0' '1' FORMAT DESCRIPTION '0' '1' '2' '3' '4' '5' '6' '7' '8' '0' '1' '1' '1' '2' '1' '3' '1' '4' '1' '5' '1' '6' '1' '7' '1' '8' Elo Touch Solutions 140 Binary Elo Touch Solutions 140 ASCII *Elo Touch Solutions 280 Binary *Elo Touch Solutions 280 ASCII Elo Touch Solutions SmartSet Binary Elo Touch Solutions SmartSet ASCII E281A-4002 Binary E281A-4002 ASCII E271-60 ASCII Elo Touch Solutions 140 Binary (same as '00') Elo Touch Solutions 140 ASCII (Appends 'T' & 'U') *Elo Touch Solutions 280 Binary (Flags untouch by 81h) *Elo Touch Solutions 280 ASCII (Appends 'T' & 'U') Elo Touch Solutions SmartSet Binary (same as '04') Elo Touch Solutions SmartSet ASCII (Appends 'T' & 'U') E281A-4002 Binary (Z=0 on untouch) E281A-4002 ASCII (Z=0 on untouch) E271-60 ASCII (Appends 'T' & 'U') A complete description of each of the above listed formats is contained on page 65. Formats denoted by the asterisk (*) symbol force the axis scaling to be set to 2-255 to emulate the 280’s 8-bit analog to digital conversion method. Any scaling currently in use is lost if one of these formats is set. Default setting for the output format is the Elo Touch Solutions SmartSet binary mode COACh V Application Manual SW601575 Revision E Page 49 of 73 with untouch reporting enabled, TouchFlag = '1' and Format = '4'. Filter Command - 'F', 'f' Query: 0 1 2 3 4 5 6 7 'f' Set: 0 1 2 3 4 5 'F' Type Len Width States Ctrl 0 1 2 3 4 5 'F' Type Len Width States Ctrl 6 7 6 7 Response: Where: Type specifies the current screen type. It reports '0' if configured for an 5-wire AccuTouch® screen. Len is a byte value in the range 0,..,255 specifying the number of samples to utilize in the debounce filtering algorithm. The default is 4h. Width is a byte value in the range 0,..,255 specifying the allowable deviation from the mean for any sample in a coordinate measurement sequence. It is used in conjunction with the Len to accomplish debounce filtering. The default value is 30h. States is a byte value in the range 0,..,255 specifying the number of valid touch detections to detect before accepting that a touch event has occurred. The same criterion is also applied to the loss of touch. For example, a value of eight sets the state detection function to require that eight contiguous touch measurements be made before the COACh V processes an initial touch. In addition, eight contiguous untouches must be measured to cause the COACh V to report an untouch. The default value is 8h. Ctrl is a byte that is comprised of two 4-bit numeric fields. The high-order 4-bit number specifies the touch threshold value between 0 and 15 to use with the touchscreen. The low-order 4-bit number specifies the number of additional 0.5 millisecond time periods to insert between changes to the drive signals to the touchscreen. The default for the Ctrl byte is 91h. COACh V Application Manual SW601575 Revision E Page 50 of 73 Configuration - 'g' Query: 0 1 2 3 4 5 6 7 'g' Set: This command may not be set. Response: There is no unique response packet for this command. This command allows the host to request a complete dump of the COACh V’s configuration for saving and restoring during a host context switch. Currently the information comes in the following order. Table 36 Configuration 'g' packet order PACKET ORDER 1 2 3 4 5 6 7 8 9 10 11 12 13 RESPONSE TYPE B CS Cx Cy Cz E F M P SS Sx Sy Sz The COACh V reports a total of 14 packets, including ACK. Future firmware revisions may report more or fewer packets and their order can be changed. Storage requirements for the current revision level can be queried using the ID command, 'i'. Timer Command - 'H', 'h' This command is not supported by this controller. ID Command - 'i' Query: 0 1 2 3 4 5 6 7 ‘i’ COACh V Application Manual SW601575 Revision E Page 51 of 73 Set: This command may not be set. Response: 0 1 2 3 4 5 6 7 ‘I’ Type IO Features Min Maj P Class Where: Type specifies the current screen type. It reports '0' if configured for an AccuTouch® screen (5 wire). IO specifies the controller communication type. A '4' is specified if configured as USB, a '0' is specified if configured as RS-232 serial. Features byte is not available, and reserved for future use. Min specifies the microprocessor firmware minor revision level. Maj specifies the microprocessor firmware major revision level. P is a byte value that specifies the number of packets to expect when querying the configuration (via the 'g' command). Class is a byte that identifies this particular controller model. Its value is 50H. Jumpers Command - 'j' Query: 0 1 2 3 4 5 6 7 3 4 5 6 7 ‘j’ Set: This command may not be set. Response: 0 1 2 ‘J’ Type IO Where: Type specifies the current screen type. It reports '0' if configured for an AccuTouch® screen (5 wire). IO specifies the controller communication type. A '4' is specified if configured as USB, a '0' is specified if configured as RS-232 serial Key Command - 'K', 'k' This command is not supported by this controller. COACh V Application Manual SW601575 Revision E Page 52 of 73 Low Power Command - 'L', 'l' This command is not supported by this controller. Mode Command - 'M', 'm' Sets the various operating modes of the controller. Query: 0 1 2 3 4 5 6 7 3 4 5 6 7 ‘m’ Set: 0 1 2 ‘M’ 00H Mask1 Mask2 Set: (alternate form) 0 1 2 3 4 5 6 7 'M' X X X X X X X 3 4 5 6 7 Response: 0 1 ‘M’ 00H 2 Mask1 Mask2 The Mode command offers two methods of setting the various operating modes. The binary method uses two bitmapped bytes to set the mode. The binary method is indicated by the presence of a null byte in position 1. The ASCII method uses a string of ASCII letters to set the mode. This is useful if the controller is connected to a terminal for evaluation purposes. Mask1 is a bitmapped byte value with the following definitions. COACh V Application Manual SW601575 Revision E Page 53 of 73 Table 37 Mask1 bit positions MASK1 BIT POSITION .0 .1 .2 .3 .4 .5 .6 .7 MEANING Report Initial Touches Report Stream Touches Report Untouches Reserved ** Warnings Pending Reserved Range Check On Reserved NOTES: 1. Bits specified with ** are only valid within a response packet. 2. Bits specified as reserved, always report 0 and ignore any set value. Mask2 is a bitmapped byte value with the following definitions. Table 38 Mask2 bit positions MASK2 BIT POSITION .0 .1 .2 .3 .4 .5 .6 .7 MEANING Reserved Coordinate Trim On Enable Calibration Enable Scaling Reserved Reserved Track Mode Reserved NOTE: Bits specified as reserved, always report 0 and ignore any set value. X represents any of the following values in string form. When any character is found in the string (as evaluated from left to right) that is not in the following list, then processing for the command is terminated. Table 39 X values CHARACTER MEANING 'B' Enable Range (Bounds) Checking (automatic if 'P' selected) 'C' Enable Calibration (Automatic if 'P' selected) 'I' 'M' 'P' 'S' 'T' 'U' Report Initial Touches Enable Scaling (Map) Enter Trim Mode (Push) Report Stream Touches Enter Track Mode Report Untouches This command allows the user to set many operating modes and characteristics. As seen above, it offers two distinctly differing ways to accomplish this. The first way is the binary method where two bitmapped bytes are supplied to set the mode. The binary mode is determined by the presence of a 00h byte immediately following the mode set command. COACh V Application Manual SW601575 Revision E Page 54 of 73 The ASCII method of mode selection allows the user to specify the mode setup from a less intelligent host via a string of ASCII letters representing the setup mode conditions. Initially on entering the Mode command using ASCII characters, the system is reset to a state that has all extraneous functions turned off. This is similar to passing 'NUL's for the above Mask1 and Mask2 values. The ASCII commands following then deviate the setup from this condition. If the Initial Touch, Stream, and Untouch Modes are disabled, no Touch packets are transmitted unless a Touch query is issued. See Touch Command - 't' on page 61. Table 40 Special mode functions FUNCTIONS Range Checking Trim Mode Tracking Mode DESCRIPTION If a touch coordinate is outside the active touch area as defined by the calibration parameters, then, bit 6 in the Status byte of the Touch packet will be set. Calibration Mode must also be enabled (bit 2 of Mask2) and Calibration parameters set with the Calibration command. Range Checking Mode is typically combined with Trim Mode (bit 1 of Mask2). Touches outside the active touch area as defined by the calibration parameters will have their coordinates adjusted to the edge of the calibrated area. This mode effectively expands all touch zones on the edge of the image to include the associated overscan area. Trim Mode requires Range Checking Mode to be enabled (bit 6 of Mask1). In Tracking Mode, Stream touches which repeat the same coordinate will not be transmitted to the host. This mode is only useful if coordinate scaling is set below the natural variation of coordinates for a constant touch. Tracking Mode requires Stream Mode (bit 1 of Mask1). Nonvolatile RAM Command - 'N' This command saves/restores controller settings in the on-chip nonvolatile memory, which is used to store poweron defaults. Query: This command may not be queried. Set: 0 'N' 1 2 3 4 5 6 7 Direction Areas Page Where: Direction is a byte value where the least significant bit specifies either a read (bit clear) operation or a write (bit set) operation. Like other values of this type, since only the least significant bit is used, ASCII values of '0' (for read) and '1' (for write) can be used. Areas is a mapped value where the lower three bits specify the areas of memory to read/write. Bit 0 specifies the setup area, bit 1 specifies the calibration parameter area, and bit 2 specifies the scaling area. The other bits are reserved and can be either set or COACh V Application Manual SW601575 Revision E Page 55 of 73 clear. Again, since only the least significant three bits are used, it is possible to use ASCII characters '0' - '7' to represent the mask. The Areas byte has the following bit positions. Table 41 Areas byte bit positions Bit Area 0 Setup Area 1 Calibration 2 Scaling Page is a byte number in the range 0-1 utilizing the least significant bit. It is used to specify either the primary (0) or the alternate (1) area to use for reading or writing the calibration and scaling data. There is only one setup area (equivalent to page 0 since it is utilized when a boot from EEPROM is used) therefore, no page needs to be specified for addressing ONLY the setup area. This command allows the user to restore (R/WFlag = 0) or save (R/WFlag = 1) setup information to the onboard EEPROM device. The Area Specifier Mask is used to specify the type of data to store while the Page Number specifies an alternate setup page for some areas. The standard EEPROM has storage available for 1 setup area and 2 each of areas for calibration and scaling data. The Page Number is only significant for the latter two areas. Owner Command - 'o' Query: 0 1 2 3 4 5 6 7 ‘o’ Set: This command may not be set. Response: 0 1 2 3 4 5 6 7 ‘T’ ‘Y’ ‘C’ ‘O’ ‘E’ ‘L’ ‘C’ ‘.’ This command is reserved to supply a point for a custom firmware string to be defined by a user. This would allow a customer requiring a specific string to be output to identify ownership of the controller. The default value is shown above. COACh V Application Manual SW601575 Revision E Page 56 of 73 Parameter Command - 'P','p' Query: 0 1 2 3 4 5 6 7 'p' Set: 0 1 2 3 'P' IO Mask1 Mask2 0 1 2 3 'P' IO Mask1 Mask2 4 5 6 7 4 5 6 7 Response: Where: IO specifies the controller communication type. A '4' is specified if configured as USB, a '0' is specified if configured as RS-232 serial. Mask1 is a bitmapped byte variable with the following bit definitions. Table 42 Mask1 bit positions MASK1 BIT POSITION USAGE .0, .1, .2 .3 .4 .5 .6, .7 baud rate (see table below) 0 = 8 data bits 0 = 1 stop bit 0 = parity off 00 - not available Table 43 Mask1 values MASK1 [.2, .1, .0] VALUE BAUD RATE 000 001 010 011 100 101 110 111 not available not available not available 2400 4800 9600 19200 not available Mask2 is a bitmapped byte variable with the following bit definitions. COACh V Application Manual SW601575 Revision E Page 57 of 73 Table 44 Mask2 bit definitions MASK1 [.7, .6] VALUE PARITY 00 01 10 11 Even Odd Space Mask Table 45 Mask2 bit positions MASK2 BIT POSITION MEANING .0 .1 .2 .3 .4 .5 .6 .7 Checksum required RESERVED Hardware Handshake enabled Invert Hardware Handshake Reserved Reserved Reserved Reserved Checksum Bit: If the Checksum Bit is 0, the controller does not check the validity of received commands. If the Checksum Bit is 1, and the Checksum is incorrect in a received command, error code '3' is returned in the Acknowledge packet. Checksums are always calculated and transmitted by the controller to the host. The host can choose to ignore the Checksum or request the controller to retransmit corrupted packets. Software Handshaking Bit: The software flow control convention of XON/XOFF (usually at bit position .1) is not available in the current firmware. Hardware Handshaking Bit: If the Hardware Handshaking Bit is 1, the controller supports hardware handshake signals typically implemented in EIA RS-232 communications. Invert Hardware Handshaking Bit: If the Invert Hardware Handshaking Bit is 1, the sense of the handshaking signals are inverted (except DSR, DCD). This feature is provided as a tool for use in installations where the controller might be forced to share a serial link with another device. The default value for Mask1 is 05h and for Mask2 is 04h. Quiet Command - 'Q', 'q' This command is not supported by this controller. Reset Command - 'R', 'r' Query: This command may not be queried. COACh V Application Manual SW601575 Revision E Page 58 of 73 Set: 0 1 2 'R' Type 3 4 5 6 7 Response: There is no response to this command. Where: Type is used to specify the type of reset to use. If Type is '0' then a “hard” reset (cold boot) occurs. If Type is '1' then a “soft” reset (warm boot) occurs. If Type is '2', then the NVRAM is reset to standard default values and the controller configuration is reset to the standard default. Only the least significant bits are used, so the ASCII values of '0', '1', and '2' can be used. Coordinate Scaling Command - 'S', 's' Query: (Inversion) 0 1 2 3 4 5 6 7 's' 'S' 0 1 2 3 4 5 6 7 'S' 'S' Mask 0 1 2 3 4 5 6 7 'S' 'S' Mask 3 4 5 6 7 Set: (Inversion) Response: (Inversion) Query: (Axis scaling parameters) 0 1 'S' axis 2 Set: (Scaling range) 0 1 2 'S' AXIS Low point (LSB) COACh V Application Manual SW601575 Revision E 3 4 5 6 7 ... High point ... (MSB) (LSB) (MSB) Page 59 of 73 Set: (Scaling parameters) 0 'S’ 1 2 Offset axis (LSB) 3 4 5 6 7 ... Numerator Denominator ... ... (MSB) (LSB) (MSB) (LSB) (MSB) Response: (Axis scaling parameters) 0 1 2 Offset 'S’ axis (LSB) 3 4 5 6 7 ... Numerator Denominator ... ... (MSB) (LSB) (MSB) (LSB) (MSB) Where: axis specifies the coordinate axis to calibrate by using lower case ASCII characters x, y, or z. AXIS specifies the coordinate axis to calibrate by using upper case ASCII characters X, Y, or Z. Low Point and High Point are Intel-format 2-byte signed integers specifying an axis range. For example, if the X axis is to be scaled to an EGA 640 point resolution, then the Low Point would be zero and the High Point would be 640. Offset, Numerator, and Denominator are Intelformat 2-byte integers specifying the physical scaling parameters used by the COACh V to manipulate returned points. Typically this input method is used only as a means of restoring previously queried scaling parameters. Mask is a bit mask variable that is used to specify inversion of certain axes. It is mapped as follows: Table 46 Mask bit positions MASK BIT POSITION USAGE .0 .1 .2 .3 .4 .5 .6 .7 Invert X Axis Invert Y Axis Invert Z Axis Don't Care Don't Care Don't Care Don't Care Don't Care This function is similar in operation to the calibration function but it controls the independent scaling section of the COACh V. The scaling section is used to map data from the touchscreen into other coordinate systems. Note that axis scaling can be set via range points but it cannot be queried back this way since the COACh V doesn’t retain this information. The 'S' function is used to set or query the state of inversion of individual coordinate axes. A set bit in Mask inverts (or indicates inversion in the case of a query) the axis. Scaling must be enabled for the effect to take place. If an axis is scaled (either via range r parameters) then it is set to non-inverted. COACh V Application Manual SW601575 Revision E Page 60 of 73 Raw X and Y axes coordinates from the measurement system that are delivered into the calibration and scaling routines are based on the minimum to maximum range of 0 to 4095. Raw Z coordinates are 255 during touch (initial, stream) and 0 on untouch. For a mathematical treatment of calibration and scaling refer to section “ Calibration and Scaling Calculations” on page72. Default values for the scaling parameters are: X offset = 0; X numerator = 4095; X denominator = 4095 Y offset = 0; Y numerator = 4095; Y denominator = 4095 Z offset = 0; Z numerator = 255; Z denominator = 255 Touch Command - 't' This command permits the host to retrieve the coordinate resulting from the most recent touch measurement through the control endpoint. Query: 0 1 2 3 4 5 6 7 ‘t’ Set: This command may not be set. Response: 0 ‘T’ 1 2 3 Status X data (LSB) 4 5 ... Y data ... (MSB) (LSB) (MSB) 6 7 Z data ... (LSB) (MSB) Status is a bitmapped quantity describing the state of the touchscreen and controller at the time the touch data was taken. Table 47 Touch response status bitmap STATUS BIT POSITION MEANING .0 measurement is initial touch, serial (set if true) measurement is stream touch, USB (set if true) measurement is stream touch, serial (set if true) measurement is initial touch, USB (set if true) measurement is untouch (set if true) reserved (always 00h) Warning pending (set if true) reserved (always 00h) Out of Range (see Range Checking in Mode Command) reserved (always 00h) .1 .2 .3 .4 .5 .6 .7 X data is a 2-byte integer describing the x coordinate of the touch. Y data is a 2-byte integer describing the y coordinate of the touch. COACh V Application Manual SW601575 Revision E Page 61 of 73 Z data is a 2-byte integer describing the z coordinate of the touch. The response indicates the most recent valid touch measurement. If there is currently no touch present on the touchscreen, then the untouch coordinate from the last touch is reported. Upload Command - 'U', 'u' Query: 0 1 2 3 4 5 6 7 ‘u’ Subcommand Spec 0 1 2 3 4 5 6 7 ‘U’ Subcommand Mode 0 1 2 3 4 5 6 7 ‘U’ Subcommand Arg1 Arg2 Arg3 Set: Response: This command is used to provide a direct way to query technology specific controller information. The following description of its usage is applicable only to the COACh V: Subcommand is a byte that defines the context for the arguments that follow. The COACh V has these subcommands: Subcommands 'W' and 'N' - Set or Query Serial Number Query: COACh V Application Manual SW601575 Revision E 0 1 2 'u' ‘N’ page 3 4 5 6 7 Page 62 of 73 Set: 0 1 'U' ‘W’ 2 3 4 5 6 7 followed immediately by: 0 1 2 3 4 5 6 7 'U' ‘N’ page S[0] S[1] S[2] S[3] S[4] 0 1 2 3 4 5 6 7 'U' ‘N’ page S[0] S[1] S[2] S[3] S[4] Response: Where: 'page' specifies the serial number page to read or write. If 'page' is in the range 0x01,…,0x04, then that paged serial number is specified. If 'page' is outside that range, then the “legacy” serial number is specified. The 'page' value itself is stored in specified serial number page. S[0]-S[4] are the five bytes specific to a given serial number page as specified by the 'page' value above. Description: The COACh V serial number is written to NVRAM using the command sequence 'UW' (set 'write enable'), 'UNp' (write 6 bytes into NVRAM). At any time the 'uNp' query can be issued to retrieve the specified 6-byte field previously saved. Five independent fields of 6 bytes each are available for storage in the controller. When the controller reports its serial number to the USB host computer, it prefixes the three characters "50U" to its stored string in page 0. If NVRAM fails or if the controller has not yet had a serial number programmed, then it reports the serial number string "50U000000". For example, at factory setup, the controller might be programmed with the following serial number string: "123456". In response to a SmartSet serial number query, "uNp...", where p is any value other than 1, 2, 3, or 4, then the controller replies: "UN123456", i.e., 55H, 4eH, 31H, 32H, 33H, 34H, 35H, 36H. If the controller’s NVRAM fails, then its reply changes to "UN000000", i.e., 55H, 4eH, 30H, 30H, 30H, 30H, 30H, 30H. COACh V Application Manual SW601575 Revision E Page 63 of 73 With the same programming, the controller’s USB serial number string is the following: "50U123456". Or, if its NVRAM fails, "50U000000". The variable portion of the USB serial number string is built from the serial number in NVRAM only during initialization and maintained in RAM. If the serial number is changed using the SmartSet 'UN' command, only the NVRAM value should be updated, that is, any 'get_string_descriptor_3' from the host always returns the same serial number during any enumerated session. Any query using the SmartSet 'uN' command reports the serial number contained in the NVRAM. Every 'UNp' must be immediately preceded by a 'UW' command. No commands are allowed between these two commands, and only one 'UNp' command is accepted after a 'UW' command. The 'UW' command has no arguments (the value of bytes 2-7 are ignored), and has no function other than to enable a single serial number storage operation. At any time the 'uNp' query can be issued to retrieve the specified 6-byte field saved in the specified 'page'. COACh V Application Manual SW601575 Revision E Page 64 of 73 7 Touch Report Formats SmartSet Binary Format The COACh V supports two variations of the SmartSet binary touch report format. There is one format for serial protocol and on for USB. This format for USB is the same as that used by serial and add-in bus cards with one exception: status bits .0 and .1 are reversed. This change is necessary to define the stream touch state as a “button” under the USB HID descriptor rules. Response: 0 1 2 3 4 5 ‘T’ Status X data (LSB) ... (MSB) Y data (LSB) ... (MSB) 6 7 Z data ... (LSB) (MSB) Where: Status is a bitmapped quantity describing the state of the touchscreen and controller at the time the touch data was taken. Table 48 Touch report status bitmap STATUS BIT POSITION MEANING .0 measurement is initial touch, serial (set if true) measurement is stream touch, USB (set if true) measurement is stream touch, serial (set if true) measurement is initial touch, USB (set if true) measurement is untouch (set if true) reserved Warning pending (set if true) reserved Out of Range (see Range Checking in Mode Command) reserved .1 .2 .3 .4 .5 .6 .7 NOTE: Bits specified as reserved, always report 0. X data is a 2-byte signed integer describing the x coordinate of the touch. Y data is a 2-byte signed integer describing the y coordinate of the touch. Z data is a 2-byte signed integer describing the z coordinate of the touch. The most significant bit of each of the X, Y, and Z data indicates a negative value if set. If trim and rangecheck are not enabled, values that overflow or underflow rollover linearly. COACh V Application Manual SW601575 Revision E Page 65 of 73 SmartSet ASCII Format This format can be programmed to report limited touch status information. Coordinate data is formatted as three ASCII decimal numbers, one for x, one for y, and one for z. Range of the coordinates is determined by the calibration and scaling options of the COACh V. Coordinate values less than 1000 are padded on the left with zeros so that every number is at least four digits long. Scaling might require the addition of an additional digit for values greater than 9999. Positive signs are suppressed. The packet format is as follows. Table 49 SmartSet ASCII format without touch status CHARACTER ORDER CONTENT optional optional 1 2 3 4 5 optional optional 6 7 8 9 10 optional optional 11 12 13 14 15 16 (suppressed) x sign (suppressed) x ten thousands digit x thousands digit x hundreds digit x tens digit x units digit ASCII 'space' (suppressed) y sign (suppressed) y ten thousands digit y thousands digit y hundreds digit y tens digit y units digit ASCII 'space' (suppressed) z sign (suppressed) z ten thousands digit z thousands digit z hundreds digit z tens digit z units digit ASCII 'carriage return' ASCII 'line feed' COACh V Application Manual SW601575 Revision E Page 66 of 73 Table 50 SmartSet ASCII format with touch status CHARACTER ORDER CONTENT optional optional 1 2 3 4 5 optional optional 6 7 8 9 10 optional optional 11 12 13 14 15 16 (suppressed) x sign (suppressed) x ten thousands digit x thousands digit x hundreds digit x tens digit x units digit ASCII 'space' (suppressed) y sign (suppressed) y ten thousands digit y thousands digit y hundreds digit y tens digit y units digit ASCII 'space' (suppressed) z sign (suppressed) z ten thousands digit z thousands digit z hundreds digit z tens digit z units digit ASCII 'space' 'T' for initial or stream touch, 'U' for untouch ASCII 'carriage return' ASCII 'line feed' 17 18 140 ASCII Format This format can be programmed to report limited touch status information. Coordinate data is formatted as two ASCII coded decimal numbers, one for x, and one for y. The allowable range of the coordinates is 0,..,9999. If trim and range check are not enabled, values that overflow or underflow linearly rollover. The packet format is as follows. Table 51 140 ASCII format without touch status COACh V Application Manual SW601575 Revision E CHARACTER ORDER CONTENT 1 2 3 4 5 6 7 8 9 10 11 ASCII 'carriage return' ASCII 'line feed' x thousands digit x hundreds digit x tens digit x units digit ASCII 'space' y thousands digit y hundreds digit y tens digit y units digit Page 67 of 73 Table 52 140 ASCII format with touch status CHARACTER ORDER CONTENT 1 2 3 4 5 6 7 8 9 10 11 12 13 ASCII 'carriage return' ASCII 'line feed' x thousands digit x hundreds digit x tens digit x units digit ASCII 'space' y thousands digit y hundreds digit y tens digit y units digit ASCII 'space' 'T' for initial or stream touch, 'U' for untouch 140 Binary Format This format returns no touch status information. Range of the (x,y) coordinates is {0,..,4095}. If trim and range check are not enabled, values that overflow or underflow linearly rollover. Each coordinate is split into two 6-bit segments and sent in two consecutive characters. The most significant bits of the characters are used for receiver synchronization. The packet format is as follows. Table 53 140 binary packet format BYTE CONTENT ORDER MSB BIT.6 BIT.5 BIT.4 BIT.3 BIT.2 BIT.1 LSB 1 2 3 4 1 1 0 0 1 0 1 0 x.11 x.5 y.11 y.5 x.10 x.4 y.10 y.4 x.9 x.3 y.9 y.3 x.8 x.2 y.8 y.2 x.7 x.1 y.7 y.1 x.6 x.0 y.6 y.0 280 ASCII Format This format can be programmed to return touch/untouch status or not. In either case, each coordinate is returned as two ASCII coded, unsigned, hexadecimal byte values. Scaling is inherently enabled to set the COACh V output range to {02,..,ff}. The scaling parameters are automatically set by implementing this format and in addition, the mode parameters are modified to enable scaling, trim, and range check. Setting 280 ASCII format does not prevent subsequent modification of the scaling and mode parameters but only implements the initial correct settings for the format. The two packet formats are as follows. COACh V Application Manual SW601575 Revision E Page 68 of 73 Table 54 280 ASCII without touch status CHARACTER ORDER CONTENT 1 2 3 4 5 6 7 x more significant nybble x less significant nybble ASCII 'comma' y more significant nybble y less significant nybble ASCII 'carriage return' ASCII 'line feed' Table 55 280 ASCII with touch status CHARACTER ORDER CONTENT 1 2 3 4 5 6 7 x more significant nybble x less significant nybble ASCII 'comma' y more significant nybble y less significant nybble ASCII 'comma' 'T' for initial or stream touch, 'U' for untouch ASCII 'carriage return' ASCII 'line feed' 8 9 280 Binary Format This format can be programmed to return touch/untouch status or not. In either case, each coordinate is returned as 3 bytes. The first byte of the packet is a combination synchronization character and status byte. Scaling is inherently enabled to set the COACh V output range to {02,..,ff}. The scaling parameters are automatically set by implementing this format and in addition, the mode parameters are modified to enable scaling, trim, and range check. Setting the 280 binary format does not prevent subsequent modification of the scaling and mode parameters but only implements the initial correct settings for the format. The two packet formats are as follows. Table 56 280 binary without touch status CHARACTER ORDER CONTENT 1 2 3 ASCII 'SOH'(01h) x value y value Table 57 280 binary with touch status CHARACTER ORDER CONTENT 1 = 81h if untouch = ASCII 'SOH'(01h), otherwise x value y value 2 3 COACh V Application Manual SW601575 Revision E Page 69 of 73 E281A-4002 ASCII Format This format can be programmed to report limited touch status information. Coordinate data is formatted as two ASCII coded decimal numbers, one for x and one for y. The allowable range of the coordinates is 0,..,9999. If trim and range check are not enabled, values that overflow or underflow are linearly rollover. The packet format is as follows. Table 58 E281A-4002 ASCII format without touch status CHARACTER ORDER CONTENT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ASCII 'carriage return' ASCII 'line feed' x thousands digit x hundreds digit x tens digit x units digit ASCII 'space' y thousands digit y hundreds digit y tens digit y units digit ASCII 'space' z thousands digit z hundreds digit z tens digit z units digit NOTE: Untouch is denoted by a z-axis value of '0000'. E281A-4002 Binary Format This format can be programmed to report limited touch status information. Range of the (x,y) coordinates is {0,..,4095}. Range of the z coordinate is set to {0,..,15} although the z coordinate value is limited to 15 for touch (initial, stream) and 0 on untouch. The z scaling parameters are automatically set by implementing this format and in addition, the mode parameters are modified to enable scaling. Setting E281-4002 Binary format does not prevent subsequent modification of the scaling and mode parameters but only implements the initial correct settings for the format. Each coordinate is split into two 6-bit segments and sent in two consecutive characters. The two most significant bits of the characters are used for receiver synchronization. The packet format is as follows. Table 59 E281A-4002 binary format without touch status BYTE CONTENT ORDER MSB BIT.6 BIT.5 BIT.4 BIT.3 BIT. 2 BIT. 1 LSB 1 2 3 4 5 6 1 1 0 0 0 0 1 0 1 0 0 0 x.11 x.5 y.11 y.5 z.11 z.5 x.10 x.4 y.10 y.4 z.10 z.4 x.9 x.3 y.9 y.3 z.9 z.3 x.8 x.2 y.8 y.2 z.8 z.2 x.7 x.1 y.7 y.1 z.7 z.1 x.6 x.0 y.6 y.0 z.6 z.0 COACh V Application Manual SW601575 Revision E Page 70 of 73 NOTE: Untouch is denoted by a z-axis value of '0000'. E271-60 ASCII Format This format can be programmed to report limited touch status information. Coordinate data is formatted as two ASCII coded decimal numbers, one for x and one for y. The allowable range of the coordinates is 0,..,9999. If trim and range check are not enabled, values that overflow or underflow are linearly rollover. The packet format is as follows. Table 60 E271-60 ASCII format without touch status CHARACTER ORDER CONTENT 1 2 3 4 5 6 7 8 9 10 11 x thousands digit x hundreds digit x tens digit x units digit ASCII 'space' y thousands digit y hundreds digit y tens digit y units digit ASCII 'carriage return' ASCII 'line feed' Table 61 E271-60 ASCII format with touch status CHARACTER ORDER CONTENT 1 2 3 4 5 6 7 8 9 10 11 x thousands digit x hundreds digit x tens digit x units digit ASCII 'space' y thousands digit y hundreds digit y tens digit y units digit ASCII 'space' 'T' for initial or stream touch, 'U' for untouch ASCII 'carriage return' ASCII 'line feed' 12 13 COACh V Application Manual SW601575 Revision E Page 71 of 73 A ppendix - Calibration and Scaling Calibration and Scaling Calculations It is required that calibration and scaling functions for the SmartSet family of controllers function independently from each other since each can be enabled individually. In the formulae below, 'A' is used in place of the axis term since the formulae for X and Y axes are identical. Calibration and scaling functions are bit enabled in the mode command. If disabled, each function passes the input value straight through to its output. Both calibration and scaling parameters can be input in two formats. The first format has parameters offset, numerator, and denominator. The second format uses the parameters low point and high point. Formulae and storage use the first format while the second one is for input purposes only and is converted by the command processor into offset, numerator, and denominator. The raw coordinate is input into the calibration function if it is enabled and is processed as follows: Acal = ( Araw − A _ offsetcal ) × A _ numeratorcal A _ deno min atorcal The calibration output is input into the scaling function if it is enabled and is processed as follows: Ascale = Acal × A _ numeratorscale + A _ offset scale A _ deno min atorscale The scaling output is the transmitted coordinate. If a function is not enabled, the input to that function is passed directly to the function’s output. The command processor converts low point, high point calibration input data into offset, numerator, denominator as follows: A_offsetcal = A_Low_Point A_numeratorcal = 4095 A_denominatorcal = A_High_Point – A_Low_Point and low point, high point scaling input data as follows: A_offsetscale = A_Low_Point A_numeratorscale = A_High_Point – A_Low_Point A_denominatorscale = 4095 If both calibration and scaling are enabled, then one can formulate: Acoordinate = ( Araw − A _ offsetcal ) × A _ numeratorcal × A _ numeratorscale + A _ offset scale A _ deno min atorcal × A _ deno min atorscale And if the calibration numerator and scaling denominator are equal as is the case with the defaults, then the formula becomes: Acoordinate = A _ numeratorscale × ( Araw − A _ offsetcal ) + A _ offset scale A _ deno min atorcal This is the formula as given in the SmartSet Technical Reference. COACh V Application Manual SW601575 Revision E Page 72 of 73 Check out Elo’s Website! www.elotouch.com Get the latest... • Product Information • Specifications • News on upcoming events • Press releases • Software drivers • TouchMonitor Newsletter Getting in Touch with Elo To find out more about Elo’s extensive range of touch solutions, visit our Website at www.elotouch.com, or simply call the office nearest you: North America Elo TouchSystems 301 Constitution Drive Menlo Park, CA 94025 USA Germany Tyco Electronics Raychem GmbH (Elo TouchSystems Division) Finsinger Feld 1 D-85521 Ottobrunn Germany Belgium Tyco Electronics Raychem GmbH (Elo TouchSystems Division) Diestsesteenweg 692 B-3010 Kessel-Lo Belgium Asian-Pacific Sun Homada Bldg. 2F 1-19-20 Shin-Yokohama Kanagawa 222-0033 Japan Tel 800-ELO-TOUCH Tel 800-557-1458 Tel 650-361-4800 Fax 650-361-4722 [email protected] Tel +49(0)(89)60822-0 Fax +49(0)(89)60822-180 [email protected] Tel +32(0)(16)35-2100 Fax +32(0)(16)35-2101 Tel +81(45)478-2161 Fax +81(45)578-2180 www.tps.co.jp ©2012 Tyco Electronics. COACh V Application Manual SW601575 Revision E Page 73 of 73