Microchip Technology megaAVR 0 Series Manual page 401

Hide thumbs Also See for megaAVR 0 Series:
Table of Contents

Advertisement

27.3.2.2 Input Sources
An AC has one positive and one negative input. The inputs can be pins and internal sources, such as a
voltage reference.
Each input is selected by writing to the Positive and Negative Input MUX Selection bit field (MUXPOS and
MUXNEG) in the MUX Control A register (ACn.MUXTRLA).
Pin Inputs
The following Analog input pins on the port can be selected as input to the analog comparator:
AINN0
AINN1
AINN2
AINP0
AINP1
AINP2
AINP3
Internal Inputs
The DAC has the following internal inputs:
Internal reference voltage generator (DACREF)
27.3.2.3 Power Modes
For power sensitive applications, the AC provides multiple power modes with balance power consumption
and propagation delay. A mode is selected by writing to the Mode bits (MODE) in the Control A register
(ACn.CTRLA).
27.3.2.4 Signal Compare and Interrupt
After successful initialization of the AC, and after configuring the desired properties, the result of the
comparison is continuously updated and available for application software, the Event system, or on a pin.
The AC can generate a comparator Interrupt, COMP. The AC can request this interrupt on either rising,
falling, or both edges of the toggling comparator output. This is configured by writing to the Interrupt
Modes bit field in the Control A register (INTMODE bits in ACn.CTRLA).
The Interrupt is enabled by writing a '1' to the Analog Comparator Interrupt Enable bit in the Interrupt
Control register (COMP bit in ACn.INTCTRL).
27.3.3
Events
The AC will generate the following event automatically when the AC is enabled:
The digital output from the AC (OUT in the block diagram) is available as an Event System source.
The events from the AC are asynchronous to any clocks in the device.
The AC has no event inputs.
27.3.4
Interrupts
Table 27-1. Available Interrupt Vectors and Sources
Name Vector Description
COMP Analog comparator interrupt AC output is toggling as configured by INTMODE in ACn.CTRLA
When an interrupt condition occurs, the corresponding Interrupt Flag is set in the Status register
(ACn.STATUS).
©
2018 Microchip Technology Inc.
Conditions
Datasheet Preliminary
®
megaAVR
0-Series
Analog Comparator (AC)
DS40002015A-page 401

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the megaAVR 0 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Atmega4808Atmega4809Atmega3208Atmega3209

Table of Contents