A/D converter interrupt service exercises
Triggered stop of sampling (pretriggering)
The signal should be continuosly monitored in the ADC interrupt service routine. The recording of the data into an array should stop when the signal crosses a given level upwards. A given number of samples should be recorded before this trigger event. A flag should be used to start the process and the interrupt service routine should clear the flag at the end of recording.