Hi,

ich habe ein LCD von Optrex DMF5006NY-FW.
Zum testen habe ich es an meine Atmega8 geklemmt und folgenden Code verwendet:
Code:
'--------------------------------------------------------------------
'                         SED.BAS
' demonstrates the SED based graphical display support
'--------------------------------------------------------------------
'some routines to control the display are in the glcdSED.lib file
$regfile = "m8def.dat"                                      'ATmega8-Deklarationen
$crystal = 1000000                                          'Quarz: 3,6864 MHz
$lib "glcdSED.lbx"





'First we define that we use a graphic LCD
Config Graphlcd = 128 * 64sed , Dataport = Portd , Controlport = Portc , Ce = 5 , Cd = 4 , Wr = 3 , Rd = 2 , Reset = 1

'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 =CS  Chip Enable/ Chip select
'CD=A0   Data direction
'WR= Write
'RD=Read
'RESET = reset

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


'clear the screen
'Cls
 Lcd "wer"
'specify the font we want to use
'Setfont Font16x16
For X = 0 To 140
   Pset X , 20 , 255                                        ' set the pixel
Next

Line(0 , 0) -(23 , 27) , 255
Pset 10 , 10 , 1
'You can use locate but the columns have a range from 1-132

'When you want to show somthing on the LCD, use the LDAT command
'LCDAT Y , COL, value
'Locate 1 , 1
 Lcd "123"
'lcdat accepts an additional param for inversing the text
Lcdat 2 , 1 , "123" , 1                                     ' will inverse the text

'Now use a different font
'Setfont Font8x8
'since the 16*16 font uses 2 rows, show on row 3
'Lcdat 3 , 1 , "123"

'End                                                         'end program



'Optional try this out by unremarking the block remarks
'draw a line
Line(0 , 0) -(128 , 64) , 1
'Line(0 , 64) -(128 , 0) , 1
'check for circles

Wait 2
Display Off
Wait 2
Display On

'use glcdcmd to send a control byte to the display
Glcdcmd &HA7                                                ' reverse display
Wait 1
Glcdcmd &HA6                                                ' normal display

'adjust contrast
For X = 0 To 63
  Glcdcmd &H81                                              ' electronic volume (contrast)
  Glcdcmd X                                                 ' higher means more contrast
  Waitms 100
Next

'you could display a picture too
'Showpic 8 , 8 , Plaatje
End


'end of block remark on line above

'we need to include the font files
'$include "font8x8.font"
'$include "font16x16.font"


'Plaatje:
'include the picture data
'$bgf "smile.bgf"
Das ist einfach nur das Testbeispiel. Leider ist das Display grösser als 128 x 64, vieleicht 240 x 128 Pixel genau weis ich das nicht. (ich kann sie ja mal zählen)
Der Anzeigebereich ist 120mm x 75mm.
Im Beispiel und in der Hilfe steht für den SED Chipsatz muss man 128 x 64 benutzen.
Nun meine Frage wie soll das gehen wen das Display grösser ist, es zeigt nix an nur wenn das Programm läuft tauchen kurz weiße Linien auf die aber gleich wieder verschwinden. Bei erneuten Reset des Atmega 8 kommt das selbe wieder.
Ich habe folgende Pinbelegung für das LCD mir zusammen gesucht

  • 1. D0
    2. D1
    3. D2
    4. D3
    5. D4
    6. D5
    7. D6
    8. D7
    9. CS (Ce)
    10. A0 (Cd)
    11. WR
    12. RD
    13. RES (Reset)
    14. Vdd (+5V)
    15. Vss (GND )
    16. Vcont (10K mittlerer Pin am Potentiometer)
    17. Vee (negativ voltage)
    18. SEL1


Kann mir jemand helfen ich wies nicht mehr weiter, ich sitz daran schon seit ein paar Tagen und komme nicht voran!!!