I am just starting to learn about embedded systems. I need help in writing C codes for an Atmega2560 analog comparator. I already read about how to use atmega16 for it so to understand the basics. But I need help/guidance in using Atmega2560(thats what I have). I intend to use AIN0 as positive input and AIN1 as negative input.
The programming method of the atmega256 comparator is similar to atmega16.Find out the register of comparator from it’s datasheet and program it. If u r facing any particular problem then it can be solved.