4.3.1 MCC SMPS Library Configuration for PCMC Closed Loop

The following instructions show how to setup the peripherals of the CIP Hybrid Power Starter Kit to be able to operate in PCMC test mode.

  1. Open MPLAB X. Connect the CIP Hybrid Power Starter Kit to the computer through an on-board debugger USB port using a conventional micro-USB cable. MPLAB X will detect the CIP Hybrid Power Starter Kit and an Xplained Window appears that provides relevant information about the board.
  2. Create new Standalone Project in MPLAB X. Select the PIC16F1779 device. Select the CIP Hybrid Starter Kit as programming tool. Name this project “PCMC”.
  3. Open MCC. Save the MCC configuration as PCMC.mc3.
  4. In the Project Resources area, change the internal oscillator clock to 8 MHz from the System Module. On the Pin Manager, change the package to QFN44.
  5. Go to the Device Resources area, click SMPS Power Controllers and expand Power Supply Topologies, double click on SyncBuck. This action will move the SyncBuck to the Project Resources area.
    Figure 4-21. Selecting SyncBuck from Device Resources
  6. In the Project Resources area, click on SyncBuck. On the Configuration tab, under Hardware Settings, select PCMC as the control mode. Change the switching frequency to 500 kHz, the duty cycle to 90%, reference voltage to 2.5V, leading edge blanking to 250 ns, rising edge dead time to 50 ns, and falling edge dead time to 40 ns. Choose PWM Controller Block 3.
  7. Click the Upload All button. This action will load all the peripherals of the PWM Controller Block 3 on the Project Resources area.
    Figure 4-22. Hardware Settings for PCMC Synchronous Buck Converter
  8. Add slope compensation of 0.3 V/us.
    Figure 4-23. Slope Compensation for PCMC Synchronous Buck Converter
  9. Go to the Pin Manager: Grid View. Assign RD3 as input pin for CS, RC6 as output pin for signal EA_OUT, RC7 as input pin for signal FB, RD5 as output pin for signal OUT_H, and RD4 as output pin for signal OUT_L.
    Figure 4-24. Pin Assignments for PCMC Synchronous Buck Converter
  10. Soft start is enabled by default on the PCMC Control Mode section.
    Figure 4-25. Enabling Soft Start in PCMC Synchronous Buck Converter
  11. Enabling soft start disables the COG, PWM and OPA peripherals at power on.
    Figure 4-26. COG, PWM and OPA Disabled Initially for Soft Start
  12. Click Generate button to generate the code. On the main.c, add the following line of code, PCMC_SoftStart();.
    Figure 4-27. Inserting ‘PCMC_SoftStart()’ function inside main.c
  13. Program the PIC16F1779 device on the CIP Hybrid Power Starter Kit by clicking the ”Make and Program Device Main Project” icon.
  14. Alternatively, the user can also download the PCMC firmware to the CIP Hybrid Power Starter Kit by dragging the generated .hex file of the project to the CURIOSITY drive. The .hex file is located on the --dist\default\production folder.
  15. The board is now configured for PCMC-CS operation.