Connect with us

advice/assistance request on EINK display (GDEH0213B72)

Discussion in 'Microcontrollers, Programming and IoT' started by javascripter, Sep 4, 2021.

Scroll to continue with content
  1. javascripter


    Sep 4, 2021
    I have an EINK display I got a bit ago and am now trying to get to just do anything, have been working on it for a few days now. Am using STM32F103C8T6 for code, so code is C with STM32 HAL libraries, but that isn't so important as I have verified my SPI output is working correctly with a logic analyzer.

    EINK display is GDEH0213B72, and I am mostly using the attached datasheet as it is the best I have been able to find. I am using a DESPI-C02 interface board between MCU and display.

    So far I haven't been able to get anything to display, and I also think I haven't been able to get DCDC to run.

    Here is the code I've got based on the reference program code flowchart on page 21:
    Sorry about the code being a bit of a mess, right now I'm just trying to get it to work at all.
    Also gImage_1[4000] is from a code example I was trying to work from and I'm pretty sure is the wrong size; I left it because I thought I can just use part of it and it will give at the worst effectively a random image.

    That code runs to the point of the main loop where I blink an LED (on C13); but EINK is unchanged. However, it seems that VCOM is never driven though I am not sure; if I put a breakpoint before deep sleep and check with multimeter it starts somewhat negative and the voltage increases to 0, so maybe it is being driver incredibly weekly?

    Another thing I tried is in comments from lines 401 to 416 and is as far as I got trying to follow the typical operating sequence flowchart on page 20. I wasn't able to figure out commands for VGL or oscillator clock/DCDC & regulator (I realize any of the 0x22 commands "Enable clock signal", so maybe that is for oscillator clock, but no idea on DCDC & regulator). Sometimes after running some of those commands BUSY would go high and never go low again, but even when that didn't happen same result of nothing happening.

    I have the SPI configured so that the clock idles high and data is shifted out on a rising edge. I have also tried with both RESE settings the board has as I wasn't able to find which to use from datasheet, but result is the same.

    Any advice or suggestions is greatly appreciated.

    EDIT: Also, I was unsure if this is the correct place for this question(s?), so if anyone has somewhere else to suggest asking that is also appreciated.

    Attached Files:

  2. javascripter


    Sep 4, 2021
    The edit button seems to have disappeared, but I found a bit better datasheet here:
    (I actually had it open in a different browser from several months ago, I don't understand why it isn't linked by anyone selling this part.)

    I was missing at least command 0x3C, 0x0C, and 0x20 to do border waveform (no idea what that is or what setting I should use, I set it to VCOM), softstart (same thing, I just did 0xFF, 0xFF, 0xFF, 0xCF) and the command to actually write to the screen. Here is updated main.c:

    Anyway, tried several things with that but still no results.
  3. javascripter


    Sep 4, 2021
    well this feels terrible to answer my own question and I'm not really happy with the solution I figured out; but anyway I got it to work somewhat by instead of using the hardware SPI driver using this code:

    void writeByte(unsigned char TxData)
        unsigned char TempData;
        unsigned char scnt;
      HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, 0);
              HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, 1);
              HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, 0);
          HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, 1);
          HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, 0);

    Especially a bit annoying since I messed around with SPI settings quite a bit and couldn't get anything to work but I guess this works well enough for my purposes.
    Last edited by a moderator: Sep 5, 2021
    davenn likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day