manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets
Table of Contents


Serial Communications Basics




UART Wildcard Hardware

Connecting To Mosaic Controller

Selecting the Module Address

RS422/485 Configuration Jumpers

Protocol Configuration and Direction Control Registers

Modem Handshaking Signals

UART Module Field Header

Cable Connections


Overview of the Software Device Driver Functions

Installing the UART Module Driver Software

Using the Driver Code with C

Using the Driver Code with Forth

UART Direction Control in a Multitasking System


Overview of Glossary Notation

Glossary Quick Reference

Glossary Entries

C Demonstration Program (in pdf)

Forth Demonstration Program (in pdf)

Hardware Schematics (in pdf)

UART Wildcard User Guide

<< Previous | Next>>


Each RS232 driver uses inverting logic and implements a single-ended bipolar output voltage (that is, one signal that swings above and below ground). A logic high at the UART is converted by the RS232 output driver to a voltage between −7 and −12 volts, while a logic low at the UART is converted to a voltage between +7 and +12 volts. The RS232 receiver accepts signals in the range −12 to +12 volts and outputs logic level (0 or 5 volt) signals to the UART circuitry. The RS232 driver and receiver use separate conductors on the serial cables, enabling full duplex communications. Note that the local and the remote must share a common ground, so a minimum of 3 wires are required for full duplex RS232 communications: a transmit wire, a receive wire, and a common ground. As of the time of this writing, more detailed information about the RS232 protocol is available at

Optional RS232 Modem Interface

A modem (modulator/demodulator) provides a way of encoding digital data as a set of audio signals that can be sent over a telephone line. Most modems communicate using RS232 and a set of hardware "handshaking" signals used to regulate data flow. The UART Module implements these optional RS232 modem handshaking signals on channel 1. The handshaking signals can be disabled and/or ignored by applications that do not need them.

Due to hardware constraints, if modem handshaking is needed on UART channel 1, then channel 1 must be configured for RS232, and channel 2 cannot be configured for RS232 communications. These factors are discussed in more detail in the "UART Wildcard Hardware: Modem Handshaking Signals" section below.


Each RS422 driver transmits a differential pair of output signals at 0 and 5 volts. The RS422 receiver converts the differential signal to the 0 to 5 volt logic signal required by the UART circuitry. Because differential signals have inherently better signal-to-noise properties, reliable RS422 communications can be sent over much longer distances compared to RS232. The RS422 driver and receiver use separate differential conductor pairs on the serial cables, enabling full duplex communications. Note that the local and the remote must share a common ground, so a minimum of 5 wires are required for full duplex RS422 communications: two transmit wires, two receive wires, and a common ground.


RS485 is a half duplex version of RS422 that is capable of multi-drop operation. RS485 uses the same differential signaling scheme as RS422, and hence has the same superior signal-to-noise characteristics and range described above. In fact, a single driver chip on the UART Wildcard is used to implement both RS422 and RS485 communications for a given serial channel. In RS485 mode, the RS422 transmit and receive pairs are shorted together with a pair of onboard jumpers as explained in the "UART Wildcard Hardware: RS485 Jumpers" section. Note that the local and the remote must share a common ground, so a minimum of 3 wires are required for half duplex RS485 communications: a pair of transceive wires and a common ground.

Multi-drop RS485

Because a single pair of conductors is used for both transmission and reception, RS485 is useful for "multi-drop" applications in which a "master" communicates with multiple "slave" serial devices, or "nodes".

To avoid contention on the RS485 bus, the application software must assure that only one transmitter is enabled at a time. The master is in charge of designating which receiver is on at any one time. In the simplest scheme, all RS485 transceivers come up in receive mode when the interface is initialized, and each transceiver node has a unique address known to it and the master. A single master can broadcast commands to all the slaves, and can direct commands to an individual slave using its unique address. The master can instruct a single slave to go into transmit mode, and then the master can put itself into receive mode, thereby allowing the master to retrieve data from the slave. After the slave transmission is complete, the slave puts itself back into receive mode so that the master can transmit additional commands. In this manner, data can be exchanged between the master and each slave on the bus.

Care must be taken when changing an RS485 node from transmit mode to receive mode, or visa versa. Characters may be lost if the transmit driver is turned off while pending characters are still being transmitted. To avoid this problem, the software function named RS485_Rcv_When_Xmit_Done that establishes the RS485 receive mode is coded such that it waits until all queued (pending) characters have been transmitted before the driver chip is taken out of transmit mode. Similarly, when establishing the transmit mode, the application software is responsible for ensuring that the RS485 receiver is not disabled until all expected characters have been received.

<< Previous | Next>>

Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation