ADC Driver Library for Harmony v2

This module describes the basic architecture of the MPLAB® Harmony ADC Driver Library and provides information and examples on its usage.

Library Overview

The library provides interfaces to support:

  • System Interaction
  • Client Core Functionality

The interface to the ADC Driver Library is defined in the DRV_ADC header file. The library interface routines are divided into various sub-sections that address one of the blocks or the overall operation of the ADC Driver Library.

Section Description
Configuring the Library Provides macros for configuring the system. The system must configure the driver by choosing appropriate configuration options as listed in this section.
System Interaction Provides system module interfaces: device initialization, deinitialization, reinitialization and status functions.
Client Core Configuration Provides interfaces for core functionality of the driver.
Other Functions Provides additional ADC Driver functions.

Abstraction Model

This library provides a low-level abstraction in C language, of the ADC Driver present on Microchip's microcontrollers. The picture below provides a description of how that abstraction is modeled in the software.

adc-driver-model.png

Functions

DRV_ADC_InputsRegister: This function causes the driver to select a set of input registers for sampling.

Example:
DRV_HANDLE handle; // Returned from DRV_ADC_Open
DRV_ADC_InputsRegister (handle, ADC_INPUT_AN2|ADC_INPUT_AN3);

DRV_ADC_SamplesRead, DRV_ADC_SamplesReadLatest: These functions allow reading of the sample from the result buffer.

DRV_ADC_Start: Starts the ADC Driver sampling and converting analog values to digital.

DRV_ADC_Stop: Stops the ADC Driver from sampling and converting analog values to digital.


 Learn More

 
Harmony ADC Tutorial
Learn more >
 
Example Code and Projects
Learn more >
 
Entire ADC Driver Interface
Learn more >
 
ADC Hardware Description
Learn more >
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.