22.09.2015 Views

of Microprocessors

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

260 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

CONTROLLED BY<br />

OUTPUT PORT BIT<br />

C<br />

VOLTAGE<br />

TO<br />

MEASURE<br />

Fig. 7-27. Single-slope integration method<br />

microcomputer opens the switch and monitors the output <strong>of</strong> the comparator<br />

as before. The integrator output now starts going positive at a constant rate<br />

determined by the reference voltage magnitude. When it finally becomes<br />

more positive than the unknown voltage, the comparator switches low and<br />

the accumulated count is the converted value. As before, the resolution<br />

attainable is dependent on the speed <strong>of</strong> the microcomputer and the time<br />

available for conversion.<br />

Dual-Slope Method<br />

One problem with both <strong>of</strong> the preceding circuits is that accuracy and<br />

stability depend on the quality <strong>of</strong> a capacitor. The circuit in Fig. 7-28<br />

overcomes this difficulty by comparing the input voltage with a reference<br />

voltage, using the capacitor only as a comparison medium. A measurement<br />

cycle consists <strong>of</strong> two phases. Normally S2 is on, forcing the integrator output<br />

to zero. During phase 1, 51 selects the unknown voltage for the integrator<br />

input, and S2 is opened to allow the integrator to charge negative at a rate<br />

dependent on the unknown voltage. The amount <strong>of</strong> time spent in phase 1 is<br />

constant and carefully controlled by a counting loop similar to that used for<br />

measurement. At the beginning <strong>of</strong> phase 2, Sl is flipped so that the negative<br />

S2<br />

VOLTAGE TO0--0 SI<br />

MEASURE<br />

I<br />

TO INPUT<br />

PORT BIT<br />

Fig. 7-28. Dual-slope integration method

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!