A/D converter interrupt service exercises
Peak detector
The signal should be continuosly monitored in the ADC interrupt service routine and the sample should be compared to a value stored in a variable. If the sample is larger than this value, then the value should be replaced by the signal sample and a flag should be set. In the beginning the variable should be zero, and another flag should be used to enable or disable the process.