DavidHAVE / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

128x64 Graphic LCD Display module ST7565P Z #135

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

1. which  U8GLIB constructor should be used?
2. which pin has to be connected?

Descriptom of the module
http://r.ebay.com/ro19EI

Thank you for help in advance.

Pedro

Original issue reported on code.google.com by pedro3...@gmail.com on 24 Jan 2013 at 12:04

GoogleCodeExporter commented 8 years ago
Your display has a ST7565P controller. Please go to the devices table. You will 
finde several constructors for the ST7565 controller. You have to check them 
one by one. There is no advice which is the corrent one. Let me know if none of 
the available ST7565 devices is working.

Oliver

Original comment by olikr...@gmail.com on 24 Jan 2013 at 1:07

GoogleCodeExporter commented 8 years ago
- no one from them had worked, so I started to modify them and this works
U8GLIB_DOGM128 u8g(13, 11, 10, 9, 8); // SPI Com: SCK = 13, MOSI = 11, CS = 10, 
A0 = 9 , RST = 8
- I had to connect the RST signal (PIN 13 on the display PCB and PIN  8 on 
Arduino)

- I tried to work with 3,3 V to test it but working voltage level of the device 
is 5V as it is stated on ebay webpage 
- I run the graphic example Graphicstest.pde but it is shifted by half of the 
display
- it was same with ADAFRUIT driver st7565.cpp and there  helped  to change this 
line
   // a handy reference to where the pages are on the screen
    const uint8_t pagemap[] = { 3, 2, 1, 0, 7, 6, 5, 4 };
   to
    const uint8_t pagemap[] = {  7, 6, 5, 4,3, 2, 1, 0 };
   and it has worked. How can I correct it in your  library?

Thank you.
Pedro

Original comment by pedro3...@gmail.com on 25 Jan 2013 at 6:59

GoogleCodeExporter commented 8 years ago
link to the mentioned ADAFRUIT file
https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp

Original comment by pedro3...@gmail.com on 25 Jan 2013 at 7:01

GoogleCodeExporter commented 8 years ago
It would be great if you could provide a picture of your screen which shows the 
wrong content, including the name of the device (U8GLIB_DOGM128) and example 
which was use to generate this screen.

Thanks,
Oliver

Original comment by olikr...@gmail.com on 25 Jan 2013 at 7:17

GoogleCodeExporter commented 8 years ago
So, I had tried u8g.setRot180() and it helped :).
My next issue is how to delete the random dots behind 0,0 position - can be 
seen on the attached picture. According to the data sheet the ST7565P is 
controller for 65x132 dot matrix LCD.
The code is here:

#include "U8glib.h"

U8GLIB_DOGM128 u8g(13, 11, 10, 9, 8);    //SPI Com: SCK = 13, MOSI = 11, CS = 
10, A0 = 9, RST = 8

void draw(void) {
  // graphic commands to redraw the complete screen should be placed here  
  u8g.setFont(u8g_font_unifont);
 // u8g.setFont(u8g_font_osb21);
  u8g.drawStr( 0, 22, "Hello World!");
 u8g.drawVLine(0,0,64);
 u8g.drawVLine(123,0,64);
}

void setup(void) {

  // flip screen, if required
   u8g.setRot180();

}

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

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

Original comment by pedro3...@gmail.com on 25 Jan 2013 at 4:47

Attachments:

GoogleCodeExporter commented 8 years ago
Hi 
It is correct, that the controller supports 132x65. This is one of the 
problems, because the visible part might be shifted to any location. In fact it 
depends on the display. But some of the other devices might work better. So, 
please check if

simply replace U8GLIB_DOGM128
with one of the following constructors.

U8GLIB_LM6059
U8GLIB_LM6053
U8GLIB_NHD_C12864
U8GLIB_64128N

Is one of the other four devices better?

Oliver

Original comment by olikr...@gmail.com on 25 Jan 2013 at 7:49

GoogleCodeExporter commented 8 years ago
U8GLIB_LM6059
U8GLIB_LM6053
- need to modify the contrast in file *.c setting it to 
0x001,                      /* contrast
- you can find the result with preset contrast - picture with black screen

U8GLIB_NHD_C12864
- I would modify the contrast little bit

U8GLIB_64128N
- is the solution !!! ;)

Original comment by pedro3...@gmail.com on 26 Jan 2013 at 5:51

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the huge amount of pictures :-)
So i assume, that you found a suitable u8g device for your display.
Additionally i would like to mention, that there is a "setContrast" command 
also available in those cases, where the content is correct, but the contrast 
level wrong.

If there is nothing else to do for me, i would close this issue.

Have fun,
Oliver

Original comment by olikr...@gmail.com on 26 Jan 2013 at 7:19

GoogleCodeExporter commented 8 years ago

Original comment by olikr...@gmail.com on 26 Jan 2013 at 7:38

GoogleCodeExporter commented 8 years ago
Oli, Thank you very much for your help and your excellent project.

To summarize it for ST7565P
constructor: U8GLIB_64128N u8g(13, 11, 10, 9, 8);    //SPI Com: SCK = 13, MOSI 
= 11, CS = 10, A0 = 9
and some pictures

Original comment by pedro3...@gmail.com on 26 Jan 2013 at 8:34

Attachments:

GoogleCodeExporter commented 8 years ago
and the working sketch for beginners :) (no more pictures)

.. you can close the issue ..

Original comment by pedro3...@gmail.com on 26 Jan 2013 at 8:38

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks a lot for the great pictures.

I will close this issue, but will refer to it if anybody else has a similar 
problem

Thanks,
Oliver

Original comment by olikr...@gmail.com on 26 Jan 2013 at 9:22