A/D converter interrupt service exercises




Middle-triggered sampling

The signal should be continuosly monitored in the ADC interrupt service routine. The recording of the data into an array should stop after taking n/2 samples after the signal crosses a given level upwards, where n is the total number of samples. A flag should be used to start the process and the interrupt service routine should clear the flag at the end of recording.