2.1.4 Adding Harmony Modules to Project

  1. In MCC Project Graph window, expand the Device Resource pane by clicking on its button on the left of Project Graph.
    Figure 2-6. Device Resource Pane
  2. Look for PIC32CXMTG-EK Component under SHD category and Add it using the Green Plus sign.
    Figure 2-7. Add PIC32CXMTG-EK Component
  3. This automatically triggers the activation of Core component. Click Yes to activate it.
    Figure 2-8. Core Component Auto Activation
  4. FreeRTOS component can also be activated (it is offered), but in our case it is not needed, so click No when prompted.
  5. Time Component.
    1. Navigate to System Services and add TIME component by clicking on the Green Plus sign.
      Figure 2-9. Add Time Component
    2. Right-click on TMR dependency and select Available Satisfiers>TC0 (tc0).
      Figure 2-10. Select TC0 for TMR
    3. Modify Clock Source on TC0 component, as there is no need for accuracy in this project.
      Figure 2-11. Modify Clock Source on TC0
  6. On PIC32CXMTG-EK Main Board Component, select PL460-EK v5 (G3 MAC RT) to be connected to Xplained Pro Connector.
    Figure 2-12. Select PL460-EK v5 on Xplained Pro Connector
  7. This automatically adds, and configures the following components:
    • G3 MAC RT Driver
    • FLEXCOM5
    • PLC PVDD Monitor
    • ADC
  8. Most of these components are auto-configured by PIC32CXMTG-EK component when components are auto-activated. Only ADC has to be manually configured to set its prescaler and enable an interrupt, as shown in the following figure.
    Figure 2-13. ADC Manual Configuration
  9. On G3 MAC RT Component, right-click on PCOUP Dependency and select PLC PHY Coupling from Available Satisfiers.
    Figure 2-14. Add PLC PHY Coupling
  10. Add TRNG component from Peripherals section. This will be used in this example for Random Number generation.
    Figure 2-15. Add TRNG Component
  11. Finally, on PIC32CXMTG-EK Component, enable the use of LEDs and User Button.
    Figure 2-16. Enable LEDs and Button on PIC32CXMTG-EK