3.1.2 AC with Window Function Interrupt Generation

Analog Comparator with Window Function Interrupt Generation

3.1.2.1 Introduction

The Analog Comparator (AC) module compares the voltage levels on two inputs and gives a digital output based on this comparison. The AC can be configured to generate interrupt requests and/or events based on several different combinations of input change. The input selection includes analog port pins and internally generated inputs. The AC digital output goes through controller logic, enabling customization of the signal for use internally with the Event System or externally on the pin. In window mode, the interrupt control register offers the option to choose from various AC window modes to initiate an event or signal an interrupt. These modes include Above the window, Inside the window, Below the window, and Outside the window.

3.1.2.2 Supported Device Families

AVR® DxAVR® EAATmega32xx

3.1.2.3 Required header files:

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

3.1.2.4 Module Documentation

3.1.2.4.1 AC

Contains the API prototypes for the AC driver.

Module description

Contains the API prototypes for the AC driver.

Version: AC Driver Version 1.0.0
Functions
  • int8_t ACx_Initialize (void)

    Initializes the AC1. This routine should only be called once during system initialization.

Function Documentation

ACx_Initialize()

int8_t ACx_Initialize (void )

Initializes the AC1. This routine should only be called once during system initialization.

Parameters:
None.
Returns:

None.

3.1.2.5 File Documentation

3.1.2.5.1 source/ac1.c File Reference

Contains the API implementation for the AC1 driver.

#include "../ac1.h"

Functions

  • int8_t ACx_Initialize (void)

    Initializes the AC1. This routine should only be called once during system initialization.

  • ISR (AC1_AC_vect)

Detailed Description

Contains the API implementation for the AC1 driver.

AC1 Generated Driver File

Version: AC1 Driver Version 1.0.0

Function Documentation

ISR()

ISR (AC1_AC_vect )

3.1.2.5.2 source/ac1.h File Reference

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

Functions

  • int8_t ACx_Initialize (void)

    Initializes the AC1. This routine should only be called once during system initialization.

Detailed Description

AC1 Generated Driver API Header File