Demand Peripherals     Robotics and Automation Made Easy

SEROUT: Quad/Octal Low Speed Serial Output

The SEROUT4 and SEROUT8 peripherals gives you four or eight channels of low speed serial output at between 2400 and 38400 baud and with between one and four stop bits. Data is sent with 8 data bits and no parity.

Each serial port in the FPGA has a buffer size of 32 bytes. The driver has an additional buffer of 256 bytes for each port. No characters are written info the buffer if writing to it would cause an overflow. An error is returned on buffer overflow.

FPGA resource constraints limit the total number of SEROUT peripherals to three, for a maximum of as many as 24 serial output lines.

 

Hardware:

The SEROUT4 and SEROUT8 peripherals are often paired with general purpose IO cards. SEROUT4 and SEROUT8 work with any of the following cards:
     GPIO with pin headers
     GPIO with screw terminals

 

Resources:

config : Baud rate and number of stop bits
Baud rate as one of 38400, 19200, 9600, 4800, or 2400, followed by the number of stop bits in the range of 1 to 4. All generated baud rates are within 0.2 percent of the target rate. All ports share this configuration.

text : Characters to send to a port.
Specify the port and the ASCII printable character to send.

hex : Characters to send as 8 bit hex values.
Specify the port and the hexadecimal values to send. This resource is useful to send control characters to the port.

 

Examples:

Configure the ports to 2400 baud and 2 stop bits. Then send the string "Hello World!" to port 7.

    pcset serout8 config 19200 2
    pcset serout8 text 7 Hello world!
    pcset serout8 hex 7 0d 0a

Hello world! at 2400 baud ....

 

Later releases of this peripheral may include parity, the use of TCP ports for sending raw characters (with one TCP port per serial output port), or the addition of a 16 port version. Please let Demand Peripherals know if any of these features are critical to your application.