Table of Contents

Advertisement

The Host

This section describes the requirements specific to the host.
Transmitting Data
The host only transmits after receiving permission from the decoder. There is no limit to the number of characters per transmit.
However, the maximum character-to-character delay cannot exceed the Host Intercharacter Time-out parameter. The HOST RTS signal
must return to inactive at the end of transmission (unless the host wants to temporarily prevent the decoder from transmitting).
If the transmit procedure fails, the host must wait for some randomly generated time period before trying again.
Sample Code for Host Transmit Procedure
boolean host_transmit()
request permission to send
WHILE (the last character has not been sent) DO
set up serial response time out
WHILE (permission has not been granted) DO
IF (serial response time out expired) THEN
remove request to send /* transmit failed */
RETURN (FALSE) /* calling function may retry transmit */
END
END
transmit a character
END
remove request to send
RETURN (TRUE) /* transmit successful */
Receiving Data
The host must be ready to receive data from the decoder anytime the host is not transmitting. The host can temporarily prevent the
decoder from transmitting by using the Host RTS line.
Sample Code for Host Receive Procedure
void host_receive()
IF (a character has been received) THEN
set up intercharacter time out
WHILE (not timed out AND not the last character) DO
IF (host can receive right now) THEN
deassert host RTS /* in case host was holding off decoder */
IF (a character was received) THEN
reset intercharacter time out
END
ELSE
IF (host wants to send to decoder) THEN
RETURN /* so host can transmit */
ELSE
request to send /* to hold off the decoder */
set up new intercharacter time-out
END
END
END
process received message and prepare response
RETURN
END
RETURN
Serial Interface Specification A-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Se-955

Table of Contents