18.11.2014 Views

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

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.

Displays<br />

Listing 8-4 (page 2 0f 2).<br />

390 REM display “LINE 1", ”LINE 2"<br />

400 D=ASC(L):GOSUB 800<br />

410 D=ASC(I):GOSUB 800<br />

420 D=ASC(N):GOSUB 800<br />

430 D=ASC(E):GOSUB 800<br />

440 D=20H:GOSUB 800<br />

450 D=ASC(1):GOSUB 800<br />

460 I=0C0H<br />

470 GOSUB 900<br />

480 D=ASC(L):GOSUB 800<br />

490 D=ASC(I):GOSUB 800<br />

500 D=ASC(N):GOSUB 800<br />

510 D=ASC(E):GOSUB 800<br />

520 D=20H:GOSUB 800<br />

530 D=ASC(2):GOSUB 800<br />

600 END<br />

790 REM write data to the display<br />

800 XBY(X)=RS+1<br />

810 XBY(X)=RW<br />

820 XBY(A)=D<br />

830 XBY(X)=E+1:XBY(X)=E<br />

840 RETURN<br />

890 REM write an instruction to the display<br />

900 XBY(X)=RS<br />

910 XBY(A)=I<br />

920 XBY(X)=E+1:XBY(X)=E<br />

930 RETURN<br />

<strong>The</strong> <strong>Microcontroller</strong> <strong>Idea</strong> <strong>Book</strong> 147

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

Saved successfully!

Ooh no, something went wrong!