A/D converter interrupt service exercises
Moving average
The ADC interrupt service routine should calculate the average of the last n samples at every execution and store this value in an array. The number of samples to be stored is given by a variable. A flag should be used to start the process and the interrupt service routine should clear the flag at the end of sampling.