4.2.1 MCC SMPS Library Configuration for Open Loop with Current Limit

The following instructions show how to setup the peripherals of the CIP Hybrid Power Starter Kit to be able to operate in Open Loop with Current Limit 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 “OpenLoopCurrentLimit”.
  3. Open MCC. Save the MCC configuration as OpenLoopCurrentLimit.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 CIP Blocks, double click on ModulatorBlockPCMC. This action will move the selected module to the Project Resources area.
  6. In the Project Resources area, click the ModulatorBlockPCMC. Go to the Configuration tab, under Hardware Settings, change the switching frequency to 500 kHz, and the duty cycle to 50%. Uncheck Standalone Open Loop PWM.
    Figure 4-13. Hardware Settings for Open Loop with Current Limit
  7. Under the Ramp Generator Settings, add slope compensation ramp of 2 V/us and use FVR_buffer2 as the DC offset.
    Figure 4-14. Ramp Generator Settings for Open Loop with Current Limit
  8. Under the Comparator Settings, select PRG3 as the positive input of the comparator.
    Figure 4-15. Comparator Settings for Open Loop with Current Limit
  9. 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-16. Complementary Output Generator Settings for Open Loop with Current Limit
  10. Select PRG3, CMP8, COG4, PWM11 and FVR on the Sub-Module Selection and Upload All button. Check if all the peripherals have been correctly added to the Project Resources area.
    Figure 4-17. Sub-Module Selection for Open Loop with Current Limit
  11. Go to Pin Manager: Grid View. Select RD5 as output pin for signal OUT_H, RD4 as output pin for signal OUT_L and RD3 as input pin for feedback signal CS.
    Figure 4-18. Pin Manager Selection for Open Loop with Current Limit
  12. Click Generate button to generate the code. Program the PIC16F1779 device on the CIP Hybrid Power Starter Kit by clicking the “Make and Program Device Main Project” icon.
  13. 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.
  14. The CIP Hybrid Power Starter Kit can now be tested for Open Loop with Current Limit operation and will immediately start to generate the PWM output signals driving the synchronous buck converter.