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.
用户461316 2008-7-15 15:32
用户34639 2007-5-1 23:34
不错啊,加油
wang1jin 2006-12-26 09:09
用户67237 2006-12-26 09:02
用户1266089 2006-12-26 08:36