help lcd

estou utilizando o arduino mega 2560 e o lcd abaixo

estou utlizando a lib rc2
estou tentando utilizar o codigo de exemplo ->glcd → glcddiags

pelo o que eu entendi o que tenho que fazer é apenas colocar o #include <glcd_Config.h> e colocar a minha IDE para o arduino mega 2560

as pingagens estou utilizando como mostra no doc da lib glcd

paninel B

mas não mostra nada no LCD , por favor !!!

tradutor google
I am using the Arduino and the LCD below 2560 mega

I utlize the lib rc2
I’m trying to use the sample code → GLCD → glcddiags

from what I understand I have to do is just put the # include <glcd_Config.h> and put my IDE for Arduino mega 2560

I am using the pingagens as shown in the doc lib GLCD

paninel B

but shows nothing on the LCD, please!

Need hi-res pictures followed by code.

ola liudr
eu não entendi o que você falou,

Hello liudr
I do not understand what you said,

Steps: 1) you provide picture of your lcd 2) you provide code you use 3) you receive help

LCD 128x64 é um ST7920


YB12864ZB.pdf (319 KB)


tentei utilizar como mostra o link acima a tabela de ligações mas sem sucesso

I tried using the link above shows how the table of links but without success

fonte em anexo

GLCDdiagsAugusto.pde (25.7 KB)

The pictures are not good enough to see connections.

What did you solder on the display? Are they header pins or short wires? I don't know if soldering was good on any of the pins.

Does the lcd light up (back light)?




vou tirar melhores fotos das ligações e envio mais tarde

I'll take better pictures of the connections and later delivery

According to the datasheet, the display you have is a different internal geometry than most of the 128x64 displays so it is not compatible with the default glcd library configuration. Most 128x64 glcd displays are 2 (64x64) displays internally. Your display is 2 (128x32) displays internally. The library can be reconfigured to support this.

You must edit the panel configuration file: glcd/config/ks0108_Panel.h

You must change a few defines: Change:

// panel controller chips
#define CHIP_WIDTH     64  // pixels per chip
#define CHIP_HEIGHT    64  // pixels per chip


// panel controller chips
#define CHIP_WIDTH    128  // pixels per chip
#define CHIP_HEIGHT    32  // pixels per chip

That should fix things. Remove any other changes that you have made to library header files or the sketches like the GLCD diags sketch.

If it still is not working after this change, post the serial port output when running the glcdDiags sketch and that will help further diagnose any remaining issues.

--- bill


I took a closer look at full data sheet for the ST7920 controller which is used on your glcd module. I regretfully have to inform you that it is not compatible with the current glcd v3 library. The current glcd v3 library is mainly for the ks0108 based glcd modules. There also is currently support for the SED1520 controller and Michael and I were planning on supporting other controllers in the future.

The ST7920 uses a different command set and different capabilities than the ks0108 so that is why it currently will not work with the glcd v3 library.

In the future, it may be possible to add in support for the ST7920, but currently we have not looked at adding in support for this controller chip.

--- bill