This example demonstrates how to use the megaAVR ADC Driver to set up the ADC in freerunning mode.
This application will read the analog value on the ADC0 pin in freerunning mode. An interrupt routine accumulates the readings and does an average every 16 readings; storing it in a global variable.
This software was written for the GNU GCC for AVR, and IAR Embedded Workbench.
Other compilers may or may not work.
For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/