Skip to content

This repository contains 3 bare metal code examples that show how to use the AC peripheral of the ATmega4809 device in different modes. It is a companion to the TB3211-Getting Started with Analog Comparator (AC).

License

Notifications You must be signed in to change notification settings

microchip-pic-avr-examples/atmega4809-getting-started-with-ac-studio

Repository files navigation

MCHP

Getting Started with Analog Comparator (AC) - Examples for the ATmega4809 Microcontroller with Microchip Studio

This repository contains examples of bare metal source code for Analog Comparator as described in TB3211 - Getting Started with Analog Comparator (AC) document from Microchip. The repository contains an Atmel Studio Solution with multiple projects:

  • Analog Signal Pulse Duration Measurement: In this use case, the AC peripheral will be used to measure the input signal period and pulse duration. For more details, see Analog Signal Pulse Duration Measurement project.
  • Level Crossing Detector: This example shows a basic initialization and set up for the AC peripheral. The application monitors an analog input signal, compares it to a fixed voltage and notifies the user via interrupt and an output pin every time the input signal crosses the fixed voltage level. For more details, see Level Crossing Detector project.
  • Preventing False Spike Detection: This example demonstrates the hysteresis features of the AC module that helps in avoiding frequent toggling of the AC when the positive input oscillates close to the negative input level. This application is similar to the level crossing detector application. Additionally, it has the Hysteresis mode enabled. For more details, see Preventing False Spike Detection project.

Related Documentation

More details and code examples on the ATMEGA4809 can be found at the following links:

Software Used

Hardware Used

About

This repository contains 3 bare metal code examples that show how to use the AC peripheral of the ATmega4809 device in different modes. It is a companion to the TB3211-Getting Started with Analog Comparator (AC).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages