This was an assignment from my course of Embedded Systems
QUESTION: Three analog temperature Sensors are connected to channels 0, 1, and 2 of ATMEG328P. Write an AVR C program that continuously reads the temperature values from the three sensors connected to channels 0, 1 and 2 (ADC0, ADC1, ADC2). The program will turn on an LED connected to PORTD pin 3 if the values of the three sensors are not equal. Use the following ADC configuration.
• Single-ended mode operation. • Select manual trigger mode. • Disable ADC interrupt. • Select AVCC as the reference voltage. • ADC result is right justified. • Select the ADC Prescaler 32.