PT600 Transmissions Packet
Transmission Format
Terminal Data
STX <data> CS1 CS2 ETX
Terminal No Data
EOT
Terminal response
STX CMD <parameters> CS1 CS2 ETX
Acknowledgement
ACK
Negative ACK
NAK
Data Conversion Rules in Packet
1) One-byte data converted to two-byte data:
\
convert to
\\
00 hex -- 1F hex convert to
\ 80 hex -- \ 9F hex
A0 hex -- FF hex convert to
\ 20 hex -- \ 7F hex
(excluding DC hex)
2) One-byte data transmitted as original data without converting:
all codes not in 1)
(including DC hex)
Data Checksum Calculation in Packet
1) CS =[sum of all characters (excluding STX and ETX) + packet
length (excluding STX and ADDR/ETX)] MOD 256
2) CS1 = high nibble of CS + 40H
3) CS2 = low nibble of CS + 40H
Example packet of command to send the file named A.EXE to PT600 with address
‘A’
Packet:
STX ESC CMD <parameters> CS1 CS2 ADDR
CMD
= ‘L’
<parameters>
= “A . E X E “
Packet length
= total characters of ESC, CMD and
<parameters> = 7
ADDR
= ‘A’ + 80H = C1H
CS = [(ESC+‘L’+‘A’+’.’+’E’+’X’+’E’+ADDR)+Packet
length]
MOD 256
= [(1BH+4CH+41H+2EH+45H+58H+45H+C1H)+7] MOD 256
= 80H
Summary of Contents for PT600
Page 1: ...PT600 Portable Terminal Programming Reference Guide Document number 3506000120...
Page 7: ......
Page 16: ......
Page 20: ...regs h bh 5 regs h al unsigned char type regs h bl unsigned char status int86 0x21 regs regs...
Page 57: ......
Page 66: ...Host Command STX ESC CMD parameters CS1 CS2 ADDR Acknowledgement ACK Negative ACK NAK...