A/D converter interrupt service exercises




Level crossing difference recorder

The ADC interrupt service routine should count the number of samples taken between neighboring level crossings of the input signal. At each level crossing this number should be saved into an array. The recording should be stopped after taking a given number of samples. Setting a flag bit should start the measurement and this flag must be cleared at the end of the measurement.