-         

Ergebnis 1 bis 2 von 2

Thema: T6963 Setfont Lcdat

  1. #1

    T6963 Setfont Lcdat

    Anzeige

    Hallo!

    Als relativer Frischling im Bereich Bascom und Atmega128 hätte ich da mal einige Fragen. Kann es sein, dass es mit dem Atmega128 und einem 240x128 Display mit T6963C Controller nicht möglich ist die Befehle Setfont und Lcdat zu benutzen? Gibt es eine andere Möglichkeit Schrift auf diesem Display zu änderen bzw. punktgenau zu justieren (eventuell auch andere Programmiersprache)? LCDHype kann sowas mit dem PC über die parallele Schnittstelle.

    Gruß und Dank

  2. #2
    Erfahrener Benutzer Roboter Experte
    Registriert seit
    18.05.2007
    Ort
    Berlin
    Alter
    46
    Beiträge
    765
    Wenn Dein Display über Speicher verfügt und die gleichen Adressen wie meines hat, dann könntest du folgendes machen:

    Sub deklarieren
    Code:
    declare sub Sonderzeichen()
    Dann LCD Initialisieren
    Code:
    Config Graphlcd = 240 * 64 , Dataport = Porta , Controlport = Portc , Ce = 2 , Cd = 3 , Wr = 0 , Rd = 1 , Reset = 4 , Mode = 6       ', Fs = 5 , Mode = 6
    
    call sonderzeichen
    und nach der Hauptschleife (Do...Loop)
    Code:
    Sub Sonderzeichen()
    $asm
     ldi r24,&h03    ;CG-RAM
      rcall _GWrite_Data
      clr r24
      rcall _GWrite_Data
      ldi r24,&H22
      rcall _GWrite_Cmd
    
      clr r24     ;CG-RAM komplett gefüllt - 160
      rcall _GWrite_Data
      ldi r24,&h1c
      rcall _GWrite_Data
      ldi r24,&H24
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
    
    
      ldi r24,&h1e   ;CG-Ram gefülltes O - 161
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hFF
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1e
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff   ;CG-Ram Antenne - 162
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hff
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1e
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1e
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h0c
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h0c
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24   ;CG-Ram Smilie - 163
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h14
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h22
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1c
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
    
    
      ldi r24,&h30   ;CG-Ram PR - 164
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h28
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h30
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h26
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h25
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h06
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h05
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h05
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1f   ;CG-Ram PR liegend 31,5,2,32,31,5,26,32 - 165
      rcall _GWrite_Data         ; 1f, 05,02,20,1f,05,1a,20
      ldi r24,&Hc0               ;stehend 30,28,30,26,25,6,5,5
      rcall _GWrite_Cmd
    
      ldi r24,&h05
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h02
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h20
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1f
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h05
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1a
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h20
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
    
      ldi r24,&h1f   ;CG-Ram PC liegend 31,5,2,32,14,17,10,32 - 166
      rcall _GWrite_Data         ; 1f, 05,02,20,0e,11,0a,20
      ldi r24,&Hc0               ; stehend 30,28,32,25,24,5,2,0
      rcall _GWrite_Cmd
    
      ldi r24,&h05
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h02
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h00
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h0e
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h11
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h0a
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h00
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
    
      clr r24      ;Herz 0,36,7F,7F,3E,1C,8,0 - 167
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&hA
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1F
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1F
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h0E
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h04
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
    
      clr r24   ;CG-Ram trauriges Smilie - 168
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h14
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h1c
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h22
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
    
      clr r24   ;CG-Ram neutrales Smilie - 169
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h14
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      ldi r24,&h3E
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
      clr r24
      rcall _GWrite_Data
      ldi r24,&Hc0
      rcall _GWrite_Cmd
    
    
    
    
    $end Asm
    
    
    End Sub
    Die Sonderzeichen sind dann ab 160 zu finden
    Code:
    Lcd Chr(160)
    Ich hoffe du kannst erkennen, wo die Daten Eingetragen werden müssen. Bei einigen habe ich die HEX Codes als Bemerkung hintergeschrieben, diese werden dann nach und nach zum Display geschickt.

    edit:
    Die Zeichen habe ich für den Small Font (6 Punkte) erstellt.
    Kann sein, dass das nicht der optimale Weg ist, so habe ich es dann aber nach Studieren des Datenblattes vom LCD gelöst.

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •