When attached to the IO-204 web gateway, the Serial Smart Board acts as a serial port.
The serial board has a 200 byte FIFO receive buffer. This is necessary because the host web gateway manages so many things as once. It cannot listen solely to a serial board. As data is received from an external serial peripheral, it is placed in the FIFO buffer. Approximately once per second, the host web gateway check the buffer. If there is data in the buffer the web gateway will fetch up to 50 characters of it and pass it along to the ioBridge server. Any remaining data will be grabbed the next time the web gateway checks the buffer one second later. Therefore, regardless of the baud rate set for the serial board, there is only an effective transfer rate of 50 characters per second on in-bound serial data. Obviously this is a large throughput by today’s standards. But the serial board is meant for serial based sensors and interfacing with microcontrollers where the individual message lengths are short.
On the transmit side of things (serial data being sent from the serial board), there is no buffer involved. Data received by the web gateway and passed along to the serial board is transmitted immediately. However, the out-bound messages still must be 50 characters or less.
- +5V – Power
- TX – Serial transmit
- RX – Serial receive
- RTS – Ready-To-Send (goes low when RX buffer is full)
- GND – Ground (must be connected to the ground of external circuit)
This serial board is capable of serial communication with the following settings only.
8 Data Bits
1 Stop Bit
Inverted or Non-inverted signal polarity
Baudrates: 1200, 2400, 4800, 9600, 19200
Pacing is a setting available on the Module (Web Gateway) configuration page under the I/O channel for which the serial board is attached. This value sets the number of milliseconds to wait between the transmission of individual bytes from the serial board. For example, if pacing is set to 500 and the character sequence “AB” is sent to the serial board for transmission, there will be a 500ms delay between the “A” and the “B” as they are sent from the TX pin. The purpose of pacing to allow a microcontroller time to process each byte of data and then resume listening for the next byte.
The serial board operates naively on TTL voltage levels, 0v/5v. However, the RX pin will accept other voltage levels, such as 0v/3v and RS-232 levels of -10v/+10v. Be sure that the external circuit is capable of receiving 5v from the TX pin as that voltage is not adjustable.
RTS, short for Ready-To-Send, Indicates the condition of the 200 byte receive buffer. If the buffer is capable of receiving additional bytes of data, the RTS will be high (5v). If the buffer fills completely with 200 bytes, the RTS line will go low (0v). At this point any additional bytes received through the RX pin of the serial board will be lost. As the data bytes are removed from the buffer by the web gateway, the buffer will again be free to receive more data and the RTS line will go high.
Serial Smart Boards can be linked to create a “virtual serial cable” that spans the globe. The two serial boards must be attached to web gatewayss under the same user account. To create a serial link, go to Actions and clink Create Action. There you can choose Serial Link select the proper web gateway information.
By default, a two-way serial link is created between the serial boards. However, if only one-way communication is needed, the appropriate entry can be removed from the the Actions table.
The following widgets are available under the Create Widget menu.
Send Serial Message (Fixed Message) – used to send a fixed character sequence from a web based widget
Send Serial Message (Variable Message) – used to create a text box for sending custom serial messages
Serial Monitor (Real-time) – used to monitor the data being received into the serial board
Encoding Special Characters
To encode special characters that cannot normally be typed into the browser, use URL encoding. For example, To include a carriage return and line feed in a serial message use %0D%0A. A complete list of URL character codes can be found here: