Programm 2 (Display 20 X 4)

 

$regfile = "m32def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 16000000 

Config Lcdpin = Pin , Db4 = Portd.4 , Db5 = Portd.5 , Db6 = Portd.6 , Db7 = Portd.7 , E = Portd.2 , Rs 

Dim A As Byte
Config
Lcd = 20 * 4 'configure lcd screen
Cls 'clear the LCD display
Lcd "SENSOBOT 1" 'display this at the top line
Wait 1
Lowerline 'select the lower line
Wait 1
Lcd "www.sensobot.de" 'display this at the lower line
Wait 1
For A = 1 To 5
Shiftlcd Right 'shift the text to the right
Wait 1 'wait a moment
Next
For A = 1 To 5
Shiftlcd Left 'shift the text to the left
Wait 1 'wait a moment
Next
Locate 2 , 17 'set cursor position
Lcd "*" 'display this
Wait 1 'wait a moment
Shiftcursor Right 'shift the cursor
Lcd "@" 'display this
Wait 1 'wait a moment
Home Upper 'select line 1 and return home 'replace the text
Wait 1 'wait a moment
Cursor Off Noblink 'hide cursor
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
Thirdline
Lcd "Alles fuer den BOT"
Wait 1
Fourthline
Lcd "Eine Taste druecken"
Wait 1
Home Third 'goto home on line three
Home Fourth
Home F 'first letteer also works
Locate 4 , 20 : Lcd "!"
Wait 1
End

Die Robotik & Arduino Seite