Bascom AVR

Page 35

BASCOM-AVR

Page 69 of 204

$LIB »Page 73

BASCOM-AVR

Page 70 of 204

$LCD = [&H] address

Example Dim B As Byte $LIB "Mylib.LIB" $EXTERNAL TestAsm Rcall TestAsm End

Remarks Address

$INCLUDE Action

On systems with external RAM, it makes more sense to attach the LCD to the data bus. With an address decoder, you can select the LCD display.

Includes an ASCII file in the program at the current position.

Syntax $INCLUDE file

The address where must be written to, to enable the LCD display and the RS line of the LCD display. The db0-db7 lines of the LCD must be connected to the data lines D0-D7. (or is 4 bit mode, connect only D4-D7) The RS line of the LCD can be configured with the LCDRS statement.

See also $LCDRS »Page 72

Remarks File

Name of the ASCII file, which must contain valid BASCOM statements. This option can be used if you make use of the same routines in Many programs. You can write modules and include them into your program. If there are changes to make you only have to change the module file, not all your BASCOM programs. You can only include ASCII files!

Example '----------------------------------------------------------' (c) 1997-2000 MCS Electronics '-----------------------------------------------------------' file: INCLUDE.BAS ' demo: $INCLUDE '-----------------------------------------------------------Print "INCLUDE.BAS" $include c:\bascom\123.bas 'include file that prints Hello Print "Back in INCLUDE.BAS" End

Example REM We use a STK200 board so use the following $LCD = &HC000 'writing to this address will the LCD 'high and the RS-line $LCDRS = &H8000 'writing to this address will the LCD 'high. Cls LCD "Hello world"

$LCDPUTCTRL Action Specifies that LCD control output must be redirected.

Syntax $LCDPUTCTRL = label

Remarks Label

$LCD Action Instruct the compiler to generate code for 8-bit LCD displays attached to the data bus.

The name of the assembler routine that must be called when a control byte is printed with the LCD statement. The character must be placed in R24/_temp1.

With the redirection of the LCD statement, you can use your own routines.

See also Syntax

addresses make the E-line of of the LCD high. make the E-line of

$SERIALPUTDATA »Page 71


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.