adafruit / Adafruit_CircuitPython_IL0373

CircuitPython `displayio` driver for IL0373-based ePaper displays
MIT License
5 stars 11 forks source link

Black border around the edge of the display #11

Closed flummer closed 2 years ago

flummer commented 4 years ago

When using this library with the 2.9" B/W displays from GoodDisplay (GDEW029T5), the black border is very noticeable. This is outside the controllable pixels, but if you have graphics right up to the edge, this border will touch the black pixels.

The border is also there on the smaller 2.13" tri-color displays (eg. on the Adafruit 2.13" E-Ink FeatherWing), but it is not as noticeable, since most is covered by the edge of the screen.

It seems that the color of this border is controlled by the VBD bits in the CDI command of the startup sequence, but the datasheet for IL0373 seems to skip the description for those two bits.

There are a bit more info in the datasheet for GDEW029T5 (2.9" B/W) and GDEW029T5 (2.13" tri color) and it seems like the color of the border depends on other settings in addition to the two VBD bits.

My experimentation has resulted in: VBD[1:0] = 0, 0 // black border on both, last byte in CDI 0x37 VBD[1:0] = 0, 1 // white border on tri color, black border on b/w, last byte in CDI 0x77 VBD[1:0] = 1, 0 // red border on try color, white border on b/w, last byte in CDI 0xB7 VBD[1:0] = 1, 1 // white border on both, last byte in CDI 0xF7

I think the last one (1, 1) is what they call floating, with the other settings that are used (DDX[0]=1).

I think "white" of "floating" will blend in best with the displays, if it was to be fixed, but an option to select this in CircuitPython when using this driver would be nice, since that would allow use cases where the edge isn't covered by a case to have the border follow the general background color used.

I can work on that and make a pull request if there is interest.

ladyada commented 4 years ago

i would dig having a border property that you could set in the initializer - @tannewt any opinions?

tannewt commented 4 years ago

border property would be fine with me. Could also be a kwarg into the constructor.

flummer commented 4 years ago

kwarg in the constructor is what I have been thinking about, and if it's left out, it behaves like now.

I'll take a look at it, do some tests on the screens I have and do a pull request.

ladyada commented 4 years ago

awesome

peterhinch commented 3 years ago

I am writing a MicroPython driver for your 2.9" monochrome displays.

Testing was on a 2.9" flexible EPD with breakout friend, and also on a 2.9" FeatherWing. With VBD[1, 0] == [0, 0] as per your code the flexible display has a white border yet the FeatherWing shows black. With both bits set to 1 the FeatherWing still shows a black border.

In other respects the displays behave identically. This is just to record this observation in case anyone follows up on this issue.

OneOfTheInfiniteMonkeys commented 3 years ago

Hi, I posted recently, suspecting a driver level issue. See the image below for the preferred "look" without border. Comparing CircuitPython 6.3.0 code to the delivered item.

If a "border property" is the architectural solution to feed into CircuitPython, I would very much like to see it released. (I am happy to support e.g. testing etc.)

Issue example, showing border zone and exterior contiguous zone outside graphic zone: <img src="https://user-images.githubusercontent.com/45082871/128596513-48578308-3cda-4ef4-a58b-4ec39250c2a7.png" width="50%" height="50%">

The detail below is a summary of how I arrived at what I hope to be the right place: The MagTag circuit diagram shows (07 Aug 2021) EPD0231, a 2.13" display. The MagTag uses a 2.9" part. My MagTag e-ink display hardware is a 2.9" part marked WFT0290CZ10 LW. Which seems to be the GDEW029TD5 by Dalian Good Display see image below, detailed above by flummer. Which in turn appears to be similar to the Adafruit 2.9" Flexible Monochrome eInk / ePaper Display - 296x128 Monochrome PRODUCT ID: 4262, having a different backing. The 4262, being the display listed in the driver documentation library Adafruit_CircuitPython_IL0373. i.e. Hopefully this library.

GoodDisplay part marking (with zoom section on part marking) matching that on my MagTag display:

The GoodDisplay datasheet Rev 1.0 27 Jan 2021 for the GDEW029TD5 appears to make no mention of the IL0373 display driver specifically. The GoodDisplay site does not appear to list the IL0373 readily. However, I did locate a datasheet for an IL0373 here.

tannewt commented 3 years ago

The CDI setting is here: https://github.com/adafruit/Adafruit_CircuitPython_IL0373/blob/main/adafruit_il0373.py#L42