Page 1
AVR 8-bit Microcontrollers AVR128: Setup and Use of the AVR Analog Comparator APPLICATION NOTE Introduction This application note serves as an example on how to set up and use the ® ® Atmel On-chip Analog Comparator. The following program examples are given in the assembly file “avr200.asm”:...
Page 2
1. Detecting a Positive Edge By Polling ACO..............3 2. Detecting a Positive Edge by Polling ACI..............4 3. Using the Analog Comparator Interrupt..............6 4. Revision History......................7 Atmel AVR128: Setup and Use of the AVR Analog Comparator [APPLICATION NOTE] Atmel-0934C-Setup-and-Use-of-the-AVR-Analog-Comparator_AVR128_Application Note-07/2016...
Page 3
Response Time (Cycles) 3 - 5 Initialization Time (Cycles) Register Usage Low Registers: None High Registers: None Pointers: None Interrupts Usage None Peripherals Usage Analog Comparator Atmel AVR128: Setup and Use of the AVR Analog Comparator [APPLICATION NOTE] Atmel-0934C-Setup-and-Use-of-the-AVR-Analog-Comparator_AVR128_Application Note-07/2016...
Page 4
Table 2-1. ACI Polling Performance Figures Parameter Value Code Size (Words) Initialization Time (Cycles) Response Time (Cycles) 3 - 5 Register Usage Low Registers: None High Registers: None Pointers: None Atmel AVR128: Setup and Use of the AVR Analog Comparator [APPLICATION NOTE] Atmel-0934C-Setup-and-Use-of-the-AVR-Analog-Comparator_AVR128_Application Note-07/2016...
Page 5
Parameter Value Interrupts Usage None Peripherals Usage Analog Comparator Atmel AVR128: Setup and Use of the AVR Analog Comparator [APPLICATION NOTE] Atmel-0934C-Setup-and-Use-of-the-AVR-Analog-Comparator_AVR128_Application Note-07/2016...
Page 6
Table 3-1. Analog Comparator Interrupt Enable Performance Figures Parameter Value Code Size (Words) Execution Time (Cycles) Register Usage Low Registers: None High Registers: 1 Pointers: None Interrupts Usage None Peripherals Usage Analog Comparator Atmel AVR128: Setup and Use of the AVR Analog Comparator [APPLICATION NOTE] Atmel-0934C-Setup-and-Use-of-the-AVR-Analog-Comparator_AVR128_Application Note-07/2016...
Page 7
Revision History Doc. Rev. Date Comments 0934C 07/2016 New template 0934B 05/2002 0934A Initial document release. Atmel AVR128: Setup and Use of the AVR Analog Comparator [APPLICATION NOTE] Atmel-0934C-Setup-and-Use-of-the-AVR-Analog-Comparator_AVR128_Application Note-07/2016...
Page 8
DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND...
Need help?
Do you have a question about the AVR128 and is the answer not in the manual?
Questions and answers