日志档案

发表于 2005-6-6 20:32:29

0

标签: 无标签

ELO触屏2210控制板输出串行数据格式(含检验码产生)

Interface Specifics 55 54 ST XL XH YL YH ZL ZH SUM 左上角 X=0044-0047 Y=0010-0012 55 54 01 47 00 10 00 FF 00 AA 左下角 X=0046-000047 Y=01C5-01C8 55 54 01 46 00 C5 01 FF 00 5F 右上角 X=0266-0267 Y=000E-0010 55 54 01 67 02 10 00 FF 00 CC 右下角 X=026F Y=01C9-01CA 55 54 01 69 02 C1 01 FF 00 80 Serial Controllers The serial interface uses the eight-byte packet with an additional Lead-in byte and a trailing Checksum byte for a total of ten bytes. <8-byte Command or Response> An optional Key byte may also be included. Lead-in Byte The Lead-in byte is used to signal the start of a packet. The standard Lead-in byte is an ASCII 'U' (55h). This character was chosen due to its distinctive alternating bit pattern. The Lead-in byte is different if the optional Key byte is included in the packet. See Key Byte for more information. Checksum Byte The trailing Checksum byte may be used to validate the serial communication and to synchronize with the received data stream. The Checksum is calculated as follows: Checksum byte = + + <8 Data bytes> where the addition is performed with 8-bit unsigned numbers and overflow is ignored. By default, the host is not required to send a properly calculated Checksum in command packets. A dummy value, such as 0, is required to provide the correct packet length. If a higher confidence is needed in the serial communications, the host may use the Parameter command to enable Checksum verification by the controller. With this function enabled, the controller checks each command packet for a valid Checksum value before processing the command. Key Byte An optional format, available on some controllers, extends the standard serial packet by adding a Key byte. This extended packet is used in specialized installations where more than one serial controller is to be connected on a single serial communication link. In such an installation, a unique Key value may be programmed into each controller with the Key command and stored in NVRAM. A command intended for only one of the interconnected controllers is sent in an extended packet. Although all controllers on the link receive the command, only the one with the matching Key processes the command. If a standard packet is sent along the link, all the interconnected controllers will process the command (it acts as a global command). Similarly, responses from each controller contain the programmed Key byte. This permits the host to discriminate between touch data generated by the controllers. As there is no standard way of allowing the controllers in this type of installation to send data on the same serial data line, a custom wired OR configuration is necessary for the hardware to function properly. The controllers must also have automatic touch reporting disabled with the Mode command and be polled with a Touch query issued to each controller. See Touch command. Other hardware considerations must also be evaluated when attempting this type of installation. The structure of the extended serial communications packet is: <8 byte Command or Response> The Lead In byte of an extended packet is an ASCII Control-V character (16h). The host can check for either a 'U' or ^V as the Lead-in byte. If the byte is a 'U', the host knows 9 bytes will follow. If the byte is a ^V, 10 bytes will follow. As with the standard packet, the Checksum is calculated by summing the bytes without regard to overflow. The Key byte is included in the sum. Checksum byte = + + <8 Data bytes> + The Key byte is not used by factory default.

系统分类: 单片机   |   用户分类: 无分类   |   来源: 无分类   |   【推荐给朋友】

    阅读(2504)    回复(0)  

投一票您将和博主都有获奖机会!