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.
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
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.
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.