ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 12.06.2025
Просмотров: 8263
Скачиваний: 1
© MCS Electronics, 1995-2007 |
||
Wait 1 |
'wait a moment |
|
Cursor On Blink |
'show cursor |
|
Wait 1 |
'wait a moment |
|
Display Off |
'turn display off |
|
Wait 1 |
'wait a moment |
|
Display On |
'turn display on |
|
'-----------------NEW support for 4-line LCD------ |
||
Thirdline |
||
Lcd "Line 3" |
||
Fourthline |
||
Lcd "Line 4" |
'goto home on line |
|
Home Third |
||
three |
||
Home Fourth |
'first letteer |
|
Home F |
||
also works |
||
Locate 4 , 1 : Lcd "Line 4" |
||
Wait 1 |
||
'Now lets build a special character |
||
'the first number is the characternumber (0-7) |
||
'The other numbers are the rowvalues |
||
'Use the LCD tool to insert this line |
||
Deflcdchar 1 , 225 , 227 , 226 , 226 , 226 , 242 , 234 , 228 |
' replace ? |
|
with number (0-7) |
' replace ? |
|
Deflcdchar 0 , 240 , 224 , 224 , 255 , 254 , 252 , 248 , 240 |
||
with number (0-7) |
'select data RAM |
|
Cls |
||
Rem it is important that a CLS is following the deflcdchar statements because
it will set the controller back in datamode |
'print the special |
Lcd Chr(0) ; Chr(1) |
|
character |
|
'----------------- Now use an internal routine ------------ |
'value into ACC |
_temp1 = 1 |
|
!rCall _write_lcd |
'put it on LCD |
CONFIG LCDMODE
Action
Configures the LCD operation mode and overrides the compiler setting.
Syntax
CONFIG LCDMODE = type
Remarks
Type |
PORT |
Will drive the LCD in 4-bit port mode and is the default. |
|
In PORT mode you can choose different PIN's from different PORT's to |
|
connect to the upper 4 data lines of the LCD display. The RS and E can also |
|
be connected to a user selectable pin. This is very flexible since you can |
|
use pins that are not used by your design and makes the board layout |
|
simple. On the other hand, more software is necessary to drive the pins. |
|
BUS will drive the LCD in bus mode and in this mode is meant when you |
|
page -361- |