🛠 Mastering I/O on the BIWCL-PAT

BIOSSTAR BIWCL-PAT: 3.5" Industrial SBC with Intel Wildcat Lake · debutant · Apprenez à utiliser le header DIO 8 bits et les ports série pour interagir avec des périphériques simples.

Objectifs

This tutorial guides you through discovering the Input/Output interfaces of the BIOSTAR BIWCL-PAT industrial board. We will focus on the 8-bit DIO (Digital Input/Output) header and the RS232/422/485 serial ports, essential for automation and sensor reading. By the end of this guide, you will know how to configure pins to send digital signals and communicate via serial port under Ubuntu 24.04.

Matériel nécessaire

Étapes

  1. System Preparation: Ensure your operating system (Ubuntu 24.04 recommended for development) is up to date. Open a terminal and install GPIO control tools if necessary via sudo apt install gpiod-tools.
  1. DIO Pin Identification: The 8-bit DIO header allows control of 8 digital lines. Consult the specific technical documentation for your board revision to identify physical pins corresponding to DIO0 to DIO7 lines. Note that logic levels are generally 3.3V or 5V; check the datasheet to avoid damaging components.

``bash gpiodetect gpioinfo gpiochip0 ` Identify the active line. To set it to high state (1): `bash gpioset gpiochip0 0=1 ``

  1. Configuring an Output: To light a simple LED (with a resistor) or send a high signal, use the gpiod command to export the line. For example, if DIO0 is identified as chip 0, line 0:

``bash echo "Test Serie" > /dev/ttyS0 `` Ensure that the BIOS or driver configuration matches the chosen mode (RS232 is often the default).

  1. Using Serial Ports: The board features 4 serial ports configurable as RS232, 422, or 485. Under Linux, these ports usually appear as /dev/ttyS0 to /dev/ttyS3. To send data via RS232, open the port with a tool like minicom or via command line:

``bash gpioget gpiochip0 1 `` The output will return 0 or 1 depending on the voltage level applied to the pin.

  1. Reading Input: To read a state on a DIO pin configured as input, use gpioget:

Vérification

To validate your configuration, connect an LED (with a 220 to 330 ohm resistor) between a DIO pin and Ground (GND). Execute the gpioset command to set the pin to high state. The LED should light up. For the serial port, connect TX and RX lines in a loop (loopback) if possible, or use another device to receive the "Test Serie" message. Verify that the message is received correctly without garbled characters, confirming proper transmission speed (baud rate) settings.

Pour aller plus loin

Once these basics are mastered, explore the use of more complex industrial protocols like Modbus RTU via RS485 serial ports. You can also test the LVDS output to connect a 1920x1200 industrial screen, or configure the 2.5GbE Ethernet ports for high-speed network communication with other edge computing equipment.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials