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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DIGITAL-TO-ANALOG AND ANALOG-TO-DIGITAL CONVERTERS 263<br />

UNKNOWN<br />

10.0 r~~;~rE DAC VOLTAGE<br />

7.5 / TRIAL 2 / 4<br />

5.0i-----'~+--t------___f'=='1.---i"-------<br />

UJ 2.5 6 7 8<br />

~ ol--....J-----=----------------_<br />

§: _ 2.5 TRIAL I<br />

-5.0<br />

-7.5<br />

-10.0<br />

TIME<br />

TIME<br />

Fig. 7-30. Successive approximation search method<br />

DAC with a range <strong>of</strong> -10 V to + 10 V in the ADC system. The first trial is<br />

used to determine the polarity <strong>of</strong> the unknown voltage. The DAC is set to 0<br />

V output and the comparator is read after sufficient delay for settling. In this<br />

case, the comparator output would be high, indicating that the unknown is<br />

higher than the trial, which is indeed the case. The next trial value should be<br />

+ 5 V. This time the comparator output would be low, indicating that the<br />

trial was too high.<br />

At this point it is known that the unknown is somewhere between 0 V<br />

and +5 V. The rule is that the next trial value should always be set midway<br />

in the range that the unknown is known to occupy. The result <strong>of</strong> the trial<br />

will be a new range, half the size <strong>of</strong> the previous one, that is also known to<br />

surround the unknown. Proceeding, the next trial would be midway between<br />

oand +5, namely +2.5. The sequence would continue: low, try 3 .75; high,<br />

try 3.125; low, try 3.437; high, try 3.281; high, etc. Note that after only<br />

seven trials the unknown has been pinned down to within 30 mY, better<br />

than 0.15% <strong>of</strong> full-scale accuracy. Eventually the voltage range surrounding<br />

the unknown becomes as small as the step size <strong>of</strong> the DAC used to generate<br />

the trial voltages, and the conversion is declared to be complete. The last<br />

trial value is the converted result.<br />

Now if the reader is observant he may have noted that the trial values<br />

are nice round numbers-in the binary sense. Assuming the use <strong>of</strong> an 8-bit<br />

<strong>of</strong>fset binary DAC, the sequence <strong>of</strong> trials expressed in binary would be:<br />

10000000 (0), 11000000 (5), 10100000 (2.5), 10 110000 (3.75), 10101000<br />

(3.125), 10101100 (3.437), 10101010 (3.281), etc.<br />

It turns out that computation <strong>of</strong> the next trial value is really no computation<br />

at all. It is simply a bit manipulation that any microprocessor is quite<br />

adept at. If the binary input to the DAC is treated as a register, the manipulation<br />

is as follows:

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

Saved successfully!

Ooh no, something went wrong!