Go Down

Topic: Connecting 128*64 LCD to Arduino Mega 2560 R3 (Read 1 time) previous topic - next topic


Hi All,

I am trying to use http://www.bajdi.com/wp-content/uploads/2013/03/glcd-128x64.jpg this LCD display with my Arduino Mega 2560 R3. I tried to use this library in my work http://playground.arduino.cc/Code/GLCDks0108. I have connected the LCD and Arduino as mentioned in IMPORTANT NOTE section of the above tutorial.

But when I tried to run this hello world program there. It shows a bright and dark dots all over the LCD. I tried different codes. But situation is the same. What has gone wrong in here?

  GLCD Library - Hello World

This sketch prints "Hello World!" to the LCD
and shows the time in seconds since reset.

  The circuit:
  See the inlcuded documentation in glcd/doc directory for how to wire
  up the glcd module. glcd/doc/GLCDref.htm can be viewed in your browser
  by clicking on the file.


// include the library header
#include <glcd.h>

// include the Fonts
#include <fonts/allFonts.h>

void setup() {
  // Initialize the GLCD

// Select the font for the default text area

  GLCD.print("hello, world!");

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  GLCD.CursorTo(0, 1);

  // print the number of seconds since reset:


What is the make/model number of your LCD? (the photo has pinouts, but no model number).
Do not IM me. I will not respond. Ask questions in the forum.


It has a PSB pin, so it is a ST7920 based display.
The ST7920 controller is not supported by GLCDks0108 library.
You could use u8glib (http://code.google.com/p/u8glib/)

In the examples use "U8GLIB_ST7920_128X64_1X(sck, mosi, cs [, reset])"

Follow the instruction for this controller on this page http://code.google.com/p/u8glib/wiki/device (below the table)



Thanks oilkarus your solution works fine!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131