RS-485

Several of the SNAP demonstration boards include an RS-232 serial port. The board provides the actual connector (a DE-9, sometimes referred to as a DB-9) and the actual RS-232 line driver. SNAP engine UARTS only provide a logic level serial interface (3-volt logic).

RS-422 and RS-485 are alternate hardware standards that can be interfaced to by using the appropriate line driver chips. In general, the SNAP engine does not care what kind of serial hardware it is communicating over.

Some types of multi-drop serial hardware are an exception. For these, multiple devices are able to share a single serial connection by providing a special hardware signal called TXENA (transmit enable). Normally, none of the connected devices are asserting their TXENA signals. When a device wants to transmit, it first asserts TXENA. After all of the characters have been shifted out the serial port, the transmitting device deasserts TXENA so that another device can use the connection.

The following example of three devices sharing a multi-drop RS-485 bus may make this clearer. You will also notice that the TXENA signal is active low:

Device #1 TXENA --_____----------_____------------------------------------
Device #1 TX    ---CMD------------CMD-------------------------------------
Device #2 TXENA ----------_____-------------------------------------------
Device #2 TX    -----------RSP--------------------------------------------
Device #3 TXENA ------------------------_____-----------------------------
Device #3 TX    -------------------------RSP------------------------------

SNAP can interface to this type of hardware (SNAP can provide the needed TXENA signal). The TXENA signal is output on the pin normally used for Clear To Send (CTS).

The functionality of the CTS pin is controlled by the SNAPpy built-in function flowControl().