5 Building and Programing the Application

  1. The PIC32CM JH01 Curiosity Nano+ Touch Evaluation Kit supports debugging using an Embedded Debugger (EDBG). Connect the Type-A male to micro-B USB cable to the micro-B USB port on the PIC32CM JH01 Curiosity Nano+ Touch Evaluation Kit and Type-A male to the PC.
    Figure 5-1. Hardware
  2. In the MPLAB X IDE Project Properties window perform these actions:
    1. Under the left Categories navigation box, select Conf: [default].
    2. In the right Configuration properties sheet, select Connected Hardware Tool and Compiler Toolchain.
    Figure 5-2. Project Properties
  3. Click Apply, and then click OK.
  4. To build the project, click on the Clean and Build icon or select Clean and Build Main Project from the drop-down item list and verify that the project builds successfully. At this point, the application code can be implemented.
    Figure 5-3. Clean and Build
  5. Program the application by clicking the highlighted icon below.
    Figure 5-4. Program the Device
  6. After the application builds and completes programming, open the Tera Term tool on the PC. Select the serial port and set the baud rate to 115200.
    Figure 5-5. Selection of Serial Port
  7. Click OK.
  8. Connect the following pins in the PIC32CM JH01 Curiosity Nano+ Touch Evaluation Kit to observe the output as shown in the following figure:
    • PA02 (ADC0) - GND
    • PB08 (ADC2) - GND
    • PA04 (ADC4) - V_EDGE (5V)
    Figure 5-6. Hardware Setup
    Figure 5-7. ADC Output - 1
  9. Connect the following pins to observe the output as shown below:
    • PA02 (ADC0) - GND
    • PB08 (ADC2) - V_EDGE (5V)
    • PA04 (ADC4) - GND
    Figure 5-8. ADC Output - 2