USB-ISS Multifunction USB Communications Module
Serial Mode - Technical Specification
The USB-ISS has a 30 byte data buffer for serial transmit and a 62 byte buffer for serial receive.
The command format is:
|SERIAL_IO command (0x62)||TxData1||TxData2||TxData3||TxData4||...||TxData n|
Characters sent for transmission are buffered and sent as soon as possible. The
command does not wait for the characters to be transmitted before
The response frame is:
|ACK (0xFF) or NACK (0x00)||TxCount||RxCount||RxData1||RxData2||...||RxData n|
The only reason you will ever get a NACK is if the buffer does not have enough room for the transmit characters. You must wait until there is room in the buffer and then send them again, or better still check there is room in the buffer before you send them. The next two bytes are the number of characters remaining in the transmit buffer (TxCount) and the number of receive characters that follow (RxCount). You should always read these three bytes first. You should next examine the RxCount byte and receive that number of characters. If the RxCount byte is zero then there are no further characters to receive.
It is valid to send the SERIAL_IO command (0x62) on its own, without any Tx characters. That is how you will check for any received characters if you have nothing to transmit. You will get the same response frame as above.