Forum: Mikrocontroller und Digitale Elektronik Electronic Assembly DOG 128x64 Punkte LCD Display


von Timo (Gast)


Lesenswert?

Hallo zusammen,
ich habe schon einige Artikel über das Display gelesen aber nicht ganz 
fündig geworden.
Ich bin erst nach dem Init. auf die Beiträge gestoßen aber immerhin 
klappt die Initialisieurng bei mir - werde diese auch mal posten.

Ich arbeite mit einem Renesas M32C µC (Starter Kit) und bin über 4 Draht 
SPI mit dem LCD verbunden.
1
void init_Display(void)
2
{  RS_PIN = SET_BIT_HIGH;              /* Reset = High */
3
  
4
  /* Power Up Delay for LCD Module */
5
  CS_PIN = SET_BIT_HIGH;
6
  DisplayDelay(7);
7
  CLK_PIN = SET_BIT_HIGH;
8
  DisplayDelay(1);
9
  CS_PIN = SET_BIT_LOW;
10
  DisplayDelay(1);
11
  CLK_PIN = SET_BIT_LOW;
12
13
  // LCD Initialization
14
  LCD_write(LCD_start_line_0);
15
  LCD_write(ADC_reverse);
16
  LCD_write(Common_normal);
17
  LCD_write(Display_normal);
18
  LCD_write(LCD_bias_9);
19
  LCD_write(Power_control);
20
  LCD_write(Booster_ratio_1);
21
  LCD_write(Booster_ratio_2);
22
  LCD_write(Contrast_1);
23
  LCD_write(Contrast_2);
24
  LCD_write(Contrast_3);
25
  LCD_write(Static_indicator_1);
26
  LCD_write(Static_indicator_2);
27
  LCD_write(Display_ON);  
28
  
29
  DisplayDelay(7);
30
  LCD_CLR();
1
void LCD_write(unsigned char value)
2
{
3
  int i = 7;
4
  for(i=7;i>=0;i--)
5
  {
6
    if(  BIT_TST(value, i) )
7
    {  
8
      SI_PIN = SET_BIT_HIGH;
9
      CLK_PIN = SET_BIT_HIGH;
10
      CLK_PIN = SET_BIT_LOW;
11
    }
12
    else
13
    { 
14
      SI_PIN = SET_BIT_LOW;
15
      CLK_PIN = SET_BIT_HIGH;
16
      CLK_PIN = SET_BIT_LOW;
17
    }    
18
  }  
19
}

Ich kann auch die Pixel ansteuern..aber ich frage mich wie ich die 
Character Liste von http://www.lcd-module.de/eng/pdf/zubehoer/st7036.pdf 
Seite 22 verwenden kann
Allgemein wie kann ich die Befehle von S26 reinschreiben.
Ich habe nur eine kleine Befehlsliste direkt von dem LCD, was auch 
funktioniert aber wie ich auf diese Liste zugreifen kann weiss ich 
einfach nicht...

Viele Grüße
Timo

von Timo (Gast)


Lesenswert?

Meine Commands (Headerdatei)
1
/**** Pins *****************************************************************/
2
#define RS_PIN         p2_0      /* Display Reset  pin */  
3
#define CS_PIN        p2_1      /* Display Chip Select pin */    
4
#define A0_PIN        p2_4      /* Display A0 pin */  
5
#define CLK_PIN        p2_5      /* Display Serial CLK pin */  
6
#define SI_PIN        p2_6      /* Display Serial Data IN pin */
7
8
9
/**** Commands *************************************************************/
10
#define Display_ON      0xAF      /* LCD ON */
11
#define Display_OFF      0xAE      /* LCD OFF */
12
#define LCD_start_line_0  0x40      /* Display start line address: 0 */    
13
#define ADC_normal      0xA0      /* Sets the display RAM address SEG output correspondence */
14
#define ADC_reverse      0xA1      /* Sets the display RAM address SEG output correspondence */
15
#define Display_normal    0xA6      /* LCD display normal */
16
#define Display_reverse    0xA7      /* LCD display reverse */
17
#define Display_all_ON    0xA5      /* Display all points: ON */
18
#define Display_all_OFF    0xA4      /* Display all points: OFF (normal display) */
19
#define LCD_bias_9      0xA2      /* LCD drive voltage bias ratio: 1/9 */
20
#define LCD_bias_7      0xA2      /* LCD drive voltage bias ratio: 1/7 */
21
#define LCD_Reset      0xE2      /* Internal reset */
22
#define Common_normal    0xC0      /* COM output: normal direction */
23
#define Common_reverse    0xC8      /* COM output: reverse direction */
24
#define Power_control    0x2F      /* Sets internal power supply */
25
26
#define Contrast_1      0x27
27
#define Contrast_2      0x81
28
#define Contrast_3      0x16
29
#define Static_indicator_1  0xAC      /* Static indicator off */
30
#define Static_indicator_2  0x00      /* Static indicator register set */
31
#define Booster_ratio_1    0xF8      /* booster ratio: 4x */
32
#define Booster_ratio_2    0x00

von Timo (Gast)


Lesenswert?

Doch noch einmal
ich hab eben das neue Dokument von EA runtergeladen und dort ist nun ein 
anderes LCD Board angegeben
http://www.mct.de/download/ea/dogm128.pdf

Nämlich dieses hier: ST7565
http://www.lcd-module.de/eng/pdf/zubehoer/st7565r.pdf

Vielleicht werde ich nun schlauer....

Aber wenn jemand das LCD kennt kann sich gern mal melden

Gruß
Timo

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.