luni, 31 iulie 2023

Afisaj monocrom de 2,2" cu rezolutie de 128x64 (ST7567S - i2c) comandat de Arduino Uno/Nano sau Wemos D1 (ESP8266)

     Am testat un alt tip de afisaj monocrom  notat GM128064-59N ver.2.0, unul cu interfata i2c, driver ST7567S, si rezolutie 128x64 (ca si clasicul ST7290, cu care am realizat mai multe proiecte, inclusiv un ceas RTC si un termometru dublu, in care am folosit placa Arduino si biblioteca u8glib


   Dupa ce am realizat schema clasica de legare a unui periferic i2c la o placa Arduino (SDA -> A4 si SCL -> A5), 
am cautat adresa afisajului cu programul de depistare a adresei, nu am avut succes, asa ca am inceput sa caut informatii pe net.
   Am gasit primele informatii pe un site al unui magazin online la comentarii, 
care m-au dus la o discutie in romana.
    In mare, adresa reala e dubla fata de cea din datasheet si biblioteca folosita este u8g2lib, iar un programior functional este cel de la pastebin.com/cMgTQMQd.
asa ca inlocuind in exemplele bibliotecii u8g2lib, configurarea recomandata
U8G2_ST7567_ENH_DG128064I_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE);
si in partea de "setup"
u8g2.setI2CAddress(0x3F * 2);
 pe ecran se vad imaginile statice sau dinamice care trebuie
   Am realizat si 2 filmulete:
    In vederea realizarii unui ceas NTP, a schimbat placa Arduino Nano (Jade Nano +) cu o placa Wemos D1 cu ESP8266, realizand schema clasica
si punand in programele de test si liniile
#define SCL_PIN SCL // SCL pin of OLED. Default: D1 (ESP8266) or D22 (ESP32) #define SDA_PIN SDA // SDA pin of OLED. Default: D2 (ESP8266) or D21 (ESP32)
apoi am facut 2 filmulete:

4 comentarii:

  1. Hello, it has been quite a while since I was trying to make my own GM12864-59N VER:2.0 i2c LCD display to work and I've pretty much bought the same one as yours except that mine was the blue one, I have tried many of the solutions you have provided as well as some others I found while tediously looking for answers on the internet however all efforts seem to be in vain.

    #include
    #include

    U8G2_ST7567_ENH_DG128064I_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE);

    void setup(void)
    {
    u8g2.setI2CAddress(0x3F * 2);
    u8g2.begin();
    u8g2.clearBuffer(); // clear the internal memory
    u8g2.setFont(u8g2_font_ncenB08_tr);
    //u8g2.setFont(u8g2_font_cu12_tr);
    u8g2.drawStr(0, 10, "Hello World!"); // write something to the internal memory
    u8g2.sendBuffer(); // transfer internal memory to the display
    }
    void loop(void)
    {

    }

    This is the current code that I have been trying to run with my arduino connected to the display at the right connection (SDA to A5, SCL to A4, GND to GND and VCC to 3.3v of arduino uno). I have also removed the D1, R2, R1, and D2 smd components at the back of the display as per advice of someone from the aliexpress link of the display. Another thing is that when trying to run the i2c_scanner that comes with the Arduino IDE it seems to not be able to find the i2c address of the display, I come in need of your help as I have struggles with this damn thing for a long while and I wish not to have my purchased wasted.

    RăspundețiȘtergere
    Răspunsuri
    1. if the basic test with i2c scanner no return a result, the display is defective.... but anyway SDA -> A4 and SCL to A5.. try again with RIGHT .. in this article is also the schematic between Arduino board and i2c display

      Ștergere
    2. please check a good article about i2c connexion: https://gammon.com.au/i2c

      Ștergere
    3. Hello, thank you for replying. I have tried the SDA -> A4 and SCL -> A5 and unfortunately it still doesn't find any i2c address, it does seem that the lcd is defective (or maybe it had something to do with the hardware modifications I made, though I doubt it was). I'm not sure how useful this information will be but someone commented on the Arduino Forum post I made that I should try reading the SDA and SCL pins with a scope, I do not have such so I simply tried wiring my multimeter ( POSITIVE to SDA then SCL and NEGATIVE to arduino GND) and I did get a bunch of readings [SCL: 4.89 | SDA: 3.75]. However I'm not sure if this is the lcd screen sending signals to respond with the arduino or of its just the arduino itself sending those signals (which I think is the latter).

      Ștergere