4.2.1 Basic ADC

10-bit Basic Analog-to-Digital Converter

4.2.1.1 Introduction

This Analog-to-Digital Converter (ADC) features a 10-bit successive approximation. The device also supports 16 differential voltage input combinations. Two of the differential inputs (ADC1, ADC0 and ADC3, ADC2) are equipped with a programmable gain stage. This provides amplification steps of 0 dB (1x), 20 dB (10x), or 46 dB (200x) on the differential input voltage before the A/D conversion. Seven differential analog input channels share a common negative terminal (ADC1), while any other ADC input can be selected as the positive input terminal. If 1x or 10x gain is used, 8-bit resolution can be expected. If 200x gain is used, 6- bit resolution can be expected. Note that internal references of 1.1V should not be used on 10x and 200x gain.

4.2.1.2 Supported Device Families

ATmega32xx

4.2.1.3 Required header files:

#include "mcc_generated_files/adc/adc[X].h"
Note: Replace [X] with the selected instance of the ADC module.

4.2.1.4 Module Documentation

4.2.1.4.1 ADC

This file contains the API prototypes and other data types for the Analog-to-Digital Converter (ADC) module.

Module description

This file contains the API prototypes and data types for the ADC driver.

This header file provides the type definitions for the ADC module.

Version: ADC Driver Version 2.0.0 ADC Package Version 2.0.0 ADC Driver Version 2.0.0 ADC Module Version 2.0.0
Typedefs
Definitions
Enumerations
Functions

Definition Documentation

ADC_RESOLUTION[1/2]

#define ADC_RESOLUTION 10U

ADC 10-bit resolution value.

CustomName_AutoTriggerDisable[1/2]

#define CustomName_AutoTriggerDisable ADC_AutoTriggerDisable

Defines the Custom Name API mapping for ADC_AutoTriggerDisable.

CustomName_AutoTriggerEnable[1/2]

#define CustomName_AutoTriggerEnable ADC_AutoTriggerEnable

Defines the Custom Name API mapping for ADC_AutoTriggerEnable.

CustomName_AutoTriggerSourceSet[1/2]

#define CustomName_AutoTriggerSourceSet ADC_AutoTriggerSourceSet

Defines the Custom Name API mapping for ADC_AutoTriggerSourceSet.

CustomName_ChannelSelect[1/2]

#define CustomName_ChannelSelect ADC_ChannelSelect

Defines the Custom Name API mapping for ADC_ChannelSelect.

CustomName_ChannelSelectAndConvert[1/2]

#define CustomName_ChannelSelectAndConvert ADC_ChannelSelectAndConvert

Defines the Custom Name API mapping for ADC_ChannelSelectAndConvert.

CustomName_ConversionDoneCallbackRegister[1/2]

#define CustomName_ConversionDoneCallbackRegister ADC_ConversionDoneCallbackRegister

Defines the Custom Name API mapping for ADC_ConversionDoneCallbackRegister.

CustomName_ConversionDoneInterruptDisable

#define CustomName_ConversionDoneInterruptDisable ADC_ConversionDoneInterruptDisable

Defines the Custom Name API mapping for ADC_ConversionDoneInterruptDisable.

CustomName_ConversionDoneInterruptEnable

#define CustomName_ConversionDoneInterruptEnable ADC_ConversionDoneInterruptEnable

Defines the Custom Name API mapping for ADC_ConversionDoneInterruptEnable.

CustomName_ConversionDoneInterruptFlagClear[1/2]

#define CustomName_ConversionDoneInterruptFlagClear ADC_ConversionDoneInterruptFlagClear

Defines the Custom Name API mapping for ADC_ConversionDoneInterruptFlagClear.

CustomName_ConversionResultGet[1/2]

#define CustomName_ConversionResultGet ADC_ConversionResultGet

Defines the Custom Name API mapping for ADC_ConversionResultGet.

CustomName_ConversionStart[1/2]

#define CustomName_ConversionStart ADC_ConversionStart

Defines the Custom Name API mapping for ADC_ConversionStart.

CustomName_Deinitialize[1/2]

#define CustomName_Deinitialize ADC_Deinitialize

Defines the Custom Name API mapping for ADC_Deinitialize.

CustomName_DigitalInputDisable[1/2]

#define CustomName_DigitalInputDisable ADC_DigitalInputDisable

Defines the Custom Name API mapping for ADC_DigitalInputDisable.

CustomName_Disable[1/2]

#define CustomName_Disable ADC_Disable

Defines the Custom Name API mapping for ADC_Disable.

CustomName_Enable[1/2]

#define CustomName_Enable ADC_Enable

Defines the Custom Name API mapping for ADC_Enable.

CustomName_Initialize[1/2]

#define CustomName_Initialize ADC_Initialize

Defines the Custom Name API mapping for ADC_Initialize.

CustomName_IsConversionDone[1/2]

#define CustomName_IsConversionDone ADC_IsConversionDone

Defines the Custom Name API mapping for ADC_IsConversionDone.

CustomName_IsConversionDoneInterruptFlagSet[1/2]

#define CustomName_IsConversionDoneInterruptFlagSet ADC_IsConversionDoneInterruptFlagSet

Defines the Custom Name API mapping for ADC_IsConversionDoneInterruptFlagSet.

CustomName_ResolutionGet[1/2]

#define CustomName_ResolutionGet ADC_ResolutionGet

Defines the Custom Name API mapping for ADC_ResolutionGet.

CustomName_Tasks

#define CustomName_Tasks ADC_Tasks

Defines the Custom Name API mapping for ADC_Tasks.

IO_PA0[1/2]

#define IO_PA0 ADC_CHANNEL_ADC0

Defines the Custom Name pin mapping for channels in adc_channel_t.

Typedef Documentation

adc_result_t

adc_result_t

ADC conversion result type.

Function Documentation

ADC_AutoTriggerDisable()

void ADC_AutoTriggerDisable (void )

Sets the ADC Auto Trigger Enable (ADATE) bit to ‘0’.

Parameters:
None.
Returns:

None.

ADC_AutoTriggerEnable()

void ADC_AutoTriggerEnable (void )

Sets the ADC Auto Trigger Enable (ADATE) bit to ‘1’.

Parameters:
None.
Returns:

None.

ADC_AutoTriggerSourceSet()

void ADC_AutoTriggerSourceSet (adc_trigger_source_t triggerSource)

Sets the auto-trigger source.

Parameters:
triggerSource

Desired auto-trigger source. Refer to the adc_trigger_source_t for the list of available trigger sources.

Returns:

None.

ADC_ChannelSelect()

void ADC_ChannelSelect (adc_channel_t channel)

Sets the channel to use for the ADC conversion.

Parameters:
channel

Desired analog channel. Refer to the adc_channel_t enum for the list of available analog channels.

Returns:

None.

ADC_ChannelSelectAndConvert()

adc_result_t ADC_ChannelSelectAndConvert (adc_channel_t channel)

Starts the conversion and retrieves the result of one conversion on the selected channel.

Parameters:
channel

Desired analog channel. Refer to the adc_channel_t enum for the list of available analog channels.

Returns:

adc_result_t - The result of the conversion

ADC_ConversionDoneCallbackRegister()

void ADC_ConversionDoneCallbackRegister (void(*)(void) callback)

Sets the callback function for the ADC Interrupt Flag (ADIF).

Parameters:
*callback

The pointer to the function to be executed

Returns:

None.

ADC_ConversionDoneInterruptDisable()

void ADC_ConversionDoneInterruptDisable (void )

Sets the ADC Interrupt Enable (ADIE) bit to ‘0’.

Parameters:
None.
Returns:

None.

ADC_ConversionDoneInterruptEnable()

void ADC_ConversionDoneInterruptEnable (void )

Sets the ADC Interrupt Enable (ADIE) bit to ‘1’.

Parameters:
None.
Returns:

None.

ADC_ConversionDoneInterruptFlagClear()

void ADC_ConversionDoneInterruptFlagClear (void )

Clears the ADC Interrupt (ADIF) flag.

Parameters:
None.
Returns:

None.

ADC_ConversionResultGet()

adc_result_t ADC_ConversionResultGet (void )

Retrieves the result of the latest conversion.

Parameters:
None.
Returns:

adc_result_t - The result of the conversion

ADC_ConversionStart()

void ADC_ConversionStart (void )

Starts the ADC conversion on a selected channel.

Precondition:

Select the channel using ADC_ChannelSelect and call ADC_Initialize(void) to initialize the ADC module before using this API.

Parameters:
None.
Returns:

None.

ADC_Deinitialize()

void ADC_Deinitialize (void )

Deinitializes the registers to Power-on Reset values.

Parameters:
None.
Returns:

None.

ADC_DigitalInputDisable()

void ADC_DigitalInputDisable (uint8_t disableValue)

Disables the digital input buffer on the corresponding ADC pin.

Parameters:
disableValue

Value for the disabled digital input

Returns:

None.

ADC_Disable()

void ADC_Disable (void )

Disables the ADC module and the clock by clearing the Enable bit in the ADC Control register.

Parameters:
None.
Returns:

None.

ADC_Enable()

void ADC_Enable (void )

Enables the ADC module and the clock system by setting the Enable bit in the ADC Control register.

Parameters:
None.
Returns:

None.

ADC_Initialize()

void ADC_Initialize (void )

Initializes the registers based on the configurable options in the MPLAB® Code Configurator (MCC) Melody UI for the Analog-to-Digital Converter (ADC) operation.

Parameters:
None.
Returns:

None.

ADC_IsConversionDone()

bool ADC_IsConversionDone (void )

Checks if the A/D conversion is done.

Parameters:
channel

- None.

Return values:
true

- The ADC conversion is done.

false

- The ADC converison is not done.

ADC_IsConversionDoneInterruptFlagSet()

bool ADC_IsConversionDoneInterruptFlagSet (void )

Checks the ADC Interrupt Flag (ADIF) status.

Parameters:
None.
Return values:
True

- ADIF is set

False

- ADIF is not set

ADC_ResolutionGet()

uint8_t ADC_ResolutionGet (void )

Returns the resolution of the ADC module.

Parameters:
None.
Returns:

uint8_t - Resolution value

ADC_Tasks()

void ADC_Tasks (void )

Implements the Tasks routine for the polling implementation.

Parameters:
None.
Returns:

None.

Note:

Ensure this function is invoked inside the service loop to maintain proper execution flow.

Enumeration Type Documentation

adc_channel_t

enum adc_channel_t

All available analog channels for the ADC conversion.

ADC_CHANNEL_ADC0

ADC Single Ended Input pin 0

ADC_CHANNEL_ADC1

ADC Single Ended Input pin 1

ADC_CHANNEL_ADC2

ADC Single Ended Input pin 2

ADC_CHANNEL_ADC3

ADC Single Ended Input pin 3

ADC_CHANNEL_ADC4

ADC Single Ended Input pin 4

ADC_CHANNEL_ADC5

ADC Single Ended Input pin 5

ADC_CHANNEL_ADC6

ADC Single Ended Input pin 6

ADC_CHANNEL_ADC7

ADC Single Ended Input pin 7

ADC_CHANNEL_ADC0_ADC0_10X

ADC Differential Inputs Positive pin 0 Negative pin 0 10x Gain

ADC_CHANNEL_ADC1_ADC0_10X

ADC Differential Inputs Positive pin 1 Negative pin 0 10x Gain

ADC_CHANNEL_ADC0_ADC0_200X

ADC Differential Inputs Positive pin 0 Negative pin 0 200x Gain

ADC_CHANNEL_ADC1_ADC0_200X

ADC Differential Inputs Positive pin 1 Negative pin 0 200x Gain

ADC_CHANNEL_ADC2_ADC2_10X

ADC Differential Inputs Positive pin 2 Negative pin 2 10x Gain

ADC_CHANNEL_ADC3_ADC2_10X

ADC Differential Inputs Positive pin 3 Negative pin 2 10x Gain

ADC_CHANNEL_ADC2_ADC2_200X

ADC Differential Inputs Positive pin 2 Negative pin 2 200x Gain

ADC_CHANNEL_ADC3_ADC2_200X

ADC Differential Inputs Positive pin 3 Negative pin 2 200x Gain

ADC_CHANNEL_ADC0_ADC1_1X

ADC Differential Inputs Positive pin 0 Negative pin 1 1x Gain

ADC_CHANNEL_ADC1_ADC1_1X

ADC Differential Inputs Positive pin 1 Negative pin 1 1x Gain

ADC_CHANNEL_ADC2_ADC1_1X

ADC Differential Inputs Positive pin 2 Negative pin 1 1x Gain

ADC_CHANNEL_ADC3_ADC1_1X

ADC Differential Inputs Positive pin 3 Negative pin 1 1x Gain

ADC_CHANNEL_ADC4_ADC1_1X

ADC Differential Inputs Positive pin 4 Negative pin 1 1x Gain

ADC_CHANNEL_ADC5_ADC1_1X

ADC Differential Inputs Positive pin 5 Negative pin 1 1x Gain

ADC_CHANNEL_ADC6_ADC1_1X

ADC Differential Inputs Positive pin 6 Negative pin 1 1x Gain

ADC_CHANNEL_ADC7_ADC1_1X

ADC Differential Inputs Positive pin 7 Negative pin 1 1x Gain

ADC_CHANNEL_ADC0_ADC2_1X

ADC Differential Inputs Positive pin 0 Negative pin 2 1x Gain

ADC_CHANNEL_ADC1_ADC2_1X

ADC Differential Inputs Positive pin 1 Negative pin 2 1x Gain

ADC_CHANNEL_ADC2_ADC2_1X

ADC Differential Inputs Positive pin 2 Negative pin 2 1x Gain

ADC_CHANNEL_ADC3_ADC2_1X

ADC Differential Inputs Positive pin 3 Negative pin 2 1x Gain

ADC_CHANNEL_ADC4_ADC2_1X

ADC Differential Inputs Positive pin 4 Negative pin 2 1x Gain

ADC_CHANNEL_ADC5_ADC2_1X

ADC Differential Inputs Positive pin 5 Negative pin 2 1x Gain

ADC_CHANNEL_ADC_VBG

Internal Reference (VBG)

ADC_CHANNEL_ADC_GND

0V (GND)

ADC_CHANNEL_ADC0

ADC Single Ended Input pin 0

ADC_CHANNEL_ADC1

ADC Single Ended Input pin 1

ADC_CHANNEL_ADC2

ADC Single Ended Input pin 2

ADC_CHANNEL_ADC3

ADC Single Ended Input pin 3

ADC_CHANNEL_ADC4

ADC Single Ended Input pin 4

ADC_CHANNEL_ADC5

ADC Single Ended Input pin 5

ADC_CHANNEL_ADC6

ADC Single Ended Input pin 6

ADC_CHANNEL_ADC7

ADC Single Ended Input pin 7

ADC_CHANNEL_ADC0_ADC0_10X

ADC Differential Inputs Positive pin 0 Negative pin 0 10x Gain

ADC_CHANNEL_ADC1_ADC0_10X

ADC Differential Inputs Positive pin 1 Negative pin 0 10x Gain

ADC_CHANNEL_ADC0_ADC0_200X

ADC Differential Inputs Positive pin 0 Negative pin 0 200x Gain

ADC_CHANNEL_ADC1_ADC0_200X

ADC Differential Inputs Positive pin 1 Negative pin 0 200x Gain

ADC_CHANNEL_ADC2_ADC2_10X

ADC Differential Inputs Positive pin 2 Negative pin 2 10x Gain

ADC_CHANNEL_ADC3_ADC2_10X

ADC Differential Inputs Positive pin 3 Negative pin 2 10x Gain

ADC_CHANNEL_ADC2_ADC2_200X

ADC Differential Inputs Positive pin 2 Negative pin 2 200x Gain

ADC_CHANNEL_ADC3_ADC2_200X

ADC Differential Inputs Positive pin 3 Negative pin 2 200x Gain

ADC_CHANNEL_ADC0_ADC1_1X

ADC Differential Inputs Positive pin 0 Negative pin 1 1x Gain

ADC_CHANNEL_ADC1_ADC1_1X

ADC Differential Inputs Positive pin 1 Negative pin 1 1x Gain

ADC_CHANNEL_ADC2_ADC1_1X

ADC Differential Inputs Positive pin 2 Negative pin 1 1x Gain

ADC_CHANNEL_ADC3_ADC1_1X

ADC Differential Inputs Positive pin 3 Negative pin 1 1x Gain

ADC_CHANNEL_ADC4_ADC1_1X

ADC Differential Inputs Positive pin 4 Negative pin 1 1x Gain

ADC_CHANNEL_ADC5_ADC1_1X

ADC Differential Inputs Positive pin 5 Negative pin 1 1x Gain

ADC_CHANNEL_ADC6_ADC1_1X

ADC Differential Inputs Positive pin 6 Negative pin 1 1x Gain

ADC_CHANNEL_ADC7_ADC1_1X

ADC Differential Inputs Positive pin 7 Negative pin 1 1x Gain

ADC_CHANNEL_ADC0_ADC2_1X

ADC Differential Inputs Positive pin 0 Negative pin 2 1x Gain

ADC_CHANNEL_ADC1_ADC2_1X

ADC Differential Inputs Positive pin 1 Negative pin 2 1x Gain

ADC_CHANNEL_ADC2_ADC2_1X

ADC Differential Inputs Positive pin 2 Negative pin 2 1x Gain

ADC_CHANNEL_ADC3_ADC2_1X

ADC Differential Inputs Positive pin 3 Negative pin 2 1x Gain

ADC_CHANNEL_ADC4_ADC2_1X

ADC Differential Inputs Positive pin 4 Negative pin 2 1x Gain

ADC_CHANNEL_ADC5_ADC2_1X

ADC Differential Inputs Positive pin 5 Negative pin 2 1x Gain

ADC_CHANNEL_ADC_VBG

Internal Reference (VBG)

ADC_CHANNEL_ADC_GND

0V (GND)

adc_trigger_source_t

enum adc_trigger_source_t

Enumeration for the ADC auto-trigger sources.

ADC_FREE_RUNNING_MODE

Free Running mode

ADC_ANALOG_COMPARATOR

Analog Comparator

ADC_EXTERNAL_INTERRUPT_REQUEST_0

External Interrupt Request 0

ADC_TIMER_COUNTER0_COMPARE_MATCH_A

Timer/Counter0 Compare Match A

ADC_TIMER_COUNTER0_OVERFLOW

Timer/Counter0 Overflow

ADC_TIMER_COUNTER1_COMPARE_MATCH_B

Timer/Counter1 Compare Match B

ADC_TIMER_COUNTER1_OVERFLOW

Timer/Counter1 Overflow

ADC_TIMER_COUNTER1_CAPTURE_EVENT

Timer/Counter1 Capture Event

ADC_FREE_RUNNING_MODE

Free Running mode

ADC_ANALOG_COMPARATOR

Analog Comparator

ADC_EXTERNAL_INTERRUPT_REQUEST_0

External Interrupt Request 0

ADC_TIMER_COUNTER0_COMPARE_MATCH_A

Timer/Counter0 Compare Match A

ADC_TIMER_COUNTER0_OVERFLOW

Timer/Counter0 Overflow

ADC_TIMER_COUNTER1_COMPARE_MATCH_B

Timer/Counter1 Compare Match B

ADC_TIMER_COUNTER1_OVERFLOW

Timer/Counter1 Overflow

ADC_TIMER_COUNTER1_CAPTURE_EVENT

Timer/Counter1 Capture Event

4.2.1.5 File Documentation

4.2.1.5.1 source/Single-Ended_Interrupts/adc.h File Reference

#include "../system/utils/compiler.h"
#include "./adc_types.h"

Functions

Macros

Detailed Description

ADC Generated Driver API Header File

4.2.1.5.2 source/Single-Ended_Tasks/adc.h File Reference

#include "../system/utils/compiler.h"
#include "./adc_types.h"

Functions

Macros

Detailed Description

ADC Generated Driver API Header File

4.2.1.5.3 source/Single-Ended_Interrupts/adc_types.h File Reference

#include <stdint.h>

Typedefs

Enumerations

Detailed Description

ADC Type Definitions Header File

4.2.1.5.4 source/Single-Ended_Tasks/adc_types.h File Reference

#include <stdint.h>

Enumerations

Detailed Description

ADC Type Definitions Header File

Typedef Documentation

adc_result_t

typedef int16_t adc_result_t

Enumeration Type Documentation

adc_channel_t

enum adc_channel_t

ADC_CHANNEL_ADC0

ADC Single Ended Input pin 0

ADC_CHANNEL_ADC1

ADC Single Ended Input pin 1

ADC_CHANNEL_ADC2

ADC Single Ended Input pin 2

ADC_CHANNEL_ADC3

ADC Single Ended Input pin 3

ADC_CHANNEL_ADC4

ADC Single Ended Input pin 4

ADC_CHANNEL_ADC5

ADC Single Ended Input pin 5

ADC_CHANNEL_ADC6

ADC Single Ended Input pin 6

ADC_CHANNEL_ADC7

ADC Single Ended Input pin 7

ADC_CHANNEL_ADC0_ADC0_10X

ADC Differential Inputs Positive pin 0 Negative pin 0 10x Gain

ADC_CHANNEL_ADC1_ADC0_10X

ADC Differential Inputs Positive pin 1 Negative pin 0 10x Gain

ADC_CHANNEL_ADC0_ADC0_200X

ADC Differential Inputs Positive pin 0 Negative pin 0 200x Gain

ADC_CHANNEL_ADC1_ADC0_200X

ADC Differential Inputs Positive pin 1 Negative pin 0 200x Gain

ADC_CHANNEL_ADC2_ADC2_10X

ADC Differential Inputs Positive pin 2 Negative pin 2 10x Gain

ADC_CHANNEL_ADC3_ADC2_10X

ADC Differential Inputs Positive pin 3 Negative pin 2 10x Gain

ADC_CHANNEL_ADC2_ADC2_200X

ADC Differential Inputs Positive pin 2 Negative pin 2 200x Gain

ADC_CHANNEL_ADC3_ADC2_200X

ADC Differential Inputs Positive pin 3 Negative pin 2 200x Gain

ADC_CHANNEL_ADC0_ADC1_1X

ADC Differential Inputs Positive pin 0 Negative pin 1 1x Gain

ADC_CHANNEL_ADC1_ADC1_1X

ADC Differential Inputs Positive pin 1 Negative pin 1 1x Gain

ADC_CHANNEL_ADC2_ADC1_1X

ADC Differential Inputs Positive pin 2 Negative pin 1 1x Gain

ADC_CHANNEL_ADC3_ADC1_1X

ADC Differential Inputs Positive pin 3 Negative pin 1 1x Gain

ADC_CHANNEL_ADC4_ADC1_1X

ADC Differential Inputs Positive pin 4 Negative pin 1 1x Gain

ADC_CHANNEL_ADC5_ADC1_1X

ADC Differential Inputs Positive pin 5 Negative pin 1 1x Gain

ADC_CHANNEL_ADC6_ADC1_1X

ADC Differential Inputs Positive pin 6 Negative pin 1 1x Gain

ADC_CHANNEL_ADC7_ADC1_1X

ADC Differential Inputs Positive pin 7 Negative pin 1 1x Gain

ADC_CHANNEL_ADC0_ADC2_1X

ADC Differential Inputs Positive pin 0 Negative pin 2 1x Gain

ADC_CHANNEL_ADC1_ADC2_1X

ADC Differential Inputs Positive pin 1 Negative pin 2 1x Gain

ADC_CHANNEL_ADC2_ADC2_1X

ADC Differential Inputs Positive pin 2 Negative pin 2 1x Gain

ADC_CHANNEL_ADC3_ADC2_1X

ADC Differential Inputs Positive pin 3 Negative pin 2 1x Gain

ADC_CHANNEL_ADC4_ADC2_1X

ADC Differential Inputs Positive pin 4 Negative pin 2 1x Gain

ADC_CHANNEL_ADC5_ADC2_1X

ADC Differential Inputs Positive pin 5 Negative pin 2 1x Gain

ADC_CHANNEL_ADC_VBG

Internal Reference (VBG)

ADC_CHANNEL_ADC_GND

0V (GND)

ADC_CHANNEL_ADC0

ADC Single Ended Input pin 0

ADC_CHANNEL_ADC1

ADC Single Ended Input pin 1

ADC_CHANNEL_ADC2

ADC Single Ended Input pin 2

ADC_CHANNEL_ADC3

ADC Single Ended Input pin 3

ADC_CHANNEL_ADC4

ADC Single Ended Input pin 4

ADC_CHANNEL_ADC5

ADC Single Ended Input pin 5

ADC_CHANNEL_ADC6

ADC Single Ended Input pin 6

ADC_CHANNEL_ADC7

ADC Single Ended Input pin 7

ADC_CHANNEL_ADC0_ADC0_10X

ADC Differential Inputs Positive pin 0 Negative pin 0 10x Gain

ADC_CHANNEL_ADC1_ADC0_10X

ADC Differential Inputs Positive pin 1 Negative pin 0 10x Gain

ADC_CHANNEL_ADC0_ADC0_200X

ADC Differential Inputs Positive pin 0 Negative pin 0 200x Gain

ADC_CHANNEL_ADC1_ADC0_200X

ADC Differential Inputs Positive pin 1 Negative pin 0 200x Gain

ADC_CHANNEL_ADC2_ADC2_10X

ADC Differential Inputs Positive pin 2 Negative pin 2 10x Gain

ADC_CHANNEL_ADC3_ADC2_10X

ADC Differential Inputs Positive pin 3 Negative pin 2 10x Gain

ADC_CHANNEL_ADC2_ADC2_200X

ADC Differential Inputs Positive pin 2 Negative pin 2 200x Gain

ADC_CHANNEL_ADC3_ADC2_200X

ADC Differential Inputs Positive pin 3 Negative pin 2 200x Gain

ADC_CHANNEL_ADC0_ADC1_1X

ADC Differential Inputs Positive pin 0 Negative pin 1 1x Gain

ADC_CHANNEL_ADC1_ADC1_1X

ADC Differential Inputs Positive pin 1 Negative pin 1 1x Gain

ADC_CHANNEL_ADC2_ADC1_1X

ADC Differential Inputs Positive pin 2 Negative pin 1 1x Gain

ADC_CHANNEL_ADC3_ADC1_1X

ADC Differential Inputs Positive pin 3 Negative pin 1 1x Gain

ADC_CHANNEL_ADC4_ADC1_1X

ADC Differential Inputs Positive pin 4 Negative pin 1 1x Gain

ADC_CHANNEL_ADC5_ADC1_1X

ADC Differential Inputs Positive pin 5 Negative pin 1 1x Gain

ADC_CHANNEL_ADC6_ADC1_1X

ADC Differential Inputs Positive pin 6 Negative pin 1 1x Gain

ADC_CHANNEL_ADC7_ADC1_1X

ADC Differential Inputs Positive pin 7 Negative pin 1 1x Gain

ADC_CHANNEL_ADC0_ADC2_1X

ADC Differential Inputs Positive pin 0 Negative pin 2 1x Gain

ADC_CHANNEL_ADC1_ADC2_1X

ADC Differential Inputs Positive pin 1 Negative pin 2 1x Gain

ADC_CHANNEL_ADC2_ADC2_1X

ADC Differential Inputs Positive pin 2 Negative pin 2 1x Gain

ADC_CHANNEL_ADC3_ADC2_1X

ADC Differential Inputs Positive pin 3 Negative pin 2 1x Gain

ADC_CHANNEL_ADC4_ADC2_1X

ADC Differential Inputs Positive pin 4 Negative pin 2 1x Gain

ADC_CHANNEL_ADC5_ADC2_1X

ADC Differential Inputs Positive pin 5 Negative pin 2 1x Gain

ADC_CHANNEL_ADC_VBG

Internal Reference (VBG)

ADC_CHANNEL_ADC_GND

0V (GND)

adc_trigger_source_t

enum adc_trigger_source_t

ADC_FREE_RUNNING_MODE

Free Running mode

ADC_ANALOG_COMPARATOR

Analog Comparator

ADC_EXTERNAL_INTERRUPT_REQUEST_0

External Interrupt Request 0

ADC_TIMER_COUNTER0_COMPARE_MATCH_A

Timer/Counter0 Compare Match A

ADC_TIMER_COUNTER0_OVERFLOW

Timer/Counter0 Overflow

ADC_TIMER_COUNTER1_COMPARE_MATCH_B

Timer/Counter1 Compare Match B

ADC_TIMER_COUNTER1_OVERFLOW

Timer/Counter1 Overflow

ADC_TIMER_COUNTER1_CAPTURE_EVENT

Timer/Counter1 Capture Event

ADC_FREE_RUNNING_MODE

Free Running mode

ADC_ANALOG_COMPARATOR

Analog Comparator

ADC_EXTERNAL_INTERRUPT_REQUEST_0

External Interrupt Request 0

ADC_TIMER_COUNTER0_COMPARE_MATCH_A

Timer/Counter0 Compare Match A

ADC_TIMER_COUNTER0_OVERFLOW

Timer/Counter0 Overflow

ADC_TIMER_COUNTER1_COMPARE_MATCH_B

Timer/Counter1 Compare Match B

ADC_TIMER_COUNTER1_OVERFLOW

Timer/Counter1 Overflow

ADC_TIMER_COUNTER1_CAPTURE_EVENT

Timer/Counter1 Capture Event

4.2.1.5.5 source/Single-Ended_Interrupts/src/adc.c File Reference

This file contains the API implementations for the ADC driver.

#include "../adc.h"

Functions

Detailed Description

This file contains the API implementations for the ADC driver.

ADC Generated Driver File

Version: ADC Driver Version 2.0.0 ADC Package Version 2.0.0

Function Documentation

ISR()

ISR (ADC_vect )

Variable Documentation

ADC_ConversionDoneCallback

void(* ADC_ConversionDoneCallback) (void) = NULL[static]

4.2.1.5.6 source/Single-Ended_Tasks/src/adc.c File Reference

This file contains the API implementations for the ADC driver.

#include "../adc.h"

Functions

Detailed Description

This file contains the API implementations for the ADC driver.

ADC Generated Driver File

Version: ADC Driver Version 2.0.0 ADC Package Version 2.0.0

Variable Documentation

ADC_ConversionDoneCallback

void(* ADC_ConversionDoneCallback) (void) = NULL[static]