Skip to content

02.06 MIC 733

chunyu1021 edited this page Sep 19, 2025 · 10 revisions

2.6SpacerMIC-733

This page provides the official documentation and software packages for testing the Digital I/O (DI/DO) and COM port functionality on the MIC-733. These resources contain the necessary guides to understand the hardware, obtain the correct test software, and perform the procedures successfully.

MIC-733 Digital I/O (DI/DO)     

The test involves connecting the Digital Output ($DO$) to the Digital Input ($DI$), running a test program to change the $DO$ state, and reading the $DI$ to verify it changes accordingly. A key aspect of this hardware is its "open-drain" output design, which requires an external pull-up resistor for proper operation.

Understanding the Open-Drain Output

The MIC-733AO's Digital Output ($DO$) is an open-drain design. This is important for setting up the test correctly.

  • To set the output LOW: The device connects the $DO$ pin internally to Ground (Gnd).
  • To set the output HIGH: The device doesn't drive a voltage. Instead, the pin is left "floating" in a high-impedance state.

Because of this, you must add an external pull-up resistor that connects the $DO$ pin to a voltage source (e.g., 3V). This resistor is what actually pulls the signal line to a HIGH voltage level when the output is floating.

OPEN_DRAIN
Figure — Open-Drain Design

Software Preparation

Before testing, you need to set up the software environment and compile the test utility.

  1. Install Library: Open a terminal and run the following commands to update your package list and install the required libgpiod library:
    • $sudo apt-get update
    • $sudo apt-get install libgpiod-dev
  2. Compile Test Code:
    • If you are looking for other versions than Jetpack 6.0, please open an issue in this repo to get technical support.
    • Download Jetpack_6.0_DIO_TEST_MIC-733AO.tar.gz
    • Unpack the Jetpack_6.0_DIO_TEST_MIC-733AO.tar.gz archive.
    • Compile the C file inside to create an executable binary named diotest.

Testing Procedure

Follow these steps to perform the physical test.

  1. Hardware Connection:
    • Short the pins: Connect the $DO_0$ pin directly to the $DI_0$ pin on the MIC-733AO.
    • Add Pull-Up Resistor: Connect a pull-up resistor from the joined $DO_0$/$DI_0$ line to a 3V power source, as shown in the provided diagram.
    • Connect Ground: Ensure the Ground (Gnd) pins are connected between the MIC-733AO and the other device or power source.
  2. Run the Test Program: Execute the compiled program from the terminal using sudo for the necessary permissions:
    • $sudo ./diotest
  3. Verify Functionality:
    • Use the running program to toggle the state of the $DO_0$ pin between HIGH and LOW.
    • As you change the $DO_0$ state, observe the status of the connected $DI_0$ pin. The input status should always match the output status you have set.

MIC-733 COM Port     

This section provides the procedures for testing the onboard COM ports on the MIC-733 for both RS232 and RS485 communication. The testing involves configuring the port mode, connecting the ports for a loopback test, and using a Python script to verify communication.

⚠️ Important

When switching between RS485 and RS232 testing, a system reboot is required between tests to ensure the ports are configured correctly.

Test Utility Download

RS485 Test Procedure

  1. Hardware Connection

For the RS485 loopback test, connect two DB9 connectors as follows:

From COM1 To COM2
Pin 1 Pin 1
Pin 2 Pin 2
Pin 5 Pin 5
  1. Configure COM Port Mode

Open a terminal and execute the following commands to set both COM1 and COM2 to RS485 mode.

sudo chmod 777 /opt/advantech/tools/serial_port.sh
sudo bash /opt/advantech/tools/serial_port.sh rs485 com1
sudo bash /opt/advantech/tools/serial_port.sh rs485 com2
  1. Run the Test Script

Use the serial_test.py script from the SERIAL_TEST_MIC-733AO.tar.gz archive to perform the test. Designate one port as the server (listener) and the other as the client (sender).

  • Device for COM1: /dev/ttyTHS2
  • Device for COM2: /dev/ttyTHS1

Open two separate terminals:

  • In Terminal 1 (COM1 as Server):
    sudo python3 serial_test.py 485 /dev/ttyTHS2
  • In Terminal 2 (COM2 as Client):
    sudo python3 serial_test.py 485 /dev/ttyTHS1 "hello"

The server terminal should receive and display the "hello" message from the client.

RS232 Test Procedure

  1. Hardware Connection

For the RS232 loopback test, connect two DB9 connectors using a null modem configuration:

From COM1 To COM2
Pin 2 Pin 3
Pin 3 Pin 2
Pin 7 Pin 8
Pin 8 Pin 7
  1. Configure COM Port Mode

Open a terminal and execute the following commands to set both COM1 and COM2 to RS232 mode.

sudo chmod 777 /opt/advantech/tools/serial_port.sh
sudo bash /opt/advantech/tools/serial_port.sh rs232 com1
sudo bash /opt/advantech/tools/serial_port.sh rs232 com2
  1. Run the Test Script

Use the same test script as in the RS485 test.

  • Device for COM1: /dev/ttyTHS2
  • Device for COM2: /dev/ttyTHS1

Open two separate terminals:

  • In Terminal 1 (COM1 as Server):
    sudo python3 serial_test.py 232 /dev/ttyTHS2
  • In Terminal 2 (COM2 as Client):
    sudo python3 serial_test.py 232 /dev/ttyTHS1 "hello"

The server terminal should successfully receive and display the message sent from the client.

Wiki contents

Previous page Previous chapter Home Next chapter Next page
   Home

       Welcome to Wiki for MIC AI Series
       What info can be found in the Wiki?

1    BSP Support

   1.1      What's Jetpack BSP?
   1.2      What can be found in BSP folder?
   1.3      Jetpack BSP installation concept
   1.4      Support Jetpack Version
   1.5      MIC-711 Series BSP
   1.6      MIC-713 Series BSP
   1.7      MIC-732 Series BSP
   1.8      MIC-733 Series BSP
   1.9      MIC-742 Series BSP
   1.10      MIC-743 Series BSP
   1.11      MIC-710 Series BSP
   1.12      MIC-712 Series BSP
   1.13      MIC-715 Series BSP
   1.14      MIC-717 Series BSP
   1.15      MIC-720 Series BSP
   1.16      MIC-730 Series BSP

2    I/O Function Support

   2.1      Locating the Correct Package
   2.2      The Test Utility
   2.3      The Guide is Key
   2.4      Support Models
   2.5      MIC-713(S)
   2.6      MIC-733

3    System Clone

   3.1      Introduction
   3.2      General Procedure
   3.3      Prerequisties
   3.4      Support Storage Formats
   3.5      eMMC
   3.6      NVMe

   FAQ
⬇️ End of page

Clone this wiki locally