12
RS-232C Communication (continued)
NOTE
2SHUDWLRQFDQQRWEHJXDUDQWHHGZKHQWKHSURMHFWRUUHFHLYHVDQ
XQGH¿QHGFRPPDQGRUGDWD
3URYLGH DQ LQWHUYDO RI DW OHDVW PV EHWZHHQ WKH UHVSRQVH FRGH DQG DQ\
RWKHUFRGH
7KHSURMHFWRURXWSXWVWHVWGDWDZKHQWKHSRZHUVXSSO\LVVZLWFKHG21DQG
ZKHQWKHODPSLVOLW,JQRUHWKLVGDWD
&RPPDQGVDUHQRWDFFHSWHGGXULQJZDUPXS
3. Response code / Error code
KVKRZVKH[DGHFLPDO
(1) ACK reply : 06h
:KHQWKHSURMHFWRUUHFHLYHVWKH6HW,QFUHPHQW'HFUHPHQWRU([HFXWH
FRPPDQGFRUUHFWO\WKHSURMHFWRUFKDQJHVWKHVHWWLQJGDWDIRUWKHVSHFL¿HG
LWHPE\>7\SH@DQGLWUHWXUQVWKHFRGH
(2) NAK reply : 15h
:KHQWKHSURMHFWRUFDQQRWXQGHUVWDQGWKHUHFHLYHGFRPPDQGWKHSURMHFWRU
UHWXUQVWKHHUURUFRGH
,QVXFKDFDVHFKHFNWKHVHQGLQJFRGHDQGVHQGWKHVDPHFRPPDQGDJDLQ
(3) Error reply : 1Ch + 0000h
:KHQWKHSURMHFWRUFDQQRWH[HFXWHWKHUHFHLYHGFRPPDQGIRUDQ\UHDVRQV
WKHSURMHFWRUUHWXUQVWKHHUURUFRGH
,QVXFKDFDVHFKHFNWKHVHQGLQJFRGHDQGWKHVHWWLQJVWDWXVRIWKHSURMHFWRU
(4) Data reply : 1Dh + xxxxh
:KHQWKHSURMHFWRUUHFHLYHVWKH*(7FRPPDQGFRUUHFWO\WKHSURMHFWRUUHWXUQV
WKHUHVSRQFHFRGHDQGE\WHVRIGDWD