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

2005-6-6 20:32 6357 14 13 分类: MCU/ 嵌入式
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.
PARTNER CONTENT

文章评论1条评论)

登录后参与讨论

用户461316 2008-7-15 15:32

我来支持一哈你的博客!!

用户34639 2007-5-1 23:34

不错啊,加油

wang1jin 2006-12-26 09:09

一会把它全改成C...再发上来...当成一个学习机会吧...HE HE.

用户67237 2006-12-26 09:02

good

用户1266089 2006-12-26 08:36

博主辛苦了,支持一个!
相关推荐阅读
用户1028609 2008-01-29 16:15
从水里捞出来还可以工作的LCD
从水里捞出来还可以工作的LCD,这么说夸张了一点,但存储温度达到-40~105度,确实是很吓人的. 型号LB070WV3显示区域152.4 x 91.44外框尺寸170 x 109.6x16视角178...
用户1028609 2006-10-26 17:43
三洋冰箱将全部交由中国海尔贴牌生产
三洋冰箱将全部交由中国海尔贴牌生产   10.26 11:56  【共同社10月26日电】处于经营调整期的三洋电机公司26日作出决定,将把小日国内的家用冰箱生产全部交由合作方、中国最大的家电商海尔集团...
用户1028609 2006-10-26 17:17
日官房长官:决不认可香港团体的登岛行为
日官房长官:决不认可香港团体的登岛行为“【共同社10月23日电】日本官房长官盐崎恭久23日下午举行记者会见,就主张中国拥有尖阁诸岛(中国名:钓鱼岛)主权的香港团体“保钓行动委员会”力图登岛一事强调:“...
用户1028609 2005-06-07 10:17
下载器件资料的好地方,可能是最好的,但不是最全的^_^
http://www.alldatasheet.comhttp://www.alldatasheet.co.kr/http://www.alldatasheet.net[此贴子已经被作者于2005-6...
EE直播间
更多
我要评论
1
14
关闭 站长推荐上一条 /3 下一条