Step 6: Test Application

Step 6.1: Run PAC1934 Sample Applications

1

Running the Python Demo Application

1. Navigate to the Python directory:

# cd ~/python

2. Run the Python demo application by executing the command below:

# python demo.py

You should see the output shown in the following screenshot after executing the command above. You should also observe the OLED W Click display the PAC1934 demo logo during initialization.

Picture95.png
Picture96a.jpg

After initialization, your terminal should look like the screenshot below:

python-terminal_display.png
  • The Python demo uses VT Commands to manipulate the cursor position on the terminal
  • If you encounter an issue where the terminal output looks jumbled, try maximizing the terminal window and/or the VirtualBox window on your host machine

The OLED W Click display should look like the picture below:

python-oled_display.png

3. Press the USER button on the SOM1-EK to change the PAC1934 channel displayed on the OLED W Click.

4. To end the demo, press Ctrl+C.

2

Running the C Demo Application

1. Run the C demo application by executing the command below:

# /root/pac193x_sample_application

You should see the output shown in the following screenshot after executing the command above. You should also observe the OLED W Click display the PAC1934 demo logo during initialization.

Picture99.png
Picture100a.jpg

After initialization of the C demo application, your terminal should look like the screenshot below:

c-demo-terminal-display.png
  • The C demo also uses VT Commands to manipulate the cursor position on the terminal
  • If you encounter an issue where the terminal output looks jumbled, try maximizing the terminal window and/or the VirtualBox window on your host machine

The OLED W Click display should look like the picture below:

c-demo-oled-display.png

2. Press the USER button to change the PAC1934 channel displayed on the OLED W Click.
3. To end the demo, press Ctrl+C.

Conclusions

This tutorial provided you with training for configuring a PAC1934 Integrated Circuit (IC) to continuously monitor key meter parameters using the PAC1934 Linux® driver in an embedded Linux host. As a next step, you may customize the project to reconfigure the resistor values and display different measurements. The PAC1934 IC is capable of handling up to 32V Vbus voltage and +/- 100 mV differential voltage range. You can also investigate the Application Programming Interfaces (APIs) available in the project source files to add functionality from the sample applications to your own application.


© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.