Initialisation bugs with u8glib ST 7565 glcd

Hello folks,

i bought a glcd from digole ( and got it working with the digole library and a mighty 1284. Since this package uses an additional PCB to drive the lcd and there is no good documentation of the library about how to raise the spi clock (seems to use Software SPI at a low clock rate, very slow if you want to switch a page like 100-200ms) we cut all connections to the PIC on the PCB in order to drive the glcd manually (Accessories--SPI 128x64 COG LCD Display...) with the u8glib. It worked out but the output is mirrored, can´t find any function for mirroring in the u8glib either so i guess this is an initialisation problem ?

#include "U8glib.h"
//SPI Com: SCK = 13, MOSI = 11, CS = 10, RS/A0 = 9

//U8GLIB_64128N u8g(13, 11, 10, 9); // throws pefect image, after 1 second it switches to mirrored
U8GLIB_LM6059 u8g(13, 11, 10, 9);  //screen split in half

//U8GLIB_LM6063 u8g(13, 11, 10, 9); //frame is shifted by 2-3 pixels
//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9);//throws black screen
//U8GLIB_DOGM128 u8g(13, 11, 10, 9);  //throws black screen

void draw(void) {
  // graphic commands to redraw the complete screen should be placed here  
 // u8g.setFont(u8g_font_osb21);
  u8g.drawStr( 20, 22, "Hello world");
  u8g.drawStr( 45, 35, "with");
  u8g.drawStr( 38, 54, "u8glib");


void setup(void) {
  // flip screen, if required

void loop(void) {
  // picture loop
  do {
  } while( u8g.nextPage() );
  // rebuild the picture after some delay

Any help would be appreciated




For the lm6059 constructor, locate file u8g_dev_st7565_lm6059.c.
In line 53, change 0x0c8 to 0x0c0.
Maybe this works.

It is not a bug. Each display might need a specific setup sequence.


Hi, thank you very much that seems to work !