1. Home
  2. Docs
  3. MC-EX-AQ4 | Analog Output Expansion Module
  4. Expansion Module Startup Guide
  5. Run Example Program

Run Example Program

  1. After following Figure 1(a),(b) diagram instructions in Wiring Diagram section. Connect a Analog Output Expansion module in to the 40 pin
    board to board connector in CPU Module (Explained in MC-CPU-CM4-Gx datasheet).
  2. Change the DIP switches for select a chip according to Table 1 in Wiring Diagram section.
  3. Follow the File Manager > Pi > Rpi_Moduler_test path, then open Rpi_Moduler_test folder.
  4. In Rpi_Moduler_test folder include example program for every expansion module.
  5. Select the MC_EX_Aout_10volt.py example program that matches with the Analog Outputs expansion module shown in Figure 1.
Figure 1: The example programs for expansion modules.
  1. Change the GPIO pin number in MC_EX_Aout_10volt.py file line 85 according to selected chip according to Figure 2(a), (b) shows below
    (Refer Table 1 Wiring Diagram section for get GPIO pin number).
Figure 2(a): Chip Select configuration
Figure 2(b): Chip Select GPIO.

7. The python program will open on default Thonny Python IDE. Click RUN for start the program shown in Figure 3.

Figure 3: Analog Output example code run on Thonny Python IDE.
Was this article helpful to you? Yes No

How can we help?