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.

20 POKE 4931 B, V<br />

30 NEXT V<br />

40 GOTO 10<br />

ir;a"g"law 11pui<br />

l 0 FOR V = 0 TO 255<br />

20 POKE 4931 B, V<br />

30 NEXT V<br />

40 FOR V = 254 TO l<br />

50 POKE 4931 B, V<br />

60 NEXT V<br />

70 GOTO 10<br />

STEP -1<br />

You may wish to try either of these programs, or the ones<br />

you wrote. Why is the range in one of the triangular output lo<br />

254 to 1 instead of 255 to O<br />

H the range is 255 to 0, these two values will be output twice,<br />

though you probably couldn't tell the difference on the meter.<br />

time delay, or delays, may be useful in these programs.<br />

Sile 4<br />

Since you know that the voltage from 0 to 10 volts correspon<br />

to steps from 0 to 255, can you write a program that would allo<br />

you to enter a voltage from the keyboard and that would genera<br />

this voltage on the meter Use the following space for your progra<br />

We developed the following program, which you may wish to<br />

10 INPUT "VOLTAGE ";V<br />

20 R = V * 25.5<br />

30 POKE 49318, R<br />

40 GOTO 10<br />

Step 5<br />

Try your program, too. Does it generate a voltage from the<br />

converter that closely matches the voltage that you entered<br />

program seemed to work well, considering inaccuracies in the<br />

This program does not have any "error detecting" steps, so you<br />

also try and generate a + 15-volt signal from the converter. What<br />

you think will happen Will the converter burn out<br />

130

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

Saved successfully!

Ooh no, something went wrong!