This is the first step in my AquaTank Control V2 project.

I had to find a way to connect the 128×64 screen by serial connection,
this alows using only 3 Digital Pins on the Arduino which is awesome because I really need the rest of the pins for other stuff.

Searching in the internet there are so many ways connecting this LCD but most of them use parallel connection which uses many pins:

dualsides

First of all you need a PSB pin on your screen, this is what switches the LCD working mode:

  • HIGH for Parallel
  • LOW for Serial (connect it to ground)

This Is my LCDs Pinout and how I connected everything (Click On the Image):

pinout

Some notes:

  • V0 is for controlling the LCD contrast – You supposed to connect an potentiometer to V0, 5V and ground so that V0 is the middle pin (there is a name for it I forgot)
    in my case (the LCD would not show anything) there is already a trimmer on the PCB that its connected to V0, Vcc and GND – rated 7.5kΩ
    trimmer
  • BLK – Backlight – is Ground , BLA – I have connected to 3.3V on the arduino board.

 

Using the U8glib – https://code.google.com/p/u8glib/
and the “Hello World” example :

the code I used :


#include "U8glib.h"

U8GLIB_ST7920_128X64 u8g(13, 11, 12, U8G_PIN_NONE);

void draw(void) {
// graphic commands to redraw the complete screen should be placed here
u8g.setFont(u8g_font_04b_03b);
//u8g.setFont(u8g_font_osb21);
u8g.drawStr( 0, 22, "Aqua Control V2");
}

void setup(void) {
// assign default color value
if ( u8g.getMode() == U8G_MODE_R3G3B2 )
u8g.setColorIndex(255); // white
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
u8g.setColorIndex(3); // max intensity
else if ( u8g.getMode() == U8G_MODE_BW )
u8g.setColorIndex(1); // pixel on
}

void loop(void) {
// picture loop
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );

// rebuild the picture after some delay
delay(500);
}

Here is the Finished product :

 IMG_20140409_112823

Have Fun Doing it Your Self.