1.1RS232 CONTROL CABLE................................................................................................................................................3
If the serial mouse is enabled the projector sends mouse data whenever the user
moves the trackball on the Batmouse.
Page 3Version 1.
Projector Control
2 GENERAL
This document describes the Communication Protocol between a Proxima® Projector and a Computer (Host).
By using this connection the Host will be able control the projector.
This document is HEX command based only and a regular Terminal program like hyperterminal etc. can
therefore not directly be used unless the COM port are activated by the user. This document is aimed at control
systems in general which is HEX based.
3 FUNCTION TYPE
The Function is grouped in four different function types:
Function typeComments
ExecuteAn execute function executes an action on the projector, i.e.
only one state.
StateA State function performs a set operation from a predefined
list of states. Not all values in the range
have to be legal.
State StringAs state but returns ASCII strings
AdjustAn adjust function is characterized by Maximum >
Minimum. And all the integer values between Minimum and
Maximum are legal.
Table 4
4 PROTOCOL MESSAGES
4.1 Message Formats
The message is always divided in a header and a body part:
Message Head (7Byte)Message Body (6Byte)
4.1.1 Message Head
The message head has the following structure:
Byte 0Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6
Magic NumberBody sizeCRC
0xBE
Table 5
0xEF0x800x060x00CRC_loCRC_hi
All values is in hexadecimal indicated with the leading 0x. The Magic number is used for synchronizing the start of a
message. The Body size is set to the number of bytes contained in the Body part of the message.
Page 4Version 1.
Projector Control
Currently there is only one type of body so the size is fixed to 0x0006. The CRC field contains the CRC of the message.
The CRC algorithm is given in Appendix 1. To disable CRC set CRC_lo=0x00 and CRC_hi = 0x00.
The Message Head – if the CRC are disabled – then looks like the following string:
0xBE 0xEF 0x80 0x06 0x00 0x00 0x00. This Head will be present in all strings sent to the projector from the host.
4.1.2 Message Body
The message body has the following structure:
Byte 0Byte 1Byte 2Byte 3Byte 4Byte 5
Operation TypeFunctionValue
OpTypeLo
0x00FuncNum_lo0x00Opval_loOpval_hi
Table 6
4.1.2.1 Field description
Field NameField ValueDescription
Operation Type
Function
Value
OpTypeLo
0x01Operation Set. Set current value
0x02Operation Get. Gets the current value
0x03Operation Initialize. Initialize the value to default.
Should not be used
0x04Operation Increment. Increment the value by one
step. Only valid for “Adjust” functions.
0x05Operation Decrement. Decrement the value by one
step. Only valid for “Adjust” functions.
0x06Operation Execute. Execute the operation. Only
used for “Execute” operations
FuncNumThe actual function number to execute. A list of
usable FuncNum is given in Chapter 9
-Only used by Operation Set. The actual value to set
the operation to. For all other operation actions, this
field is set to 0x0000.
Table 7
Page 5Version 1.
Projector Control
5 COMMAND RETURN CODES
The Serial protocol returns an acknowledgment (“return code”) for every packet sent. If
the host sends a packet, then the projector acknowledge the receipt of this packet. The return codes are detailed in the table
below.
Command Return Code NameReturn Code ValueDescription
ACK0x06Packet acknowledged – no errors. Normal
response when receiving
NAK0x15Packet not acknowledged – some error occurred in
receiving this packet. Usually
Indicates a CRC error.
ERR0x1C 0xXXXXPacket was received OK, but an error occurred
when executing the command contained in the
Packet. The two bytes following the 0x1C
(0xXXXX) are the error code
VAL0x1D 0xXX 0xYYPacket value returned. This return code will be
sent in response to a Operation packet of type
OPERATION_GET. The first byte after 0x1D
(0xXX), is the least-byte of the returned value. The
0xYY is the most significant-byte of the returned
value.
STRINGStrings 0x06ASCII Strings and at last ACK
Table 8
TRANSACTION EXAMPLES
Example 1: Set
Host: Projector
Operation Set Packet =>
<= ACK
Example 2: Get
Operation Get Packet =>
<= VAL
VAL=0x1D 0x00 0x03 means that 0x0300 is returned
Example 3: Hex sequence for Set Brightness to 70% => 0.7*255 = 178 = 0xB2
0 (Off)
Magnify0x35Adjust-026
Pan horizontal0x36Adjust-Scr.depScr.dep
Pan vertical0x37Adjust-Scr.depScr.dep
Freeze0x38State1 (On)
0 (Off)
PnP0x39State1 (On)
0 (Off)
DPMS0x3AState1 (On)
0 (Off)
Source Search0x3BState1 (On)
SerialMouse
MenuTimeOut0x3DAdjust-550
1
0x3CState1 (On)
0 (Off)
0 (Off)
--
--
--
--
01
--
--
--
--
Table 12
FunctionFuncNumF.typeStatesMinimumMaximum
Information0x40State Strings0
Respons is Source.
information .
1
Respons is Service.
information
--
Table 13
Page 9Version 1.
Projector Control
APPENDIX 1: CRC CALCULATION ALGORITHM
The following ‘C’ code can be used to calculate the 16-bit CRC required for all packets. The CRC is contained in
the packet header and is calculated for the entire packet (header plus body). The CRC
calculation is performed with the CRC bytes of the packet header initialized to zero.
// Using two 256 byte lookup tables, quickly calculate a
16-bit CRC on // a block of data.
// Params:
// pcData : Pointer to data to calculate CRC on.
// nCount : Number of data bytes.
// Return: 16-bit CRC value.
WORD CalculateCRC16 (BYTE *pcData, int nCount)
{
BYTE cCRCHi = 0xFF; // high byte of CRC initialized
BYTE cCRCLo = 0xFF; // low byte of CRC initialized
BYTE cIndex; // will index into CRC lookup table
while (nCount--) // step through each byte of data
{