increase accordingly. The result is the square waveform
you see in Screen Shot 6. The DAC1 data registers
are loaded with 0xBFF, which forces Comparator 1 to trip
at 1.80V.
If you’re wondering why the Comparator 1 output is
larger in voltage magnitude than the sawtooth waveform,
the answer is simple. Comparator 1 can swing its
output from 0.00V to just a bit below + 3.3V as its
output is referenced to the C8051F120’s VDD, which
happens to be + 3.3V. DAC0, which is supplying the
sawtooth waveform, is referenced to the C8051F120’s
+ 2.4V on-chip voltage reference, which is being
90
June 2007