Forum: Mikrocontroller und Digitale Elektronik EA DOG M162W-A


von Mario (Gast)


Angehängte Dateien:

Lesenswert?

Hallo
ich habe ein Problem

und zwar: sobald ich ein LCD Display mit einem HD44780 Controller an 
meine Schaltung anschließe funktioniert alles wunderbar.. Betreibe es im 
4Bit Modus

nun würde ich aus Platzgründen gerne ein EA DOG M162W-A verbauen aber 
sobald ich es anstecke bekomme ich keine Anzeige am Display nicht nicht 
einmal
einen Cursor oder dergleichen.

Verwende den PIC16F628A

Anbei die funktionierende Schaltung als JPG

bitte um hilfe

von spess53 (Gast)


Lesenswert?

Hi

>nun würde ich aus Platzgründen gerne ein EA DOG M162W-A verbauen aber
>sobald ich es anstecke bekomme ich keine Anzeige am Display nicht nicht
>einmal einen Cursor oder dergleichen.

Wie, direkt an den Steckverbinder?

Ausserdem braucht das Dog-Display eine andere Initialisierung.

MfG Spess

von Mario (Gast)


Lesenswert?

ok danke

habts ihr vl. eine Seite wo die Initialisierung für 4 Bit beschrieben 
ist?

von spess53 (Gast)


Lesenswert?

Hi

>habts ihr vl. eine Seite wo die Initialisierung für 4 Bit beschrieben
>ist?

Datenblatt vom ST7036.

MfG Spess

von Matthias K. (matthiask)


Lesenswert?

Nur die prinzipielle Initsequenz. Musst es natürlich noch an den 
speziellen µC anpassen, exaktes Timing usw.
1
// ***********************************************************************
2
// Grundinitialisierung des LCD-Moduls
3
// DOGM-162, 4-Bit parallel, 5V
4
// ***********************************************************************
5
void init_lcd(void) {
6
byte i_n;
7
  delay(100);         // Wartezeit nach POWER-ON
8
  LCD_DATA7 = 0;     // Initialisierung 3x 0011 xxxx 
9
  LCD_DATA6 = 0;
10
  LCD_DATA5 = 1;
11
  LCD_DATA4 = 1;
12
  for( i_n = 3; i_n; i_n--){      
13
    delay(20);
14
    LCD_RW = 0;
15
    LCD_RS = 0;
16
    LCD_E1 = 1;
17
    _asm nop; nop; nop; _endasm;     // Impulsverzögerung
18
    LCD_E1 = 0;
19
  }
20
  delay(20);
21
  LCD_DATA7 = 0;     // Initialisierung 0010 xxxx (4-Bit Mode) 
22
  LCD_DATA6 = 0;
23
  LCD_DATA5 = 1;
24
  LCD_DATA4 = 0;
25
  LCD_E1 = 1;
26
  _asm nop; nop; nop; nop; _endasm;     // Impulsverzögerung
27
  LCD_E1 = 0;
28
  delay(20);
29
  
30
  // Grundinitialisierung durchgeführt
31
  write_lcd(0x29,1);               // 4-Bit IS 0,1
32
  write_lcd(0x1C,1);               // BS: 1/4, 2 Zeilen
33
  write_lcd(0x52,1);               // 52 Boster aus, Kontrast C5,C4
34
  write_lcd(0x69,1);               // 69 Spannungsfolger und Verstärkung
35
  write_lcd(0x74,1);               // Kontrast C3,C2,C1
36
  write_lcd(0x0F,1);               // Display ein, Cursor ein, Cursor blinken
37
  write_lcd(0x06,1);               // Autoincrement
38
  clear_lcd();
39
}

von Mario (Gast)


Lesenswert?

ok dankee
warum muss das bei diesem Controller Typ so kompliziert sein :S

von Matthias K. (matthiask)


Lesenswert?

Ist nicht wirklich kompliziert. Dafür kann der auch mehr. zB. 3.3V, 
keine Kontrastspannung erf., Kontrast per Software einstellbar, 
SPI-Ansteuerung um nur einiges zu nennen.

von Mario (Gast)


Lesenswert?

hat irgendwer die initialisierung im Assembler schon geschrieben??

suche und suche aber finde nix

ich brauche die Initialisierung für 4Bit/5V.......

haben wir heute schon mit lehrern versucht zu lösen, aber haben trotzdem 
keien Lösung gefunden....

PIC16F628A

Assembler

lg

von Johannes M. (johannesm)


Lesenswert?

Beim Hersteller gibts da fertige Sachen: 
http://www.lcd-module.de/download.html . Da müßte man sich eigentlich 
die wichtigsten Dinge abschauen können.

von Mario (Gast)


Angehängte Dateien:

Lesenswert?

ok

nun habe ich das Display so initialisiert

movlw   B'00110000'   ; 2
   call   Control8Bit
   movlw   B'00110000'   ; 3
   call    Control8Bit
   movlw   B'00100000'   ; 4
   call    Control8Bit


   movlw   B'00111000'   ; Function set
   call   OutLcdControl
   movlw   B'00111000'   ; Function set
   call   OutLcdControl
   movlw   B'00111000'   ; Function set
   call   OutLcdControl
   movlw   B'00100000'   ; Function set
   call   OutLcdControl
   movlw   B'00101000'   ; Function set
   call   OutLcdControl
   movlw   B'00010000'   ; Internal OSC frequency
   call   OutLcdControl
   movlw   B'01111111'   ; Contrast Set
   call   OutLcdControl
   movlw   B'01011111'   ; Power/ICON/Contrast controll
   call   OutLcdControl
   movlw   B'00111100'   ; Follower controll
   call   OutLcdControl
   movlw   B'00001111'   ; Display ON/OFF control
   call   OutLcdControl

und es geht noch immer nicht, an was kann es liegen??

im anhang das unveränderte Programm

von Mario (Gast)


Lesenswert?

Mario schrieb:
> ok
>
> nun habe ich das Display so initialisiert
>
> movlw   B'00110000'   ; 2
>    call   Control8Bit
>    movlw   B'00110000'   ; 3
>    call    Control8Bit
>    movlw   B'00100000'   ; 4
>    call    Control8Bit
>
>
>    movlw   B'00111000'   ; Function set
>    call   OutLcdControl
>    movlw   B'00111000'   ; Function set
>    call   OutLcdControl
>    movlw   B'00111000'   ; Function set
>    call   OutLcdControl
>    movlw   B'00100000'   ; Function set
>    call   OutLcdControl
>    movlw   B'00101000'   ; Function set
>    call   OutLcdControl
>    movlw   B'00010000'   ; Internal OSC frequency
>    call   OutLcdControl
>    movlw   B'01111111'   ; Contrast Set
>    call   OutLcdControl
>    movlw   B'01011111'   ; Power/ICON/Contrast controll
>    call   OutLcdControl
>    movlw   B'00111100'   ; Follower controll
>    call   OutLcdControl
>    movlw   B'00001111'   ; Display ON/OFF control
>    call   OutLcdControl
>
> und es geht noch immer nicht, an was kann es liegen??
>
> im anhang das unveränderte Programm


alsoo ich habe jz. diese Lösung probiert tut sich aber trotzdem noch nix

   movlw   B'00111000'   ; Function set
   call   Control8Bit    ; <- Achtung, keine Busyabfrage möglich
   movlw   B'00111000'   ; Function set
   call   Control8Bit    ; <- Achtung, keine Busyabfrage möglich
   movlw   B'00111000'   ; Function set
   call   Control8Bit    ; <- Achtung, keine Busyabfrage möglich
   movlw   B'00100000'   ; Function set
   call   OutLcdControl
   movlw   B'00101000'   ; Function set
   call   OutLcdControl
   movlw   B'00010000'   ; Internal OSC frequency
   call   OutLcdControl
   movlw   B'01111111'   ; Contrast Set
   call   OutLcdControl
   movlw   B'01011111'   ; Power/ICON/Contrast controll
   call   OutLcdControl
   movlw   B'00111100'   ; Follower controll
   call   OutLcdControl
   movlw   B'00001111'   ; Display ON/OFF control
   call   OutLcdControl

hat jemand eine idee, die Lehrer wissen auch nicht woran es liegt alsoo 
seits ihr meine letzte hoffnung :D

lg mario

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.