Output Compare Driver Library

This module describes the basic architecture of the MPLAB® Harmony Output Compare (OC) Driver Library and provides information and examples on its use.

Library Overview

The Output Compare Static Driver provides a high-level interface to manage the Output Compare module on the Microchip family of microcontrollers. Through the MPLAB® Harmony Configurator (MHC), this driver provides Application Programming Interfaces (APIs) for the following:

  • Initializing the module
  • Enabling/Disabling the Output Compare Module
  • Starting/Stopping the Output Compare Module
  • Fault checking

Library Interface

This section describes the Application Programming Interface (API) functions of the Output Compare Driver Library.
Function Name Description
DRV_OCn_Disable Disables the Output Compare instance for the specified driver index. 'n' represents the instance of the Comparator driver used
DRV_OCn_Enable Enables the Output Compare for the specified driver index. 'n' represents the instance of the Output Compare driver used
DRV_OCn_FaultHasOccurred Checks if a Fault has occurred for the specified driver index. 'n' represents the instance of the Comparator driver used
DRV_OCn_Initialize Initializes the Comparator instance for the specified driver index. 'n' represents the instance of the Comparator driver used
DRV_OCn_Start Starts the Comparator instance for the specified driver index. 'n' represents the instance of the Comparator driver used
DRV_OCn_Stop Stops the Output Compare instance for the specified driver index. 'n' represents the instance of the Comparator driver used

Only Static implementation is supported for the Output Compare Driver Library.

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.