Dear All,
many thanks for your advice.
In the meantime I got the LCD working in 4 bit mode.
I found some behaviour of the display which is strange to me.
If there is a wait command after data is written to the LCD using the lcd command then the display does not show any data until it comes to the next access to the display.
The display is not darkened it just shows nothing.
When putting a wait command after e.g. locate then the display remains as it should.
So it means that there must not be a wait command after a lcd command.
Is this normal ?
best regards
Christian
For clarification here is the code:
Config Lcd = 16*2
Config Lcdpin = Pin , Db4 = Portd.6 , Db5 = Portd.4 , Db6 = Portd.7 , Db7 = Portb.0 , E = Portd.3 , Rs = Portd.2
initlcd
Dim i as integer
dim Line_1 as string*16
dim Line_2 as string*16
dim dummystring as string*3
i=0
line_1 = "thisisline#"
cls
lcd line_1
line_2 ="QWERTzYXASDY"
wait 1
lowerline
lcd line_2
waitms 1000
Cursor Off Noblink
' Now there is the endless counting loop
loops:
dummystring =str(i)
dummystring = " " + dummystring
locate 1, 12 'position to line 1 Pos 12
waitms 50 'give time for executing command
lcd dummystring 'write short string to line 1
waitms 1000 '<-- no information visible on LCD display but data is still in the memory
locate 2,12 'position to line 2 Pos 12 Information is displayed
waitms 50 'give time for executing command
lcd dummystring ' write short string to defined position
locate 1, 12 '<---- if removed then no information visible on LCD
waitms 1000 '<------ this works if locate command is prior
i=i+1
'wait 1
if i=100 then i=0
goto loops
↧