E-paper GDEP015OC1 display

Posted on
  • For those people who might be struggling connecting an MH-ET LIVE 1.54" e-paper display (aka GDEP015OC1) i'd like to share some information on how to use it with ESP32 Dev Kit board. Hope it will help someone and save them time that i lost)

    I started out with an lifesaving library for e-paper by @MichaelPralow, thank you very much for your work. Module usage described here.
    It was rather easy to figure out the right way to connect the module to the board:

    DISPLAY    |    ESP32
    —————————————————————
    VCC        |    3.3V
    GND        |    GND
    SDI        |    D23
    SCLK       |    D18
    CS         |    D5
    D/C        |    D22
    Reset      |    D21
    Busy       |    D15
    

    Make sure the Interface switch on the back side of the module is set to «L».

    After that i started digging info about LUT data, Addresses of X and Y start and end, and that was a pain. Maybe i missed something, but i spent hours trying to implement data i found in a specification doc for GDEP015OC1.

    To cut the story short finally i stumbled upon a Cpp library (link), and here are the magicalal numbers:

    var spi = new SPI();
    spi.setup({ sck:D18, mosi:D23 });
    display = require('SSD1606.min').connect({
          display: {
            bpp : 1,
            displaySizeX      : 200,
            displaySizeY      : 200,
            lutRegisterData   : new Uint8Array([0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), // PARTIAL update lutRegisterData, covered further
            maxScreenBytes    : 5000, // this
            ramXStartAddress  : 0x00, // this
            ramXEndAddress    : 0x18, // this
            ramYStartAddress  : 0xC7, // this
            ramYEndAddress    : 0x00 // and this
          },
          spi        : spi,
          cs1Pin     : D5,
          dcPin      : D22,
          resetPin   : D21,
          busyPin    : D15,
          powerPin   : D4 
    });
    

    That is. This code worked for me after 5 long evenings i spent switching tens of browser tabs gathering the info instead of working on my project)
    Here's what i've got now:

    Now a few words about partial update: the GDEP015OC1 is able to partially update data on the screen. The above value of lutRegisterData property enables this ability. There's also another array of values that makes it reload the whole screen, here it is:

    0x50, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    

    lutRegisterData is used once in an init method of the module and also i don't need to update screen fully, so i'll just leave it here in case someone needs it.

    And one more: i saw definition of a preset for GDE021A1 model in module's code and wanted to ask if it is possible to update the SSD1606 module's code with the preset for GDEP015OC1 to make it more flexible? If so, what am i required to do for that? Thank you.

  • Great work!

    To enhance the module, create a fork of Espruino repos on git, make the changes and make a pull request. Testing can be a bit tricky if you do not have both modules. [EDIT: typo 'bot modules' fixed to read 'both modules']

  • @allObjects,

    I was so excited with the final success i forgot about everything i studied about writing and submitting changes community rules) When i have time to do it the most proper way i will surely make a merge request.

    And could you please provide some reference on those bot modules? I'm afraid i've never came across any.

    Thank you!

  • could you please provide some reference on those bot modules? I'm afraid i've never came across any

    @Zak, are you talking about 'as hardware' or 'used in hardware'?

    Espruino software modules are sometimes called after the controller in the hardware module or device - for the case at hand, any display that has a built-in controller of such can be run with the same Espruino software module.

  • Ahh. bot -> both? I was a bit confused too.

    It's great that you got it going. I think adding a definition for the other display type would be great - the files you need to change are:

    So you just create your own fork of EspruinoDocs on GitHub, edit the files, and submit a pull request. You can pretty much do it all online as well, but if you have issues just post your version of the file here and I'll update it manually.

  • ...sorry... fixed the typo from bot to both [hw and sw modules] in post #2.... have a 'new' MacBook Pro with the 'crapy' - very low profile / barely stroking keyboard... and touch bar... (ergo design goes from very bad to worse...)... does though not excuse all typos... :...

  • @allObjects, now it's all set up. I thought that maybe there are some special bot modules to test code on them :)

    ergo design goes from very bad to worse

    the best phrase describing this disrespect of the customer :)

    @Gordon, thank you! I'm familiar to git so i think i'll be capable to do a fork and a merge request. Sorry for being that slow — i hope everything would be done by this weekend.
    Am i not supposed to do the minified version?

  • Am i not supposed to do the minified version?

    No, that gets done automatically when I publish it to the website :)

  • Does anyone know how to connect this on a plain ESP8266-12E?

  • Tue 2019.09.17

    Would you please post the link to the pinout for the chip you are using, along with the matching table you created as was done in #1 above

  • Here is the connection with my ESP8266, please let me know if you need any more information

    DISPLAY    |    ESP8266
    —————————————————————
    VCC        |    3.3V
    GND        |    GND
    SDI        |    13
    SCLK       |    14
    CS         |    15
    D/C        |    0
    Reset      |    2
    Busy       |    4
    
  • I am able to run the display using arduino using GxEPD2 lib. But I can't get it work with Espruino :(,

    this is the code I am using, can some one help me getting the display to work?

    var spi;
    var display;
    
    function setupSPI(){
      console.log('starting SPI');
      spi = new SPI();
      spi.setup({ sck:D14, mosi:D13 });
      display = require('SSD1606.min').connect({
          display: {
            bpp : 1,
            displaySizeX      : 200,
            displaySizeY      : 200,
            lutRegisterData   : new Uint8Array([0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), // PARTIAL update lutRegisterData, covered further
            maxScreenBytes    : 5000, // this
            ramXStartAddress  : 0x00, // this
            ramXEndAddress    : 0x18, // this
            ramYStartAddress  : 0xC7, // this
            ramYEndAddress    : 0x00 // and this
          },
          spi        : spi,
          cs1Pin     : D15,
          dcPin      : D0,
          resetPin   : D2,
          busyPin    : D4,
    //      powerPin   : B15
      });
      //display.on();
    
    display.hwReset(function(){
        display.init(
          function(err){
            display.g.clear(0xFF);
            display.g.setRotation(1);
            display.g.setColor(0x00);
            display.g.setFontVector(20);
            display.g.drawString('Hello World!', 22, 22);
            display.g.flip();
            display.refreshScreen(function(err){
              display.off();
            });
          },
          { clearScreenColor: 0x00 }
        );
      });
    }
    
    
    
    function start() {
      setupSPI();
    }
    
    E.on('init', start);
    
  • Wed 2019.09.18

    Thank you @navas for posting the table.

    While I am unable to give a definitive answer for this part combination, I am reasonably certain the issue lies in how the pins are referenced. Although this link isn't directly related to the E-Paper display, it does provide what @MaBe helped me solve with pin references when using the ESP8266

    http://forum.espruino.com/comments/14778­779/

    Reading the entire thread should provide the insight should the above starting point not prove helpful.

  • @navas were you ever able to get this working?

  • @navas I'm interested as well if you got it to work.

    I'm having a GDEW027C44 2.7" 3-color e-ink display. It works fine with an Arduino Uno and the Arduino sample code.

    I gutted the code to the bare minimum needed to make it refresh. Then I ported the code (its really only a few lines) to Espruino. No luck, the display doesn't change, it just keeps showing the same image.

    I tested all hardware SPIs as well as software SPI. I tested it with a Espruino Wifi and a Pixl. I quadruple checked the wirings. Nothing.

    The only thing I can imagine is that the 3.3v power supply isn't enough, though I is rated as an 3.3v display.

  • Quick update: I got it to work. Turned out I did not explicitly set the CS (nss) pin while writing data.

    If the last argument is a pin, it is taken to be the NSS pin

  • @Raik, can you please share us the details ( if possible, with the code) ?

    Thanks
    Navas

  • Hi @navas,

    can you please share us the details ( if possible, with the code) ?

    I'd be happy to: https://github.com/ps-igel/EspruinoModul­es

    It's basically a modified version of die SSD1606 paper driver.

    I'm sure there is a lot of room for improvement, especially making the data transfer of the buffers to the epapers ram faster.

    Wiring as in the example:

    Feel free to play around and improve. :)


    2 Attachments

    • GDEW027C44_1_small.jpg
    • GDEW027C44_2_small.jpg
  • @Raik
    Thank you so much, I will give it a try ASAP.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

E-paper GDEP015OC1 display

Posted by Avatar for Zak @Zak

Actions