27.01.2015 Views

titus-larsen-titus-1981-apple-interfacing

titus-larsen-titus-1981-apple-interfacing

titus-larsen-titus-1981-apple-interfacing

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

he minimum value should be in the range of 0 or 1. The maximum<br />

alue should be between 253 and 255. This is what is expected from<br />

n 8-bit device, since it can only generate values between 0 and 255.<br />

tep 4<br />

The ADC0804 chip has a Hag output that can be used to monitor<br />

e status of the converter; that is, busy or ready. This output is a<br />

gic zero when data is ready for the computer, and it is a logic one<br />

hen the converter is performing a conversion. This output is really<br />

e output of a flag circuit, and the flag is reset when the eight data<br />

its are read into the computer. Since the converter can perform<br />

any thousands of conversions in a second, is there any need to<br />

onitor this Hag signal<br />

robably not, since the converter will complete the conversion pross<br />

before the data can be accessed by a BASIC-language program.<br />

Can you suggest some possible uses for the Hag output<br />

e flag could be used for assembly-language A/D converter proamming.<br />

In assembly-language programs, ,the flag could be tested<br />

s an input to an input port, or it could be ' used with the interrupt<br />

on the 6502 microprocessor chip. Since thesei.are high-speed. applications,<br />

it would be useful to monitor the flag ;to determine when the<br />

converter had finished a conversion.<br />

Remove line 20 from your program and run the program. What do<br />

OU find<br />

The data values are the same as those observed when the program<br />

was used with the time delay steps. Thus, the converter is "outrun­<br />

·ng" the BASIC control program.<br />

'<br />

The values displayed on the screen do not represent the actual<br />

voltage that is being measured, but are an 8-bit binary representa-<br />

157

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

Saved successfully!

Ooh no, something went wrong!