Hi,
I' m trying to program a Toshiba t6963 controlled Display with a Conrad C- Control Microcontroller. I wrote the program with a description from Steve Lawther where step- by- step is shown how to build something like that. After the intialising (correct english??
) the display shows random characters in random order. Nothing more and thats my problem. E.g. when the bit for the blinking cursor is set to one in the Display mode some characters on the Display are blinking and theres no cursor. maybe someone can help me.
thx
Muddel
Code:
'*****Portdefinition *****
define daten byteport[1]
define wr port[9]
define rd port[10]
define ce port[11]
define cd port[12]
define rst port[13]
'###### variblen####
define lsb Byte
define msb byte
define execo byte
define tarea byte
define thome byte
define garea byte
define ghome byte
rst = off
rst = on
ce=on
#main
'gha setzen
lsb = &H00
msb =&H00
execo=&H42
gosub twobyte
'garea setzen
lsb = &H1e
msb =&H00
execo =&H43
gosub twobyte
'tha setzen
lsb= &H00
msb= &H00
execo=&H40
gosub twobyte
'tarea setzen
lsb =&H01
msb=&H00
execo=&H41
gosub twobyte
'mode set
execo = &H8c
gosub exe
'display mode
execo = &H95
gosub exe
'adresspointer
lsb=&H23
msb=&H01
execo=&H24
gosub twobyte
'a darstellen
lsb = &H21
execo=&Hc0
gosub onebyte
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'++++++ vereinfachte Routinen +++++
'zwei Byte an LCD mit Command
#twobyte
gosub read_status
daten = lsb
gosub write_data
gosub read_status
daten = msb
gosub write_data
gosub read_status
daten = execo
gosub write_command
return
'ein byte Daten an LCD mit Command
#onebyte
gosub read_status
daten = lsb
gosub write_data
gosub read_status
daten = execo
gosub write_command
return
'command ans LCD senden
#exe
gosub read_status
daten=execo
gosub write_command
'********************************************************************************
'****Grundroutinen ***
#write_data
cd = off
wr = off
rd =on
pause 1
print"BUS";daten
pulse ce
return
#read_data
cd = off
rd = off
wr = on
pulse ce
return
#write_command
cd = on
wr = off
rd= on
pause 1
pulse ce
return
#read_status
deact daten
cd = on
rd = off
wr = on
if (daten and 1 shl 1)<>2 then print "Fehler im STA1"
if (daten and 1 shl 0)<>1 then print "Fehler im STA0"
if (daten and 1 shl 0)<>1 then goto read_status 's.u. mit sta0
if (daten and 1 shl 1)<>2 then goto read_status 'sicherheit, stimmt STA1? wenn nein gehe zu read_status
print daten
pause 1
pulse ce
return