Go Down

Topic: U8glib: Graphics Lib for LCDs and OLEDs (Read 55 times) previous topic - next topic

raalst

I got a specific ST7565 board to work on the DUE, but i did not know this thread yet,
it is posted here : http://arduino.cc/forum/index.php/topic,158709.msg1188374.html#msg1188374

including details on wiring it up (and a few tweaks).



olikraus

Hi

U8glib Version v1.13 is available for download:


Updates include:

  • Support for SSD1351 (true color OLED) and HT1632 (LED Matrix)

  • Performance improvements for the ST7920

  • Double buffer option for ST7565 controller

  • HW SPI support for Arduino Due



Oliver

momtot

Hi everyone !

I am new to the arduino.   

and i have an GLCD  type of wdg0151-tmi  and i dont know to wire it and also how to program it with arduino mega .

please please help and thank you and sorry for my bad language  :)

olikraus

#123
Jul 07, 2013, 07:52 am Last Edit: Jul 07, 2013, 10:33 am by olikraus Reason: 1
Hi

It seems to be this display: http://www.mikroe.com/download/eng/documents/development-tools/components/glcd_128x64_spec.pdf
It is a KS0108 based display. With U8glib, you can use
Code: [Select]
U8GLIB_KS0108_128(d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw [, reset])
but Bill's GLCDv3 will also work: http://forum.arduino.cc/index.php?topic=56705.0;topicseen

Oliver

momtot

Thank you very much  :*

but still need more information please  :smiley-red:

olikraus

I think it is best to use GLCDv3 first. It has a very good user manual.

Oliver

momtot


C:\Users\Mohamed\Documents\Arduino\libraries\ks0108\ks0108.cpp: In member function 'void ks0108::Init(boolean)':
C:\Users\Mohamed\Documents\Arduino\libraries\ks0108\ks0108.cpp:505: error: 'OUTPUT' was not declared in this scope
C:\Users\Mohamed\Documents\Arduino\libraries\ks0108\ks0108.cpp:505: error: 'pinMode' was not declared in this scope
C:\Users\Mohamed\Documents\Arduino\libraries\ks0108\ks0108.cpp:511: error: 'delay' was not declared in this scope

would you please tell me what is that error , and thank you :~

olikraus

Did you download glcd-v3-20111205.zip from http://code.google.com/p/glcd-arduino/downloads/list?
Which IDE are you using?

I am not an expert on glcd-v3. Better to ask here: http://forum.arduino.cc/index.php?topic=56705.0

In the case you decide to use U8glib, then you are welcome to ask questions in this thread here.

Oliver



momtot

Thank you for your care  :)

but  can  you tell me please ?  =(

how to use the the wdg0151-tmi and how to wire it to arduino mega

and please give me an example to learn from it .
and thank you Oliver 

olikraus

Hi

Examples are here: http://code.google.com/p/u8glib/wiki/tdisplaysetup

You could also follow this list of steps:

1) Download u8glib
2) install u8glib in the libraries folder (unzip there)
3) start arduino IDE
4) You should see the u8glib submenu in the Examples section
5) locate "HelloWorld"
6) open "HelloWorld" example
7) Find this line in the example:
Code: [Select]
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16

8 ) Uncomment this line:
Code: [Select]
U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16

9) Ensure that the arduino board is not connected to any power or usb
10) Connect your display as described in the comment: // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
10a) Connect Data lines from D0 to D7 to pins 8,9,10,11,4,5,6,7
10b) Connect the chip enable signals to pin 14 and 15, which are labled as A0 and A1 on the Uno
10c) Connect the di display pin to pin 17, which is labled as A3 on the Uno
10d) Connect wr to pin 16, which is A2
11) The variable potentiometer (see datasheet)

Oliver

momtot

Thank you very much Oliver  :*

but i have a question
why connecting cs1 , cs2 , di and wr to analog pins   :smiley-slim:

and Thank you 

momtot

#131
Jul 08, 2013, 06:42 pm Last Edit: Jul 08, 2013, 06:43 pm by momtot Reason: 1
and another question please

it does  not work with my wdg0151 lcd

it just works and nothing appears on the screen

please i need your help.

and to connect it to arduino mega if there is something wrong with connection

momtot

Hi Oliver this is the program i used in my arduino mega and the lcd does not work and gives me a white light only

please help and thank you



U8GLIB_KS0108_128 u8g(29, 28, 27, 26, 25, 24, 23, 22, 37, 33, 34, 36, 35);


void draw(void) {
 
  u8g.setFont(u8g_font_unifont);
  u8g.setPrintPos(0, 20);
 
  u8g.print("Hello World!");
}

void setup(void) {
 
   u8g.setRot180();

}

void loop(void) {
 

  u8g.firstPage(); 
  do {
    draw();
  } while( u8g.nextPage() );
 

  delay(500);
}

olikraus


but i have a question
why connecting cs1 , cs2 , di and wr to analog pins   :smiley-slim:


You can use any pins you want. In fact on the Arduino Mega, you must use different pins.
But you need to tell U8glib the pin numbers.

Oliver

olikraus


Hi Oliver this is the program i used in my arduino mega and the lcd does not work and gives me a white light only

please help and thank you



Your program looks correct, this is what i can say. There is no more light i can give unless you provide some more information.
Maybe you can make a picture from your setup. Good enough to trace wires from your display to the Mega.

Oliver

Go Up