4.1.1 AC

Analog Comparator

4.1.1.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.

4.1.1.2 Supported Device Families

ATtiny ATmega16xx ATmega48xx
ATmega80x ATmega88xx

4.1.1.3 Required header files:

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

4.1.1.4 Module Documentation

4.1.1.4.1 AC

Driver Version

AC Driver Version 1.0.0
Functions
  • int8_t AC0_Initialize (void)

    This routine initializes the AC0 and must be called before any other AC0 routine is called. This routine should only be called once during system initialization.

Function Documentation

AC0_Initialize()

int8_t AC0_Initialize (void )

This routine initializes the AC0 and must be called before any other AC0 routine is called. This routine should only be called once during system initialization.

Parameters:
void
Returns:

void

4.1.1.5 File Documentation

4.1.1.5.1 source/ac0.c File Reference

This is the generated driver implementation file for the AC0 driver.

#include "../ac0.h"

Functions

  • int8_t AC0_Initialize (void)

    This routine initializes the AC0 and must be called before any other AC0 routine is called. This routine should only be called once during system initialization.

  • ISR (AC0_AC_vect)

Detailed Description

This is the generated driver implementation file for the AC0 driver.

AC0 Generated Driver File

Version: AC0 Driver Version 1.0.0

4.1.1.5.2 source/ac0.h File Reference

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

Functions

  • int8_t AC0_Initialize (void)

    This routine initializes the AC0 and must be called before any other AC0 routine is called. This routine should only be called once during system initialization.

Detailed Description

AC0 Generated Driver API Header File