The Microchip videos are here

To view the Code Configurator, press the blue ‘MCC’ button on the toolbar.

Project resources panel – shows all of the existing things being setup by the code configurator.

Adding a new peripheral to code configurator

In the ‘Device Resources’ panel double click the peripheral to all.

A page for it opens and it is added to the ‘Project Resources’ panel.

Generating The Code

‘Project Resources’ panel > ‘Generate’ button.

If you get a “Configuration has warnings” message you can see them in the ‘Notifications [MCC]’ panel of the output window.

Once generated, when you view your project files you will have:

main.c

Has the main() function with calls to the necessary initialise code it has generated.

If you have your own main() function then rename it to say ap_main() and call it from here.

MCC Generated Files

These folders will have been added to your ‘Source Files’ and ‘Header Files’ folders.  In here you will find all the code the code configurator has created as well as example functions you can call to use the peripherals you’ve setup.

Include the header files you want to use

#include "mcc_generated_files/adc.h"
UK Electronic Designer
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.