benderpirat / u8glib

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

Custom offset #313

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Some low cost SSD1306 128x64 displays, especially the 1.3" I2C only versions, 
suffer from an offset of 2 pixel columns, shown as garbage. This can be fixed 
by changing the library u8g_dev_ssd1306_128x64.c.

static const uint8_t u8g_dev_ssd1306_128x64_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 */
  0x000,        /* set lower 4 bit of the col adr to 0  */
  U8G_ESC_END                /* end of sequence */
};

The value 0x000 needs to be changed to the number of wrong columns shown (a 
value of 0x002 fixed my problem).

It would be nice to make this value programmable so a user can change the 
default value without altering the library.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by sleurhu...@gmail.com on 27 Jan 2015 at 3:10

GoogleCodeExporter commented 8 years ago
Unfortunately your initial assumption is wrong. The SSD1306 can not have such a 
shift, as it has a width of exactly 128 pixel. Conclusion is, that you own a 
SH1106 controller. The SH1106 has a internal memory width of 132 pixel and 
requires such a shift. 

So: Please use the SH1106 device from u8glib. Very often ultra cheap 128x64 
displays are sold as SSD1306, however, often this is a SH1106.

Original comment by olikr...@gmail.com on 27 Jan 2015 at 7:23

GoogleCodeExporter commented 8 years ago
I can confirm that choosing the SH1106 takes care of the two pixel offset on 
the left side and the garbage on the right side of the display.

Original comment by gj.roden...@gmail.com on 31 Jan 2015 at 9:55

GoogleCodeExporter commented 8 years ago
great, then, if there is nothing else, i will close this ticket.

Original comment by olikr...@gmail.com on 31 Jan 2015 at 11:47