-
Notifications
You must be signed in to change notification settings - Fork 1
02.06 MIC 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.
The test involves connecting the Digital Output (
Understanding the Open-Drain Output
The MIC-733AO's Digital Output (
-
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
|
| Figure — Open-Drain Design |
|---|
Software Preparation
Before testing, you need to set up the software environment and compile the test utility.
-
Install Library: Open a terminal and run the following commands to update your package list and install the required
libgpiodlibrary:$sudo apt-get update$sudo apt-get install libgpiod-dev
-
Compile Test Code:
- Unpack the
Jetpack_6.0_DIO_TEST_MIC-733AO.tar.gzarchive. - Compile the C file inside to create an executable binary named
diotest.
- Unpack the
Testing Procedure
Follow these steps to perform the physical test.
-
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.
-
Short the pins: Connect the
-
Run the Test Program: Execute the compiled program from the terminal using
sudofor the necessary permissions:$sudo ./diotest
-
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.
- Use the running program to toggle the state of the
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.
⚠️ ImportantWhen 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
- 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 |
- 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- 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
- 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 |
- 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- 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.
|
|
|
|
|
|
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