4.1.1 MCC SMPS Library Configuration for Open Loop

The following instructions show how to setup the peripherals of the CIP Hybrid Power Starter Kit to be able to operate in Open Loop 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 “OpenLoop”.
    Figure 4-2. Creating New MPLAB X Standalone Embedded Project
  3. Open MCC. Save the MCC configuration as OpenLoop.mc3.
  4. Change the internal oscillator clock to 8 MHz from the System Module in the Project Resources area. On the Pin Manager, change the package to QFN44.
    Figure 4-3. System Module Settings
  5. Go to the Device Resources area, click SMPS Power Controllers and expand CIP Blocks, double click on ModulatorBlockPCMC. This action will move the selected module to the Project Resources area.
    Figure 4-4. ModulatorBlockPCMC
  6. In the Project Resources area, click the ModulatorBlockPCMC. On the Configuration tab, under Hardware Settings, select Half-Bridge mode. Change the switching frequency to 500 kHz, and the duty cycle to 20%. Check Standalone Open Loop PWM.
    Figure 4-5. Hardware Settings for Open Loop
  7. Under the Complementary Output Generator Settings, change rising dead time to 50 ns, falling dead time to 40 ns, and blanking time to 250 ns.
    Figure 4-6. Complementary Output Generator Settings for Open Loop
  8. Select COG4 and PWM11 in the Sub-Module Selection and click the Upload button. Check if COG4 and PWM11 have been correctly added to the Project Resources area.
    Figure 4-7. Sub-Module Selection for Open Loop
  9. Go to the Pin Manager: Grid View. Search for the Modulator section. Select RD5 as the output pin for signal OUT_H and RD4 as the output pin for signal OUT_L.
    Figure 4-8. Pin Manager Selection for Open Loop
  10. Click the Generate button from Project Resources area to generate the code.
  11. Program the PIC16F1779 device on the CIP Hybrid Power Starter Kit by clicking the “Make and Program Device Main Project” icon.
    Figure 4-9. Generating Code Button and Programming
  12. Alternatively, the user can also download the Open Loop 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.
    Figure 4-10. Drag and Drop Method for Programming the Device
  13. The CIP Hybrid Power Starter Kit can now be tested for Open Loop operation and will immediately start to generate the PWM output signals driving the synchronous buck converter.