Go Down

Topic: GXEPD2 and Waveshare 7.8" 1872 × 1404  (Read 618 times) previous topic - next topic

joez82

Hello everyone,
I wonder if the day that this new e-paper display will be supported in GXEPD2, I will be able to drive all its 1872 × 1404 pixels from an Arduino, notwithstanding its memory limitation.

In theory, thanks to paged drawing / picture loop I should be able to do it, right?

Thank you in advance,
Joez

ZinggJM

#1
Jul 28, 2019, 05:38 pm Last Edit: Jul 28, 2019, 05:57 pm by ZinggJM
Hello everyone,
I wonder if the day that this new e-paper display will be supported in GXEPD2, I will be able to drive all its 1872 × 1404 pixels from an Arduino, notwithstanding its memory limitation.

In theory, thanks to paged drawing / picture loop I should be able to do it, right?

Thank you in advance,
Joez
https://www.waveshare.com/product/modules/oleds-lcds/e-paper/7.8inch-e-paper-hat.htm

In theory, yes. Note that the e-paper has a parallel interface, and you need the matched driver board.
1872/8 gives 234 bytes per line. So you get some few lines per page on a UNO.

I would need a sponsor to allow me to add support for this to GxEPD2.
But as all parameters are in the driver board, you just need to adapt the screen dimensions, starting from the version for the 6" 800x600.

Thank you for pointing to this new e-paper!
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

joez82

Thank you ZinggJM for your quick reply!

If I will have the chance to get one before you do, I will try to add the code as you pointed out and report my results here, eventually making a PR!

Kind regards,
Joez


joez82

Hello ZinggJM,

I've tried patching GxEPD2_it60 class files into my own GxEPD2_it78, adjusting the resolution.
When I try to compile a sample hello world on my ESP8266, I received the following error message from the linker:

Linking .pio/build/nodemcuv2/firmware.elf
[..]/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x4003f060 of .pio/build/nodemcuv2/firmware.elf section `.bss' is not within region `dram0_0_seg'


If I replace the display declaration to use a 2.9", everything works as expected.
Is there some minimum memory requirements that my ESP8266 does not match?

Thank you in advance,
Joez

ZinggJM

Code: [Select]
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT / 8> display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4));


replace the divisor 8 with a high enough value to let the page buffer fit into ESP8266 RAM, e.g.

Code: [Select]
GxEPD2_BW<GxEPD2_it60, GxEPD2_it60::HEIGHT / 12> display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4));


I leave it to you to calculate or guess the appropriate value, or you can take a look at the alternative method used e.g. for AVR.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

joez82

Thank you for your quick reply, I confirm that did the trick!

joez82

Hello,
now I am able to write and draw in BW, but I could not find a way to use the 16 (4 bit) shades of gray when using drawing primitives such as fillRect.

It seems even GxEPD_LIGHTGREY and GxEPD_DARKGREY constants are not working.

Any idea?
Thanks,
Joez

ZinggJM

#7
Aug 06, 2019, 11:29 am Last Edit: Aug 06, 2019, 11:41 am by ZinggJM
Graphics and text in GxEPD2 are b/w only, or b/w/red or b/w/yellow for 3-color e-paper.
I think I have implemented drawNative() for native format bitmaps with grey levels for panels on IT8951.

Adafruit_GFX has Canvas objects with several bit-depths, also for grey levels, I believe. But I don't think any of these has a bitmap format that would correpond to the native format. But this could be a future option for GxEPD2 for panels with grey levels.

GxEPD_LIGHTGREY and GxEPD_DARKGREY are leftovers from some tests with 7.5" b/w.

Grey level graphics would be a feature in GxEPD_HD, but this is not yet implemented.
IT8951 support is not (yet) implemented in GxEPD_HD.
Enhancements to GxEPD_HD could be started, if HW sponsors become active.

Jean-Marc
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

joez82

Hi ZinggJM,
I've been able to hook my class so to define color override regions, that allow me to influence the shades of grey used for both the white and black pencil. This way I can define rectangular color override areas for white, black or both.

It's somewhat an hack, but good enough for what I need so far.

Now I'd have another question: I'm trying to update a clock inside a calendar and I intended to do the following:

1. Once every 30minutes, wakeup with WiFi, fetch data from Internet, sync clock to be stored inside ESP8266 RTC memory, draw the full display and go into deepsleep for a minute

2. Wake up every minute, without WiFi, update the clock and perform a partial update of the screen (clock area only).

I'm having trouble doing a partial update after a wake: is there a limitation that allows partial updates only after a full display write?
Does partial update need the state of the controller to be preserved, or could I just update a portion of the screen after a cold boot of the IT8951 driver board?

Thank you in advance,
Joez

ZinggJM

Hi joez82,

I have no idea. I only did the minimum to get the 6" display working with IT8951 with GxEPD2.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

ZinggJM

Quote
I'm having trouble doing a partial update after a wake: is there a limitation that allows partial updates only after a full display write?
Code: [Select]
    // init method with additional parameters:
    // initial false for re-init after processor deep sleep wake up, if display power supply was kept
    // this can be used to avoid the repeated initial full refresh on displays with fast partial update
    // NOTE: garbage will result on fast partial update displays, if initial full update is omitted after power loss
    // pulldown_rst_mode true for alternate RST handling to avoid feeding 5V through RST pin
    void init(uint32_t serial_diag_bitrate, bool initial, bool pulldown_rst_mode = false)


should also work with it8951. Oops, false, not true, comment is wrong in code.

Quote
Does partial update need the state of the controller to be preserved, or could I just update a portion of the screen after a cold boot of the IT8951 driver board?
The state needs to be preserved, because the buffered previous state needs to correspond to the picture on the display for differential refresh.

Note that differential refresh only works with pure b/w content, of previous and of new picture.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

joez82

Thank you, ZinggJM, your comment was illuminating.

I was able to make my partial refreshes after a deep sleep of my ESP8266, but putting the it8951 on stand-by is still too power hungry for my setup: quiescent currents of both boards, plus the spikes of wake ups and screen refreshes are limiting too much the duration of the battery.

So I went adding a p mosfet to turn completely off the driver boards but I was experiencing issues and artifacts when drawing, and this is due to what you point out here:

The state needs to be preserved, because the buffered previous state needs to correspond to the picture on the display for differential refresh.
I'm wondering: if I know exactly what to expect in the buffer, before doing a partial update, would that help me in any way?
I mean: if I do a partial memory fill of the it8951, to reflect what was present in the buffer before I powered off, then I fill it with new content and ask a partial refresh, do you think that might work?

I ask this, because I would like just to update a small area where a digital clock is displayed, so it would be easy for me to recalculate the previous "HH:mm" displayed there, before performing a partial update with new time.

Thank you in advance,
Joez

ZinggJM

#12
Aug 22, 2019, 09:59 am Last Edit: Aug 22, 2019, 10:13 am by ZinggJM
@joez82,

I think you can do this, or at least try.

I think this is what the demo codes from Waveshare and Good Display do for partial update.

But this is not the design goal of GxEPD2.

I think IT8951 should support 2 levels of sleep or deep sleep, but this didn't work with my board. You could ask Waveshare about this issue. I don't care, as for me this board doesn't make sense for low power use.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

joez82

I think IT8951 should support 2 levels of sleep or deep sleep, but this didn't work with my board. You could ask Waveshare about this issue. I don't care, as for me this board doesn't make sense for low power use.
I just tried the deep sleep, but it does not bring any additional power save compared to Stand-by.

What would be your advice for a low power use? You mean designing a custom driver board?

ZinggJM

Maybe, yes, Kindle, Tolino & Co. can do this with parallel IF e-paper displays.

You could take a look at the few high resolution SPI e-paper displays Good Display has on offer.
It all depends on the size and resolution you need.

I am looking forward for the 7.5 inch Large e-paperdisplay higher resolution 800x480 SPI GDEW075T7 to become available, e.g.

This may be the optimal big SPI e-paper display for moderate price for hobby users.

Or this one 12.48 inch large e-ink display, big e-paper screen, GDEW1248T3 for big size.
No personal message please; any question may be useful for other users. Use code tags for code. Make links clickable with URL tags. Provide links to the product in question.

Go Up