Grafikdisplay und Mega16

Mar 01, 2006 2 Replies

Hallo Leute,



hab ein Board von Deltawave mit nem Grafik LCD mit T6963C und einem AVR MEGA16 drauf. Das möchte ich nun unter AVR BASCOM bedienen. Möchte, aber geht nicht. Hat jemand damit Erfahrung gesammelt?



Die Pins hab ich zugeteilt und den Datenbus umgedreht (D7 = D0 ...)


Gruss Kurt



Hallo,

"Kurt Bindl" schrieb im Newsbeitrag news:du3lpl$nvf$00$ snipped-for-privacy@news.t-online.com...

Ein paar mehr Infos wären nicht schlecht. Welche Bascom Version nutzt Du? Wie sieht Dein Quellcode aus?

Jan

BASCOM-AVR 1.11.7.7

$regfile = "M16def.dat" $crystal = 4433618 '$baud = 2400

Config Portc = Output Config Porta = Output

Config Graphlcd = 128 * 64 , Dataport = Portc , Controlport = Porta , Ce = 5 , Cd = 6 , Wr = 3 , Rd = 4 , Reset = 7 , Fs = 0 , Mode = 8

'The dataport is the portname that is connected to the data lines of the LCD 'The controlport is the portname which pins are used to control the lcd 'CE, CD etc. are the pin number of the CONTROLPORT. ' For example CE =2 because it is connected to PORTC.2 'mode 8 gives 240 / 8 = 30 columns , mode=6 gives 240 / 6 = 40 columns

'Dim variables (y not used) Dim X As Byte , Y As Byte

'Clear the screen will both clear text and graph display Cls 'Other options are : ' CLS TEXT to clear only the text display ' CLS GRAPH to clear only the graphical part

'locate works like the normal LCD locate statement ' LOCATE LINE,COLUMN LINE can be 1-8 and column 0-30

Locate 1 , 1

'Show some text

Lcd "MCS Electronics" 'And some othe text on line 2 Locate 2 , 1 : Lcd "T6963c support"

'wait 1 sec Wait 1

' draw a line using PSET X,Y, ON/OFF ' PSET on.off param is 0 to clear a pixel and any other value to turn it on For X = 0 To 140 Pset X , 20 , 255 ' set the pixel Next

Wait 1

'Now it is time to show a picture 'SHOWPIC X,Y,label 'The label points to a label that holds the image data ''Showpic 0 , 0 , Plaatje

Wait 1

Cls Text

Aa:

Wait 1

Set Porta.1 ' LED-Test um zu sehen wie weit er kommt Set Porta.0

Wait 1 Reset Porta.1 Reset Porta.0 Goto Aa

Wait 1

' clear the text End

'This label holds the mage data Plaatje: '$BGF will put the bitmap into the program at this location $bgf "mcs.bgf"

' 'You could insert other picture data here

Das Programmchen wird compil. und übertragen. Die LED's blinken auch

Display bleibt "sauber"

Mit dem original M16 läuft es (da sind aber die Pins umgedreht)

C0 D7 C1 D6 ..

Kurt

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required