LCS-1M - A Low-Cost Hobby Oscilloscope
Click on the image for a larger view
Offset; Trigger
The last part that the microcontroller is repsonsible for are
some analog voltages. First, there are the channel offset
voltages which move the measured waveforms and also allow
for negative signals to be displayed. These voltages are
generated by a two-channel 12-bit digital-to-analog converter
(DAC, Microchip MPC4822) that is connected to the SPI bus. A
DAC of same type also sets the adjustable trigger level.
Since the DAC can only produce voltages from 0V to 4.096V, one half of OP3 scales this up to the full
necessary range of 0 to 5V. The second half is configured as an open-loop comparator, i.e. an
op-amp without any feedback circuitry and as a consequence very high gain. It is fed by the trigger
level on one side and the ADC1 input voltage on the other. This circuit will rail to the positive supply
voltage whenever the input signal exceeds the trigger threshold ever so slightly, and rail to ground
whenever the input signal is only sightly lower than the threshold. In other words, it provides a digital
trigger signal that feeds the trigger input of the sample logic.

In the present circuit the scope can only trigger on channel 1. This is not really a serious limitation, the
user simply must decide which signal he/she wants to trigger on
before hooking up the scope to
his/her circuit. At the same time, it cuts down on components, board size, and cost (at least two more
ICs and some discrete elements).
Schematic Page 7