GLCD ST7920

Hi,

i try GLCD example Bitmap (Arduino Mega 2560, U8glib ST7920) but the GLCD shows nothing except backlight and controllable contrast. i wonder how the wiring connections to each pins.
I had removed commented U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16 . Do i have to do wiring according to D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16 ?. what about the PSB pin? my GLCD doesn't have di=17 pin too.

There is a section on the ST7920 on this page: Google Code Archive - Long-term storage for Google Code Project Hosting.

Here is a copy of that section:
Serial mode (PSB = LOW)
sck: Pin with label "E"
mosi: Pin with label "RW"
cs: Pin with label "RS".
Example: U8GLIB_ST7920_128X64_1X(sck, mosi, cs [, reset]) is equivalent to U8GLIB_ST7920_128X64_1X(E, RW, RS, RST) for many display modules.
Parallel mode (PSB = HIGH)
en: Pin with label "E"
di: Pin with label "RS"
rw: Pin with label "RW"

Hope this helps,
Oliver

saharul:
...what about the PSB pin?...

Usually PSB set high tell to display to work in parallel mode, low (gnd) to work in serial mode.

thanks nid69ita

//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16

what is the difference between them

I think, checking on header, the speed of SPI

I see some parameters like xxxx128x64_4x_sw_spi or xxxx128x64_4x_hw_spi and I think is a reference to SPI speed.

The difference between the 1x and 4x variant is the amount of memory used by the u8glib display driver.

Oliver