MCC Generated Code

To generate this project using MPLAB Code Configurator (MCC), follow the next steps:

  1. 1.Create a new MPLAB X IDE project for PIC18F47Q10.
  2. 2.Open MCC from the toolbar (more information about how to install the MCC plug-in can be found here).
  3. 3.Go to Project Resources → System → System Module and make the following configurations:
    • Oscillator Select: HFINTOSC
    • HF Internal Clock: 1 MHz
    • Clock Divider: 1
    • In the Watchdog Timer Enable field in the WWDT tab, WDT Disabled has to be selected
    • In the Programming tab, Low-Voltage Programming Enable has to be checked
  4. 4.From the Device Resources window, add TMR0 and make the following configurations:

    Timer0 Configuration:

    • Enable Timer: checked
    • Timer Clock tab
      • Clock Source: LFINTOSC
      • Clock Prescaler: 1:1
      • Postscaler: 1:1
      • Timer mode: 8-bit
      • Enable Synchronization: unchecked
    • Timer period: 4 ms
    • Enable Timer Interrupt: unchecked
  5. 5. Open Pin Manager → Grid View window and select UQFN40 in the MCU package field and make the following pin configuration:
    • Set Port C pin 2 (RE0) as output
    Figure 1. Pin Mapping
  6. 6.Click Generate in the Project Resources tab.