4.1 MCC Generated Code
To generate this project using MPLAB Code Configurator (MCC), follow the next steps:
- Create a new MPLAB X IDE project for PIC18F47Q10.
- Open MCC from the toolbar (more information about how to install the MCC plug-in can be found here).
- 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
- 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
- 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
- Click Generate in the Project Resources tab.