Mahlzeit,

ich habe schon viele Problemfälle mit dem T6963C hier gelesen, doch leider hat mir keine Lösung geholfen.

Ich möchte auf dem LCD einen Font ins Ram laden, der 8x12 Pixel hat. leider macht dieses das LCD nicht mit. Nach dem ich die Fontdaten ins Ram geladen habe, blinkt es wild und Resetet sich selbst und dann bleibt auch meine MCU stehen.

Bascom meldet:
Forward jump out of range[_GWRITE_DATA[2607]]

Gruß
Matthias

Code:
$regfile = "m128def.dat"
$crystal = 14745600

Dim Gl_byte As Byte
Dim V As Byte
Dim K As Byte
Dim P As Byte
Dim W As Word
Dim Q As String * 1
Dim Btxt As String * 16 'string to be printed

Declare Sub Text(sf As String ) 'sub that prints the big text

Config Graphlcd = 240 * 128 , Dataport = Porta , Controlport = Portc , Ce = 2 , Cd = 3 , Wr = 0 , Rd = 1 , Reset = 4 , Fs = 5 , Mode = 8
Cls
Cursor Off
Wait 1

'set offset

ldi r24,&h03 'load r24 with offset location low byte

rcall _GWrite_Data

ldi r24,&h00 'load r24 with offset location high byte

Rcall _GWrite_Data

ldi r24,&h22 'set offset command

rcall _GWrite_Cmd 'write command to LCD



'set address pointer

ldi r20,&h00 'address that pointer will point to

ldi r21,&h1c 'set address pointer command

rcall _set_address 'set address routine



'store characters

Restore Font_big 'select font_big table

For W = 1 To 288 'read each fontc table byte into

Read Gl_byte 'read a byte from the table

Loadadr Gl_byte , X 'load register x with gl_byte address

ld r24, x 'load r24 with gl_byte

rcall _GWrite_Data

ldi r24, &hc0 'command to write and increment pointer

rcall _GWrite_Cmd

Next W



'display Character

Locate 2 , 1 'set cursor location

Btxt = "ABCDEFGHIJKLMNOP" 'set Btext with text to be printed

Call Text(btxt) 'call text sub

Locate 3 , 1

Btxt = "QRSTUVWXYZ"

Call Text(btxt)

Locate 4 , 1

Btxt = "0123456789"

Call Text(btxt)



End

'sub used to display characters

 Sub Text(sf As String ) '!!!!!sf text must be in caps to work!!!!

V = Len(sf) 'get length of string

For K = 1 To V 'repeat until end of string

Q = Mid(sf , K , 1) 'read each character

P = Asc(q) 'convert to ascII

If P < 65 Then 'adjust ascII code

 P = P + 106

 Else

 P = P + 63

End If

Loadadr P , X 'load x with address of p

ld r24,x 'load r24 with p

rcall _GWrite_Data 'write and increment

ldi r24,&hc0

rcall _GWrite_Cmd

Next K

End Sub


Font_big:
Data &H0 , &H0 , &H2 , &H6 , &HC , &H18 , &H30 , &H60 , &HC0 , &H80 , &H0 , &H0       ''/'47
Data &H0 , &H7C , &HC6 , &HCE , &HDE , &HF6 , &HE6 , &HC6 , &HC6 , &H7C , &H0 , &H0       ''0'48
Data &H0 , &H18 , &H78 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H7E , &H0 , &H0       ''1'49
Data &H0 , &H7C , &HC6 , &HC6 , &HC , &H18 , &H30 , &H60 , &HC6 , &HFE , &H0 , &H0       ''2'50
Data &H0 , &H7C , &HC6 , &H6 , &H6 , &H3C , &H6 , &H6 , &HC6 , &H7C , &H0 , &H0       ''3'51
Data &H0 , &HC , &H1C , &H3C , &H6C , &HCC , &HFE , &HC , &HC , &HC , &H0 , &H0       ''4'52
Data &H0 , &HFE , &HC0 , &HC0 , &HC0 , &HFC , &H6 , &H6 , &HC6 , &H7C , &H0 , &H0       ''5'53
Data &H0 , &H7C , &HC6 , &HC0 , &HC0 , &HFC , &HC6 , &HC6 , &HC6 , &H7C , &H0 , &H0       ''6'54
Data &H0 , &HFE , &HC6 , &HC , &H18 , &H30 , &H30 , &H30 , &H30 , &H30 , &H0 , &H0       ''7'55
Data &H0 , &H7C , &HC6 , &HC6 , &HC6 , &H7C , &HC6 , &HC6 , &HC6 , &H7C , &H0 , &H0       ''8'56
Data &H0 , &H7C , &HC6 , &HC6 , &HC6 , &H7E , &H6 , &H6 , &HC6 , &H7C , &H0 , &H0       ''9'57
Data &H0 , &H0 , &H0 , &HC , &HC , &H0 , &H0 , &HC , &HC , &H0 , &H0 , &H0       '':'58
Data &H0 , &H0 , &H0 , &HC , &HC , &H0 , &H0 , &HC , &HC , &HC , &H18 , &H0       ''
Data &H0 , &HC , &H18 , &H30 , &H60 , &HC0 , &H60 , &H30 , &H18 , &HC , &H0 , &H0       ''<'60
Data &H0 , &H0 , &H0 , &H0 , &HFE , &H0 , &HFE , &H0 , &H0 , &H0 , &H0 , &H0       ''='61
Data &H0 , &H60 , &H30 , &H18 , &HC , &H6 , &HC , &H18 , &H30 , &H60 , &H0 , &H0       ''>'62
Data &H0 , &H7C , &HC6 , &HC6 , &HC , &H18 , &H18 , &H0 , &H18 , &H18 , &H0 , &H0       ''?'63
Data &H0 , &H7C , &HC6 , &HC6 , &HDE , &HDE , &HDE , &HDC , &HC0 , &H7E , &H0 , &H0       ''@'64
Data &H0 , &H38 , &H6C , &HC6 , &HC6 , &HC6 , &HFE , &HC6 , &HC6 , &HC6 , &H0 , &H0       ''A'65
Data &H0 , &HFC , &H66 , &H66 , &H66 , &H7C , &H66 , &H66 , &H66 , &HFC , &H0 , &H0       ''B'66
Data &H0 , &H3C , &H66 , &HC0 , &HC0 , &HC0 , &HC0 , &HC0 , &H66 , &H3C , &H0 , &H0       ''C'67
Data &H0 , &HF8 , &H6C , &H66 , &H66 , &H66 , &H66 , &H66 , &H6C , &HF8 , &H0 , &H0       ''D'68
Data &H0 , &HFE , &H66 , &H60 , &H60 , &H7C , &H60 , &H60 , &H66 , &HFE , &H0 , &H0       ''E'69
Data &H0 , &HFE , &H66 , &H60 , &H60 , &H7C , &H60 , &H60 , &H60 , &HF0 , &H0 , &H0       ''F'70
Data &H0 , &H7C , &HC6 , &HC6 , &HC0 , &HC0 , &HCE , &HC6 , &HC6 , &H7C , &H0 , &H0       ''G'71
Data &H0 , &HC6 , &HC6 , &HC6 , &HC6 , &HFE , &HC6 , &HC6 , &HC6 , &HC6 , &H0 , &H0       ''H'72
Data &H0 , &H3C , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H3C , &H0 , &H0       ''I'73
Data &H0 , &H3C , &H18 , &H18 , &H18 , &H18 , &H18 , &HD8 , &HD8 , &H70 , &H0 , &H0       ''J'74
Data &H0 , &HC6 , &HCC , &HD8 , &HF0 , &HF0 , &HD8 , &HCC , &HC6 , &HC6 , &H0 , &H0       ''K'75
Data &H0 , &HF0 , &H60 , &H60 , &H60 , &H60 , &H60 , &H62 , &H66 , &HFE , &H0 , &H0       ''L'76
Data &H0 , &HC6 , &HC6 , &HEE , &HFE , &HD6 , &HD6 , &HD6 , &HC6 , &HC6 , &H0 , &H0       ''M'77
Data &H0 , &HC6 , &HC6 , &HE6 , &HE6 , &HF6 , &HDE , &HCE , &HCE , &HC6 , &H0 , &H0       ''N'78
Data &H0 , &H7C , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &H7C , &H0 , &H0       ''O'79
Data &H0 , &HFC , &H66 , &H66 , &H66 , &H7C , &H60 , &H60 , &H60 , &HF0 , &H0 , &H0       ''P'80
Data &H0 , &H7C , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HD6 , &H7C , &H6 , &H0       ''Q'81
Data &H0 , &HFC , &H66 , &H66 , &H66 , &H7C , &H78 , &H6C , &H66 , &HE6 , &H0 , &H0       ''R'82
Data &H0 , &H7C , &HC6 , &HC0 , &H60 , &H38 , &HC , &H6 , &HC6 , &H7C , &H0 , &H0       ''S'83
Data &H0 , &H7E , &H5A , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H3C , &H0 , &H0       ''T'84
Data &H0 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &H7C , &H0 , &H0       ''U'85
Data &H0 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &HC6 , &H6C , &H38 , &H10 , &H0 , &H0       ''V'86
Data &H0 , &HC6 , &HC6 , &HD6 , &HD6 , &HD6 , &HFE , &HEE , &HC6 , &HC6 , &H0 , &H0       ''W'87
Data &H0 , &HC6 , &HC6 , &H6C , &H38 , &H38 , &H38 , &H6C , &HC6 , &HC6 , &H0 , &H0       ''X'88
Data &H0 , &H66 , &H66 , &H66 , &H66 , &H3C , &H18 , &H18 , &H18 , &H3C , &H0 , &H0       ''Y'89
Data &H0 , &HFE , &HC6 , &H8C , &H18 , &H30 , &H60 , &HC2 , &HC6 , &HFE , &H0 , &H0       ''Z'90
Data &H0 , &H0 , &H0 , &H0 , &H78 , &HC , &H7C , &HCC , &HDC , &H76 , &H0 , &H0       ''a'97
Data &H0 , &HE0 , &H60 , &H60 , &H7C , &H66 , &H66 , &H66 , &H66 , &HFC , &H0 , &H0       ''b'98
Data &H0 , &H0 , &H0 , &H0 , &H7C , &HC6 , &HC0 , &HC0 , &HC6 , &H7C , &H0 , &H0       ''c'99
Data &H0 , &H1C , &HC , &HC , &H7C , &HCC , &HCC , &HCC , &HCC , &H7E , &H0 , &H0       ''d'100
Data &H0 , &H0 , &H0 , &H0 , &H7C , &HC6 , &HFE , &HC0 , &HC6 , &H7C , &H0 , &H0       ''e'101
Data &H0 , &H1C , &H36 , &H30 , &H30 , &HFC , &H30 , &H30 , &H30 , &H78 , &H0 , &H0       ''f'102
Data &H0 , &H0 , &H0 , &H0 , &H76 , &HCE , &HC6 , &HC6 , &H7E , &H6 , &HC6 , &H7C       ''g'103
Data &H0 , &HE0 , &H60 , &H60 , &H6C , &H76 , &H66 , &H66 , &H66 , &HE6 , &H0 , &H0       ''h'104
Data &H0 , &H18 , &H18 , &H0 , &H38 , &H18 , &H18 , &H18 , &H18 , &H3C , &H0 , &H0       ''i'105
Data &H0 , &HC , &HC , &H0 , &H1C , &HC , &HC , &HC , &HC , &HCC , &HCC , &H78       ''j'106
Data &H0 , &HE0 , &H60 , &H60 , &H66 , &H6C , &H78 , &H6C , &H66 , &HE6 , &H0 , &H0       ''k'107
Data &H0 , &H38 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H3C , &H0 , &H0       ''l'108
Data &H0 , &H0 , &H0 , &H0 , &H6C , &HFE , &HD6 , &HD6 , &HC6 , &HC6 , &H0 , &H0       ''m'109
Data &H0 , &H0 , &H0 , &H0 , &HDC , &H66 , &H66 , &H66 , &H66 , &H66 , &H0 , &H0       ''n'110
Data &H0 , &H0 , &H0 , &H0 , &H7C , &HC6 , &HC6 , &HC6 , &HC6 , &H7C , &H0 , &H0       ''o'111
Data &H0 , &H0 , &H0 , &H0 , &HDC , &H66 , &H66 , &H66 , &H7C , &H60 , &H60 , &HF0       ''p'112
Data &H0 , &H0 , &H0 , &H0 , &H76 , &HCC , &HCC , &HCC , &H7C , &HC , &HC , &H1E       ''q'113
Data &H0 , &H0 , &H0 , &H0 , &HDC , &H66 , &H60 , &H60 , &H60 , &HF0 , &H0 , &H0       ''r'114
Data &H0 , &H0 , &H0 , &H0 , &H7C , &HC6 , &H70 , &H1C , &HC6 , &H7C , &H0 , &H0       ''s'115
Data &H0 , &H30 , &H30 , &H30 , &HFC , &H30 , &H30 , &H30 , &H36 , &H1C , &H0 , &H0       ''t'116
Data &H0 , &H0 , &H0 , &H0 , &HCC , &HCC , &HCC , &HCC , &HCC , &H76 , &H0 , &H0       ''u'117
Data &H0 , &H0 , &H0 , &H0 , &HC6 , &HC6 , &HC6 , &H6C , &H38 , &H10 , &H0 , &H0       ''v'118
Data &H0 , &H0 , &H0 , &H0 , &HC6 , &HC6 , &HD6 , &HD6 , &HFE , &H6C , &H0 , &H0       ''w'119
Data &H0 , &H0 , &H0 , &H0 , &HC6 , &H6C , &H38 , &H38 , &H6C , &HC6 , &H0 , &H0       ''x'120
Data &H0 , &H0 , &H0 , &H0 , &HC6 , &HC6 , &HC6 , &HCE , &H76 , &H6 , &HC6 , &H7C       ''y'121
Data &H0 , &H0 , &H0 , &H0 , &HFE , &H8C , &H18 , &H30 , &H62 , &HFE , &H0 , &H0       ''z'122
Data &H0 , &H0 , &H0 , &H0 , &H0 , &H7E , &H60 , &H60 , &H60 , &H0 , &H0 , &H0       ''©'169
Data &H0 , &H0 , &H0 , &H36 , &H6C , &HD8 , &H6C , &H36 , &H0 , &H0 , &H0 , &H0       ''®'174
Data &HDD , &H77 , &HDD , &H77 , &HDD , &H77 , &HDD , &H77 , &HDD , &H77 , &HDD , &H77       ''²'178
Data &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18 , &H18       ''³'179
Data &H0 , &H0 , &H0 , &H0 , &H0 , &H0 , &HFF , &H0 , &H0 , &H0 , &H0 , &H0       ''Ä'196
Data &H0 , &H0 , &H0 , &H0 , &H0 , &H0 , &H3F , &H36 , &H36 , &H36 , &H36 , &H36       ''Ö'214
Data &H0 , &H0 , &H0 , &H0 , &H0 , &H0 , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF       ''Ü'220
Data &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &H0 , &H0 , &H0 , &H0 , &H0 , &H0       ''ß'223
Data &H0 , &HFE , &HC6 , &H62 , &H30 , &H18 , &H30 , &H62 , &HC6 , &HFE , &H0 , &H0       ''ä'228
Data &H0 , &H3E , &H60 , &H30 , &H3C , &H66 , &HC6 , &HC6 , &HCC , &H78 , &H0 , &H0       ''ë'235
Data &H0 , &H0 , &H18 , &H18 , &H0 , &H7E , &H0 , &H18 , &H18 , &H0 , &H0 , &H0       ''ö'246
Data &HD8 , &H6C , &H6C , &H6C , &H6C , &H0 , &H0 , &H0 , &H0 , &H0 , &H0 , &H0       ''ü'252