General analog exercises

Tracking A/D converter

Use a timer and interupt mode to implement a tracking A/D converter using one of the DACs and one of the comparators. The input signal and DAC output signal are connected to the inputs of the comparator. In the interrupt service routine increase the DAC output voltage by one unit if it is less than the input signal, decrease by one unit otherwise.