09.05.2015 Views

Microcomputer Circuits and Processes

Microcomputer Circuits and Processes

Microcomputer Circuits and Processes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

iased that way). This low, when fed back to the counter, tells it to stop<br />

counting. The counter now holds 0101, the binary value of the input<br />

voltage. The conversion is complete, <strong>and</strong> the 4-bit number can be<br />

enabled on to the computer's data bus <strong>and</strong> read into memory.<br />

Figure 4.27 shows this conversion; the step output of the D-to-A<br />

converter as the counter increments until the D-to-A voltage equals Jlin'<br />

V iṉ<br />

-------<br />

I<br />

I<br />

I<br />

1<br />

I<br />

I<br />

I<br />

D-to-A output voltage<br />

I Comp ••• ",<br />

output<br />

Time<br />

I conversion<br />

done<br />

Figure 4.27<br />

The technique oflinear ramp conversion. The D-to-A output increases in equal steps<br />

until it is equal to the input voltage. Then, the comparator signals that the conversion is<br />

done. The counter, which had been driving the D-to-A converter, is stopped, <strong>and</strong> holds<br />

the binary value of the input voltage.<br />

The comparator's output is also shown dropping low at this point.<br />

In a working circuit, a little more logic is needed, to reset the counter<br />

before each conversion is started <strong>and</strong> to signal the CPU when the<br />

conversion is done, so the result can be enabled on to the bus.<br />

It is quite a straightforward procedure, but rather slow. For a large<br />

input voltage, the counter may need to count up to a large number. An<br />

8-bit converter would need a maximum of 255 counts. A typical clock<br />

driving the converter may run at 1MHz, needing 1 JlS per count, or up<br />

to 255 JlS for a single conversion. Such pedestrian behaviour may be fine<br />

if you want to measure the height of water in a river once per hour, but<br />

totally inadequate to record the behaviour of a millisecond pulsar.<br />

Microprocessor-controlled measuring systems are usually used in<br />

the two extremes of either very infrequent (once per hour, day ... ) or<br />

very frequent (thous<strong>and</strong>s or millions per second). These are areas where<br />

humans would not perform very well. The problem with quick or<br />

transient measurements is illustrated in figure 4.28.<br />

You know that a certain signal has a large initial peak <strong>and</strong> then<br />

decays down. You start the ramp converter at the instant the signal<br />

appears (you cannot anticipate), but by the time the counter has<br />

counted a hundred or so pulses, the input voltage has long since<br />

61

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

Saved successfully!

Ooh no, something went wrong!