Go Down

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

lancsdude

Hello Oliver, firstly thank you for your incredible generosity. Every search I do for help you are the main man.

My SSD1306 128x64 is running I2C, works fine, then locks up after 20 seconds, the screen does not refresh until I power off.
So I was looking at this thread for help, assuming I am having a RAM issue? but I have 2K (Nano 328P)
and my sketch upload sjows 52% of programme memory and 14% dynamic memory.. ?
Should I change to U8g2lib ?
Some threads say not to use the 5v from the Nano and to power the OLED sperately?
And I remember you asking someone if they were using pull up resistors (on I2C)?

What are my first steps would you say?


olikraus

My SSD1306 128x64 is running I2C, works fine, then locks up after 20 seconds, the screen does not refresh until I power off.
So I was looking at this thread for help, assuming I am having a RAM issue? but I have 2K (Nano 328P)
and my sketch upload sjows 52% of programme memory and 14% dynamic memory.. ?
Should I change to U8g2lib ?
Some threads say not to use the 5v from the Nano and to power the OLED sperately?
And I remember you asking someone if they were using pull up resistors (on I2C)?

What are my first steps would you say?
Maybe look in the other parts of your code for the root cause of this behavior. I do not think that there is an hardware issue or a problem with u8glib. Also consider to create a new thread for this.

Oliver

finucci

Hi there.
I could need some help identifying a LCD display: it is advertised as 128x64 display using ST7567 driver, using I2C interface. It has overall 8 pins, and is labeled as "mjkdz".  The listing is available at the following link:

Link to store

Now, when I connect VCC, GROUND, SDA and SCL pins and start the I2cScanner sketch, the device is not recognized.

Some other buyers also said that this product is false-advertised as I2C device, but for real it's a SPI device.
Has anyone had experience with this kind of display?
What is the minimum pins I can use to get the device running?
There is no constructor in u8g2 library for ST7567 128x64 with I2C protocol...

Can anyone help?
 

david_prentice

What is the problem?
The ST7567 datasheet says:
Quote
Serial interface (SPI-4) is also supported (write only)
The pins are clearly described. e.g. SDA, SCL, A0, CSB, RSTB.

SDA is just a generic term for "Serial Data" that often implies a bi-directional Data pin.
However this chip does not support read (SDO)

SDA may be used for I2C but I2C does not require A0, CS, RST pins.
The advertisement is misleading.   I doubt that it is a TFT device.  It certainly is not an I2C device.

I suspect that U8g2 supports ST76567 SPI. e.g.
Code: [Select]
U8G2_ST7567_JLX12864_1_4W_HW_SPI(rotation, cs, dc [, reset]) [page buffer, size = 128 bytes]

David.

finucci

I bought the product hoping that I will be able to run it with only 4 pins connected (i2c).
In the end, I will be using other (smaller) display: 0,96" OLED with real I2C interface.

Thanks for you response.

selevo

#410
May 10, 2020, 02:33 pm Last Edit: May 10, 2020, 02:41 pm by selevo
Nice  lib, thank's !
The other day I tried it on  transistor tester.

A display in this  device on ST7565 controller and I noticed that dots randomly appear in my first columns.
I was approached by ST7565_ZOLEN_128X64_4W_SW_SPI
Where can I find a solution?
Maybe someone has ideas?
Thank.




Code: [Select]

/*

  HelloWorld.ino
 
  "Hello World" version for U8x8 API

  Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)

  Copyright (c) 2016, olikraus@gmail.com
  All rights reserved.

 

*/

#include <Arduino.h>
#include <U8x8lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif

  U8X8_ST7565_ZOLEN_128X64_4W_SW_SPI u8x8(/* clock=*/ 2, /* data=*/ 1, /* cs=*/ U8X8_PIN_NONE, /* dc=*/ 3, /* reset=*/ 4);
// End of constructor list



void setup(void)
{
 
 
  u8x8.begin();
  u8x8.setFlipMode(1);
  u8x8.setPowerSave(0);
  u8x8.setContrast(40);
 
 
}

void loop(void)
{
 
  u8x8.setFont(u8x8_font_chroma48medium8_r);
  u8x8.drawString(0,0,"Hello World!");
 // u8x8.refreshDisplay(); // only required for SSD1606/7 
  delay(2000);
 
}

olikraus


Go Up