Skip to main content

Serial Port Timing

Data to be sent out over the serial port to an attached radio must observe various timing constraints in order to be successfully received at a remote node. These relations can be seen in the following figure:

Serial Port Timing Diagram

When a station has data to transmit, it must assert PTT (via RTS). The station waits for acknowledgment that the radio is ready to accept data, which may be indicated by the radio asserting CTS, the radio providing CLK, or there may be no indication. The sending station must wait for the Cts2Data time (specified in milliseconds) after CTS is received before attempting to send any data. If the radio does not provide CTS in response to RTS, CTS is assumed to occur simultaneously with the asserting of RTS, and therefore, the Cts2Data period begins when RTS is asserted. A typical value for Cts2data is 500 msec, but it varies depending on the communications hardware in use. Once the Cts2Data period has elapsed, the station sends out a sequence of zero or more pre-pad characters. These characters may be repeated occurrences of a single character, a rotating set of characters, or any other characters as necessary, as long as the sequence does not include the sync sequence discussed in the section "Bit Framing". Once the pre-pad characters have been sent, one or more messages may be concatenated and sent. Zero or more bits of filler data may be inserted between the messages, with message boundaries being demarcated as discussed in the "Bit Framing" section. Multiple messages may be concatenated until the total transmission time reaches MaxTxTime, which is specified in milliseconds. MaxTxTime is measured from when PTT is asserted. MaxTxTime is configurable, with a typical value of 60000 msec.

If RTS is asserted, and no CTS (or clock) is returned within a reasonable time (typically 10000 msec), then RTS is de-asserted, and the cycle begins again.

When there are no more messages to send, or MaxTxTime has elapsed, a sequence of zero or more post-pad characters are sent, subject to the same constraints as the pre-pad characters. Once the post-pad characters have been sent, PTT is held asserted for the time specified in Data2Rts (in milliseconds). Once Data2Rts has elapsed, PTT is released. Data2Rts often has the same value as Cts2Data.

After PTT is released, a sending station may not initiate a new transmission for a period of IdleChannel, which is specified in milliseconds. In addition, a station may not initiate a transmission until TurnAround (specified in milliseconds) has elapsed following any indication of channel activity. This includes receiving any bytes from the serial device, or any other indication provided, such as asserting of the CD line. Typical values for IdleChannel and TurnAround are 3000 msec and 1000 msec, respectively.

Data to be sent over the radio is transmitted least significant bit first. When driving a radio via a synchronous connection, there are no character framing bits. Each byte is transmitted as exactly 8 bits. As a consequence, when a transmission begins, there must be a continuous, uninterrupted flow of bytes out the port; any pauses will be interpreted as extra data bits inserted in the middle of the message, which will corrupt the data.

For example if the two bytes 0x12 and 0x34 are to be sent out, the bit sequence seen on the wire will be:


where the bit on the left represents the first bit sent, and time increases to the right.

Data to be received should be shifted in LSb first, and delivered repacked into bytes such that the most significant bit of the ith byte was received immediately before the least significant bit of the (i+1)th byte.

All example byte sequences in this document assume this data packing convention.

Data that is sent via an asynchronous connection (typically to a radio, null modem, or other asynchronous device) is sent with the appropriate number of start and stop bits, as required by the asynchronous device in use.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.