bernath90 / u8glib

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

Displaytech 64128K #262

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I am trying to run the driver with Displaytech 64128K and Arduino Due.

I am able to make it run by calling U8GLIB_LM6059 u8g(5, 7, 6);

And adding u8g.setContrast(15);

However, the first line starts at the middle of the display, whereas the lower 
part is shown on the top part of the display. How do I solve the problem?

Original issue reported on code.google.com by joshuala...@gmail.com on 4 Jun 2014 at 7:27

Attachments:

GoogleCodeExporter commented 8 years ago
In line 130 of u8g_dev_st7565_lm6059.c you find:
        u8g_WriteByte(u8g, dev, 0x0b0 | pb->p.page);
try to replace this with:
        u8g_WriteByte(u8g, dev, 0x0b0 | ((pb->p.page + 4) & 7 );

maybe "+ 4" is no correct. it could be also "+ 3" or "+ 5".
Also "& 7" is not clear. Maybe it is "& 15"

Original comment by olikr...@gmail.com on 5 Jun 2014 at 4:28

GoogleCodeExporter commented 8 years ago
Hi olikr...

I tried to change this instead, original is 0x006, and it works.
But I am not sure if this is the proper way.

0x000, /* set display start line */

And I also change contrast value from 0x018 to this.

0x008, /* contrast value*/

Original comment by joshuala...@gmail.com on 6 Jun 2014 at 1:57

GoogleCodeExporter commented 8 years ago
So the issue is solved? Can it be closed?

maybe you can upload your modified version of u8g_dev_st7565_lm6059.c for other 
users?

Thanks for your feedback so far.

Original comment by olikr...@gmail.com on 8 Jun 2014 at 12:34

GoogleCodeExporter commented 8 years ago
Hi olikr...

There is a one pixel off at the left and right of the display. I notice that 
when running the rotation example. Can it be shifted like shifting the display 
up and down?

Thanks.

Original comment by joshuala...@gmail.com on 9 Jun 2014 at 2:12

GoogleCodeExporter commented 8 years ago
you might need to change the lower 4 bit of the column:
static const uint8_t u8g_dev_st7565_lm6059_data_start[] PROGMEM = {
  U8G_ESC_ADR(0),           /* instruction mode */
  U8G_ESC_CS(1),             /* enable chip */
  0x010,        /* set upper 4 bit of the col adr to 0 */
  0x001,        /* set lower 4 bit of the col adr  */      
  U8G_ESC_END                /* end of sequence */
};

change lowest digit of the value "0x001"

Original comment by olikr...@gmail.com on 9 Jun 2014 at 7:36

GoogleCodeExporter commented 8 years ago
Initially there was a line of pixels that not plotted on the left.

After changing the value to 0x000, there is a line of pixels that not plotted 
on the right.

Original comment by joshuala...@gmail.com on 9 Jun 2014 at 10:39

GoogleCodeExporter commented 8 years ago
strange... But i also do not understand completly how it looks like.

Original comment by olikr...@gmail.com on 9 Jun 2014 at 8:01

GoogleCodeExporter commented 8 years ago
Hi olikr...

It looks like this.

Original comment by joshuala...@gmail.com on 11 Jun 2014 at 1:45

Attachments:

GoogleCodeExporter commented 8 years ago
i wonder if this could be a display with 129 pixel width.
Will the pixel disappear with setting
#define WIDTH 129
in u8g_dev_st7565_lm6059.c

Original comment by olikr...@gmail.com on 11 Jun 2014 at 4:22

GoogleCodeExporter commented 8 years ago
Strange.. I put
#define WIDTH 129
and the random dots are gone!
Let me calculate how many pixels are there actually.

Original comment by joshuala...@gmail.com on 12 Jun 2014 at 1:22

GoogleCodeExporter commented 8 years ago
Strange.. Indeed
I checked using drawBox (127,63,1,1)
There are only 128 x 64 pixels.
But ever since changing the WIDTH to 129, the random pixels are gone.

Original comment by joshuala...@gmail.com on 13 Jun 2014 at 4:53

GoogleCodeExporter commented 8 years ago
The problem might be a timing issue (CS high comes to early).
Does the right line only appear with HW SPI? Will it be gone with SW SPI?

Original comment by olikr...@gmail.com on 19 Jun 2014 at 6:46

GoogleCodeExporter commented 8 years ago
not sure, but no further response, closing...

Original comment by olikr...@gmail.com on 13 Dec 2014 at 5:11