Kramer Electronics PIP-200xl Photo Scanner User Manual


 
Communication Protocol
21
10 Communication Protocol
1
This RS-232/RS-485 communication protocol uses four bytes of information as
defined below. A null-modem connection (pin 2 and pin 3 crossed; pins 5
connected together) is used to link the PIP unit to the controller unit (for example,
PC). The data rate is 9600 baud, with no parity, 8 data bits and 1 stop bit.
When switching (for example, instruction codes 1 and 2), the INPUT (7 bits)
is set as the input number, which is to be switched. Similarly, if switching is
done via the machine’s front-panel, then these bits are set with the INPUT
NUMBER, which was switched. For other operations, these bits are defined
according to the table.
Table 10: Protocol Definitions
MSB LSB
7 6 5 4 3 2 1 0
DESTI-
NATION
INSTRUCTION
0 D INST
5
INST
4
INST
3
INST
2
INST
1
INST
0
1st byte
REQUEST INPUT
1 RQ BYTE2
5
BYTE2
4
BYTE2
3
BYTE2
2
BYTE2
1
BYTE2
0
2nd byte
BYTE3
1 BYTE3
6
BYTE3
5
BYTE3
4
BYTE3
3
BYTE3
2
BYTE3
1
BYTE3
0
3rd byte
LAST
1 BYTE3
7
0 0 1 0 0 0
4th byte
1
st
BYTE: Bit 7 – Defined as 0
Bit 6 – “DESTINATION BIT”: 0 – information is sent from the PC to the PIP
1 – information is sent from the PIP to the PC
Bit 5 to Bit 0 (INST
5
…..INST
0
) – “INSTRUCTION” (6 bits)
The function that is to be performed is defined by the INSTRUCTION code (6 bits). Similarly, if a function is performed via
the machine’s keyboard, then the machine sends the appropriate INSTRUCTION code. The instruction codes are defined
according to the table below.
2
nd
BYTE: Bit 7 – Defined as 1
Bit 6 – “REQUEST BIT”: 0 – normal operation
1 – requests the PIP to send current data to the PC
Bit 5 to Bit 0 (BYTE2
5…..
BYTE2
0
) – 2
nd
byte (6 bits)
If the request bit is set, then the PIP will reply by sending the data related to this instruction to the PC. If not set, then the PIP
performs the instruction and replies by returning the same 4 bytes (except for the DESTINATION BIT).
3
rd
BYTE: Bit 7 – Defined as 1
Bit 6 to Bit 0 (BYTE3
6…..
BYTE3
0
) – 7 bits of BYTE3 (BYTE3
7
is in LAST byte)
4
th
BYTE: Defined as 0x88 (ie. 88hex) for BYTE3
7
= 0; or 0xc8 for BYTE3
7
= 1
1 VER-0.1