User's Manual

http://www.woosim.com
75
7 Introduction of Protocol IrDA
7.1. Frame structure
SOF : Start of frame (SOF code must be 0xC0)
TOF : Type of frame (See the table shown below)
EOF : End of frame (EOF code must be 0xC1)
CHECKSUM : Checksum is necessary in case of the TOF code is 0x44.
DATA : Data is in need of the TOF code is 0x44, 0x05, 0x53.
1. If the code (0xC0, 0xC1, 0x7D) is included on sending data, first insert 0x7D code, then
operate XOR with that code and 0x20.
Example : In case the send data is 0x20 0x7D 0xC1, the sending data will be 0x20 0x7D 0x5D
0x7D 0xE1.
Note : The bolded character is inserted data.
And the underlined character is the data operated XOR with 0x20.
2. If the code 0x7D is included on receiving, first remove 0x7D code, then operate XOR with
next code and 0x20.
Example : In case the received data is 0x20 0x7D 0x5D 0x7D 0xE1, the real data will be 0x20
0x7D 0xC1.
SOF
TOF
DATA
CHECKSUM
EOF
Type of frame Code
Data
ACK 0x06
X
NACK 0x15
X
ENQ 0x05
O
Print data 0x44
O
Require printer status
0x53
O
Response printer status
0x51
X
EOT 0x04
X