Go Down

Topic: Good Dispay ePaper for Arduino (Read 117656 times) previous topic - next topic

d2468

Ok, I'll take another stab at this.
There are two separate and unrelated(?) issues: 1. Going between Example and MultiDisplayExample and 2. ghosting on partial update
This is all using GxEPD2.

1. I'm not looking for a fix to this issue as I know how to work around it. Maybe this is a bug report.

I setup MultiDisplayExample using separate reset and separate busy lines. (This seems to be more stable than having disconnected reset lines. I was getting weird behavior yesterday with "Busy Timeout!" when the resets were disconnected). I removed the "one common reset for all displays" lines in the beginning of void setup().
Code: [Select]
#if defined(ARDUINO_ARCH_SAMD)
#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
GxEPD2_BW<GxEPD2_290_M06, MAX_HEIGHT(GxEPD2_290_M06)> display1(GxEPD2_290_M06(/*CS=4*/ 2, /*DC=*/ 6, /*RST=*/ 21, /*BUSY=*/ 3)); // GDEW029M06
GxEPD2_BW<GxEPD2_290_M06, MAX_HEIGHT(GxEPD2_290_M06)> display2(GxEPD2_290_M06(/*CS=4*/ 5, /*DC=*/ 6, /*RST=*/ 20, /*BUSY=*/ 17)); // GDEW029M06
GxEPD2_BW<GxEPD2_290_M06, MAX_HEIGHT(GxEPD2_290_M06)> display3(GxEPD2_290_M06(/*CS=4*/ 8, /*DC=*/ 6, /*RST=*/ 19, /*BUSY=*/ 18)); // GDEW029M06
#endif

void setup()
{
  Serial.begin(115200);
  Serial.println();
  Serial.println("setup");
  display1.init(115200); // enable diagnostic output on Serial
  display2.init(115200); // enable diagnostic output on Serial
  display3.init(115200); // enable diagnostic output on Serial
....

Everything works as expected.

From here, I open up GxEPD2_Example. I defined the pins as the same as my display2 in MultiDisplayExample.
Upon uploading and running this example, display2 and display 3 do the same thing, except that display #3 doesn't do HelloWorld() and one of the hibernating functions. Everything else they do at the same time. Display1 remains blank.

If I restart my computer and run GxEPD2_Example before anything else, only display2 runs, leaving display1 and display3 blank (as expected).
Code: [Select]
#if defined(ARDUINO_ARCH_SAMD)
#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise
#if IS_GxEPD2_BW(GxEPD2_DISPLAY_CLASS)
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 5, /*DC=*/ 6, /*RST=*/ 20, /*BUSY=*/ 17));


I tried running GxEPD2_Example using 'GxEPD2_display_selection_added.h' and 'GxEPD2_display_selection_new_style.h' and they both had the same behavior as mentioned above.

Also, I'm not sure if this is possibly related, but on running GxEPD2_Example or GxEPD2_MultiDisplayExample for the first time after opening the Arduino IDE, I get a warning message during compiling. It uploads fine after the warning. If I compile it again, I do not get the warning message again. (Copied below as code)

Code: [Select]
In file included from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/WVariant.h:22,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\variants\nano_33_iot/variant.h:25,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\libraries\Wire/Wire.h:24,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:1,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_BusIO_Register.h:1,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master\Adafruit_BusIO_Register.cpp:1:
C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined
 #define LITTLE_ENDIAN          1
 
In file included from c:\users\d2468\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,
                 from c:\users\d2468\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/api/Print.h:22,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/api/Stream.h:25,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/api/HardwareI2C.h:22,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\libraries\Wire/Wire.h:23,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:1,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_BusIO_Register.h:1,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master\Adafruit_BusIO_Register.cpp:1:
c:\users\d2468\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition
 #define LITTLE_ENDIAN _LITTLE_ENDIAN
 
In file included from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/WVariant.h:22,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\variants\nano_33_iot/variant.h:25,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\libraries\Wire/Wire.h:24,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:1,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master\Adafruit_I2CDevice.cpp:1:
C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined
 #define LITTLE_ENDIAN          1
 
In file included from c:\users\d2468\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,
                 from c:\users\d2468\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/api/Print.h:22,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/api/Stream.h:25,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino/api/HardwareI2C.h:22,
                 from C:\Users\D2468\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\libraries\Wire/Wire.h:23,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master/Adafruit_I2CDevice.h:1,
                 from C:\Users\D2468\Documents\Arduino\libraries\Adafruit_BusIO-master\Adafruit_I2CDevice.cpp:1:
c:\users\d2468\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition
 #define LITTLE_ENDIAN _LITTLE_ENDIAN





d2468

For the second issue, ghosting during partial update. (follow up from post #460 and #462).

I still get the bad ghosting effect during partial update in Example or MultiDisplayExample. The RESE is set to 0.47 Ohm.
You recommended experimenting with changing the waveform in GxEPD2_290_M06.cpp beginning at lines 329.

I was comparing the Good Display example code to the values in GxEPD2_290_M06.cpp. How does the good display code compare to yours? For example, from Good Display P202001204 Ap_29demo.h :

Code: [Select]
const unsigned char lut_vcom1[] PROGMEM={
0x00  ,0x19 ,0x01 ,0x00 ,0x00 ,0x01,
0x00  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00  ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
  ,0x00 ,0x00,          };



In your code GxEPD2_290M06.cpp
Code: [Select]
const unsigned char GxEPD2_290_M06::lut_20_vcomDC_partial[] PROGMEM =
{
  0x00, T1, T2, T3, T4, 1, // 00 00 00 00
};


Are these two equivalent? I'm not familiar with this style of coding.

If I begin to experiment with the waveforms, what values could T1-T6 span? 0 to 1? 0 to 25?
If this is more than you're willing to support, that's okay.

Thanks for the help.

ZinggJM

#467
Feb 08, 2021, 05:58 am Last Edit: Feb 08, 2021, 06:19 am by ZinggJM
@d2468,

Quote
If this is more than you're willing to support, that's okay.
You need to be careful with your wording with me.
I am willing to help, but I am in no way obliged to.
If I get exact information, not too much confusion, and polite tone, I usually try to help.
Else I may just stop answering.

Jean-Marc

This was for start. I will add more.

Quote
If I begin to experiment with the waveforms, what values could T1-T6 span? 0 to 1? 0 to 25?
Yes, 0 to 25, not more than 50.
The demo code uses a single differential phase of length 0x19 which happens to be 25 in decimal.
The demo code uses an additional following ground phase of length 0x01.
I think I tried that, with no difference, but I am not sure. you can try adding the following line to each array:
Code: [Select]
0x00, 0x01, 0x00, 0x00, 0x00, 0x01
This should result in the exact same waveform as the demo code.

If you use GxEPD2_Example.ino with all 3 displays connected, you need to make sure the other 2 CS lines are held inactive. Floating CS may even produce spurious effects with DESPI-C02. Connecting lines may act as antennas.
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.

d2468

Hi Jean-Marc,

I experimented with changing the waveform without much success. I reached out to Good Display to see if they were able to help.

They asked which code I was using and I linked to your GxEPD2_Example code.

They recommended "please add 0x10 command as in below picture".
This code is from their example code, obviously different than your library.

Is it possible this 0x10 command is added somewhere in GxEPD2_290_M06.cpp ?

Thank you for your help. It is much appreciated.




ZinggJM

@d2468,

You can try adding whatever you like. Then you can report your findings.

Good Display demo code always writes "old data" and "new data" to both buffers before differential refresh.

GxEPD2 has the concept to make sure the "old data" buffer corresponds to the state on display after every refresh.
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