GR Display EA DIP122-5

wom
 
Avatar
 
Subject:

GR Display EA DIP122-5

 · 
Posted: 13.05.2011 - 09:50  ·  #1
Hallo an alle,

hat jemand schon mit dem GR-Display EA DIP122-5 von Elektronic-Assembly gearbeitet ? Hier wird der PT6520 eingesetzt.

Gruß an alle
wom
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2133
Registered: 03 / 2003
Subject:

Re: GR Display EA DIP122-5

 · 
Posted: 15.05.2011 - 13:24  ·  #2
hi wom,

das ist das 122x32 pixel-LCD ? ja hab ich in betrieb.

gruss
harry
wom
 
Avatar
 
Subject:

Re: GR Display EA DIP122-5

 · 
Posted: 15.05.2011 - 20:09  ·  #3
hallo harry,
mit welcher init-rutinen/treiber hast du gearbeitet, ggf. hast du ein kleines demo ?

gruß
wom
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2133
Registered: 03 / 2003
Subject:

Re: GR Display EA DIP122-5

 · 
Posted: 15.05.2011 - 20:50  ·  #4
hi wom,

ich betreibe das display per TWI mit einem PCA9555. die negative kontrastspannung erzeuge ich mit einem MAX202 :D

Code

Import SysTick, TWIMaster;

LCDGraphic     = 128, 32, 8;
LCDgraphMode   = column, iData;
DefCharSet     = 'Graphchars.pchr';
GViewports     = 1, iData;
TGraphStr      = 8;

Const
  PCA9555         : Byte = $20;

Var
  CtrlPortSave      : Byte;
  Col               : Byte;                       { column counter             }
  CurRow            : Byte;                       { storage for 2. controller  }
  IsCtrlTwo         : Boolean;

Procedure WriteLCD(Arg: Byte; IsData: Boolean);
  Var Mask : Byte;
  Begin
    If IsData
      then
        Mask:=$14;                                       // Daten
      else
        Mask:=$10;                                       // Befehl
      EndIf;
    TWIOut(PCA9555,$02,Arg);                             // Output arg
    If IsCtrlTwo
      then
        TWIOut(PCA9555,$03,(Mask or $08));               // Controller 2
      else
        TWIOut(PCA9555,$03,(Mask or $01));               // Controller 1
      EndIf;
    TWIOut(PCA9555,$03,Mask);
  End WriteLCD;

  
Procedure GraphInit;
  Begin
    IsCtrlTwo := false;                                  // controller 1
    WriteLCD(%10101111,false);                           // display on
    WriteLCD(%11000000,false);                           // start line 0
    WriteLCD(%10111000,false);                           // page 0
    WriteLCD(%00000000,false);                           // address 0
    IsCtrlTwo := true;                                   // controller 2
    WriteLCD(%10101111,false);                           // display on
    WriteLCD(%11000000,false);                           // start line 0
    WriteLCD(%10111000,false);                           // page 0
    WriteLCD(%00000000,false);                           // address 0
    gClrScr(0);
    gDispRefresh;
  End GraphInit;


{$D-}
UserDevice GraphIOS(Cmd: Byte; Arg: byte);
  Begin
    If Cmd=0 then                                        // set row addr
      CurRow:=arg;
      IsCtrlTwo:=false;                                  // controller 1
      WriteLCD(%10111000+CurRow,false);                  // page
      WriteLCD(%00000000,false);                         // address 0
      Col:= 0;
    else
      If Col=61                                          // if column = 61 then switch to controller 2
        then
          IsCtrlTwo:=true;                               // controller 2
          WriteLCD(%10111000+CurRow,false);              // page
          WriteLCD(%00000000,false);                     // address 0
          WriteLCD(Arg,true);
          Inc(Col);
        else
          If Col<122
            then                                         // only column 0..121 are valid
              WriteLCD(Arg,true);
              Inc(Col);
            Endif;
        EndIf;
    EndIf;
  End GraphIOS;
{$D+}


Procedure Init9555;
  Begin
    TWIout(PCA9555,$02,0);                               // all pins null   - Datenport
    TWIout(PCA9555,$03,0);                               // all pins null   - Controlport
    TWIout(PCA9555,$06,0);                               // all pins output
    TWIout(PCA9555,$07,0);                               // all pins output
    MDelay(10);
    TWIout(PCA9555,$03,$10);                             // remove reset
  End Init9555;


der rest wie man eben ein display anspricht ;)

gruss
harry
wom
 
Avatar
 
Subject:

Re: GR Display EA DIP122-5

 · 
Posted: 19.05.2011 - 08:17  ·  #5
Hallo harry,

da komme ich weiter

danke
wom
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 13   92   105 · Page-Gen-Time: 0.02343s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI