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

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

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

0'"""c"y'·i- the relative values that have been input from the port.<br />

that there are limits on the dimensions of the screen area<br />

the HLIN command. These limits are 39 points in each direction.<br />

Note your display program steps in the following space:<br />

n,-,1,.,.., .... ,.<br />

used the following steps to generate a horizontal bar graph of<br />

information:<br />

GR: COLOR = 5<br />

FOR P = 1 TO 10<br />

D = A(P)/6.5<br />

HLIN O,D AT P<br />

NEXT P<br />

END<br />

steps were added to the program that we developed in Step 2.<br />

your program, or the one shown here.<br />

this set of program steps, the data value has been divided by<br />

so that instead of having a range between 0 and 255, the range<br />

"condensed" to be 0 to 39. The subscript for the array has also<br />

used to increase the starting position of each horizontal line.<br />

data starts at the top of the screen for A ( l), and proceeds down<br />

screen for the later data values. You could also use the value<br />

P to change the color for each of the horizontal lines.<br />

Additional changes can be made to the program so that a timeroutine<br />

is used in place of the INPUT A$ command. This<br />

mean that data values would be obtained at definite intervals,<br />

programmed in the delay routine. You would no longer need to<br />

the RETURN key to have a new data value acquired.<br />

Change your program so that a time delay routine is used in place<br />

the INPUT A$ command at line 40. Make the delay fairly long,<br />

2 or 3 seconds. Here is an example of a useful routine:<br />

FOR T =<br />

0 to 2000: NEXT T<br />

Connect the logic probe to the "A" output, pin 1, on the SN7402<br />

gate. The acquisition of a data value from the three-state in-

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

Saved successfully!

Ooh no, something went wrong!