Display mit SED1530

Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2089
Registered: 03 / 2003
Subject:

Display mit SED1530

 · 
Posted: 11.04.2011 - 22:23  ·  #1
Hallo,

ich habe mal wieder ein neues Display und möchte es nur mal so zum laufen bekommen. Controller ist ein SED1530 und natürlich habe ich das Demoprogramm SED1531 angeschaut. Leider habe ich von Assembler keine Ahnung und das Demo enthält Assembler. Kann ich einfach im Demo
Code

procedure LCD_SEDout(cmd : boolean; data : byte);
begin
  A0:= not cmd;
  cs:= 0;
  // note: no other PortG accesses while this procedure is running!!
  ASM;
    LDD       _ACCA, Y+00
    LDI       _ACCB, 8
  SoutLp:
    ;IN       _ACCALO, PortX
    LDS       _ACCALO, PortG;     // "LDS" because PortG is not in IO area
    LSL       _ACCA
    BRCS      Sout1
    CBR       _ACCALO, 10h;       // = bit 4 cleared
    RJMP      Sout2
  Sout1:
    SBR       _ACCALO, 10h;       // = bit 4 set
  Sout2:
    ; store bit value into port
    ;OUT      PortX, _ACCALO
    STS       PortG, _ACCALO;     // "STS" because PortG is not in IO area
    NOP;
    NOP;
    ; scl:= 1;
    SBR       _ACCALO, 04h;       // = bit 2 set
    ; store hi-clock into port
    ;OUT      PortX, _ACCALO
    STS       PortG, _ACCALO;     // "STS" because PortG is not in IO area
    NOP;
    NOP;
    ; scl:= 0;
    CBR       _ACCALO, 04h;       // = bit 2 cleared
    ; store lo-clock into port
    ;OUT      PortX, _ACCALO
    STS       PortG, _ACCALO;     // "STS" because PortG is not in IO area
    DEC       _ACCB
    BRNE      SoutLp
  endasm;
  cs:= 1;
end;

die "PortG" gegen "PortC" tauschen und gut ists ?

Und ich vermute mal im Demo das bit 4 cleared und bit 4 set bewirkt die Datenübernahme (SI) und das gleich mit Bit 2 ergibt das CLK-Signal. Liege ich hier richtig ? Dementsprechend muß ich diese beiden Stellen auch an meine Belegung anpassen ?

Mein Display hat zusätzlich zum /CS ein CS (gegenpolig zum /CS) und einen Pin MS (der muß auf +5V).

gruss
Harry
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Display mit SED1530

 · 
Posted: 12.04.2011 - 10:56  ·  #2
Hi Harry.

One thing to be careful of is that PortC is in the IO area, so you should use OUT rather than STS, e.g.

OUT PortC, _ACCALO not
STS PortC, _ACCALO.

Similarly for IN and LDS.

The comments make this clear.

As for rest, I do not know.

Regards

Merlin.
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   50   63 · Page-Gen-Time: 0.021465s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI