Using Harmony v2 to Control Output Compare
There are two ways to control the Output Compare (OC) module in Harmony:
- Static Implementation (Output Compare Driver Library)
- Output Compare Peripheral Library (PLIB)
Other Functions
Below are the functions that affect the operations of the output compare:
Function Name | Descriptions |
---|---|
PLIB_DEVCON_AlternateClockDisable | Disables the alternate clock source for Input Capture (IC) or OC. The primary clock source will be used instead. |
PLIB_DEVCON_AlternateClockEnable | Selects the alternate clock source for IC or OC. |
DEVCON_ALT_CLOCK_TARGET | Selects IC or OC. |
ADCP_TRG_SRC_OCMP1, 3, and 5 | OC 1, 3, and 5 (OCMP 1, 3, and 5) selected as the trigger source. |
ADCP_SCAN_TRG_SRC_OCMP1, 3, and 5 | OC 1, 3, and 5 (OCMP 1, 3, and 5) selected as scan trigger source. |
Please refer to "Output Compare Peripheral Library for Harmony v2" to learn how to manage the OC using PLIB.