Jump to main content

# 2.2.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-40.Device Resource Pane
2. Look for PIC32CXMTSH-DB component under SHD category and add it using the Green Plus sign.
   Figure 2-41.Add PIC32CXMTSH-DB Component
3. This automatically triggers the activation of Core component. Click Yes to activate it.
   Figure 2-42.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-43.Add Time Component
   2. Right-click on TMR dependency and select Available Satisfiers>TC0 (tc0).
      Figure 2-44.Select TC0 for TMR
   3. Modify Clock Source on TC0 component, as there is no need for accuracy in this project.
      Figure 2-45.Modify Clock Source on TC0
6. On PIC32CXMTSH-DB Main Board component, select PL460-EK v5 (G3 MAC RT) to be connected to Xplained Pro Connector.
   Figure 2-46.Select PL460-EK v5 on Xplained Pro Connector
7. This automatically adds, and configures the following components:
   - G3 MAC RT Driver
   - FLEXCOM1
   - PLC PVDD Monitor
   - ADC
8. Most of these components are auto-configured by PIC32CXMTSH-DB 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-47.ADC Manual Configuration
9. On G3 MAC RT component, right-click on PCOUP dependency and select PLC PHY Coupling from Available Satisfiers.
   Figure 2-48.Add PLC PHY Coupling
10. Add TRNG component from Peripherals section. This will be used in this example for Random Number generation.
    Figure 2-49.Add TRNG Component
11. Finally, on PIC32CXMTSH-DB component, enable the use of Scroll Buttons, Storage interface and Display LCD interface.
    Figure 2-50.Enable Interfaces on PIC32CXMTSH-DB
12. When enabling these interfaces, the following components are automatically activated:
    - QSPI
    - SST26
    - SLCDC Display and Driver
13. The following figure shows the complete Project Graph.
    Figure 2-51.Complete Project Graph

Rev: G