Skip to content

Adafruit 2.9 EPD UC8151D - Shows all black screen #7778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
VictorioBerra opened this issue Mar 22, 2023 · 17 comments · Fixed by #7891
Closed

Adafruit 2.9 EPD UC8151D - Shows all black screen #7778

VictorioBerra opened this issue Mar 22, 2023 · 17 comments · Fixed by #7891
Assignees
Milestone

Comments

@VictorioBerra
Copy link

VictorioBerra commented Mar 22, 2023

Just got this product in: https://www.adafruit.com/product/1028

Using it with this product: https://www.adafruit.com/product/5477

Exactly the same as this issue: adafruit/Adafruit_CircuitPython_IL0373#28

CircuitPython Version: Adafruit CircuitPython 8.1.0-beta.0-50-ge1f16472c on 2023-03-22; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

image

Wiring:

EPD ESP32-S3
VIN 3V3
3V3
GND GND
SCK SCK
MISO MI
MOSI MO
ECS D9
D/C D10
SRCS D6
SDCS D5
RST
BUSY D11
ENA

Code (pretty much exactly from he sample, I only remove the reset pin.):

# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

"""Simple test script for Adafruit 2.9" 296x128 tri-color display
Supported products:
  * Adafruit 2.9" Tri-Color Display Breakout
  * https://www.adafruit.com/product/1028
"""

import time
import board
import displayio
import adafruit_uc8151d

# Used to ensure the display is free in CircuitPython
displayio.release_displays()

# Define the pins needed for display use
# This pinout is for a Feather M4 and may be different for other boards
spi = board.SPI()  # Uses SCK and MOSI
epd_cs = board.D9
epd_dc = board.D10
epd_reset = None
epd_busy = board.D11

# Create the displayio connection to the display pins
display_bus = displayio.FourWire(
    spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
time.sleep(1)  # Wait a bit

# Create the display object - the third color is red (0xff0000)
display = adafruit_uc8151d.UC8151D(
    display_bus,
    width=296,
    height=128,
    rotation=270,
    busy_pin=epd_busy,
    highlight_color=0xFF0000,
)

# Create a display group for our screen objects
g = displayio.Group()

# Display a ruler graphic from the root directory of the CIRCUITPY drive
with open("/display-ruler.bmp", "rb") as f:
    pic = displayio.OnDiskBitmap(f)
    # Create a Tilegrid with the bitmap and put in the displayio group
    # CircuitPython 6 & 7 compatible
    t = displayio.TileGrid(
        pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
    )
    # CircuitPython 7 compatible only
    # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
    g.append(t)

    # Place the display group on the screen
    display.show(g)

    # Refresh the display to have it actually show the image
    # NOTE: Do not refresh eInk displays sooner than 180 seconds
    display.refresh()
    print("refreshed")

    time.sleep(180)

I am using this BMP: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_UC8151D/main/examples/display-ruler.bmp

@VictorioBerra
Copy link
Author

Rolled CircuitPython back, this is working on 8.0.0, its broken on 8.1.0-beta.0-50-ge1f16472c.

@makermelissa makermelissa transferred this issue from adafruit/Adafruit_CircuitPython_UC8151D Mar 22, 2023
@makermelissa
Copy link
Collaborator

Ok, based on that, this looks like a core issue. So I transferred it to the correct place.

@tannewt
Copy link
Member

tannewt commented Mar 22, 2023

I think I've fixed this in #7777

@tannewt tannewt added this to the 8.1.0 milestone Mar 22, 2023
@VictorioBerra
Copy link
Author

How can I get a UF2 of that and test? Just wait for the nightly build to show up on S3 tomorrow?

@tannewt
Copy link
Member

tannewt commented Mar 22, 2023

Artifacts will be here once the CI completes: https://github.com/adafruit/circuitpython/actions/runs/4493575465

Once merged, it'll be in the S3 builds.

@VictorioBerra
Copy link
Author

@tannewt I copied over the ESP32-S3 TFT to my device and its boot-looping.

ESP32-S3 PSRAM (non-TFT) worked with EPD https://www.adafruit.com/product/4778 and EPD
https://www.adafruit.com/product/1028 using: Adafruit CircuitPython 8.1.0-beta.0-52-gfe5e19195 on 2023-03-22; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

@VictorioBerra
Copy link
Author

VictorioBerra commented Mar 23, 2023

No boot loop on nightly build with the ESP32-S3 TFT, but the FeatherWing IL0373 is not working with adafruit_il0373 on Adafruit CircuitPython 8.1.0-beta.0-58-gdb76fbd55 on 2023-03-23; Adafruit Feather ESP32-S3 TFT with ESP32S3

image

@VictorioBerra
Copy link
Author

VictorioBerra commented Mar 23, 2023

ESP32-S3 PSRAM (non-TFT) working with 2.9 EPD - UC8151D using Adafruit_UC8151D nightly build Adafruit CircuitPython 8.1.0-beta.0-58-gdb76fbd55 on 2023-03-23; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3.

Haven't tested the TFT with 8.1.0-beta.0-58-gdb76fbd55 with the UC8151D

Have not tested the ESP32-S3 PSRAM (non-TFT) with the FeatherWing IL0373.

Simply because they were both wired up to the displays I was testing with respectively.

@tannewt
Copy link
Member

tannewt commented Mar 23, 2023

Ok, so the nightly with db76 is still not working with the IL0373 but everything else is ok?

@VictorioBerra
Copy link
Author

Let me just recheck everything and report back here in a few

@VictorioBerra
Copy link
Author

VictorioBerra commented Mar 23, 2023

@tannewt

@tannewt
Copy link
Member

tannewt commented Mar 24, 2023

That is very weird. The code to drive the display should be the same so I'm not sure why it works on one but not the other. I don't think I have a UC8181D display so I'll need to order one and get back to this.

These four cases all work with 8.0.x right?

@VictorioBerra
Copy link
Author

@tannewt

@tannewt
Copy link
Member

tannewt commented Mar 28, 2023

Ok thanks! I'll order a display so I can reproduce this and fix. It might have to do with the new palette conversion cache switching from the TFT colors to the epd ones.

@tannewt
Copy link
Member

tannewt commented Apr 20, 2023

@VictorioBerra Are there any other boards that the UC8151D doesn't work with? I can't find my S3 TFT. I tried mimicking it by having my feather rp2040 EPD init a display to simulate an on board display but the UC8151D still works fine.

@VictorioBerra
Copy link
Author

@tannewt All I have is the two tri color 2.9" EPDs and the S3 TFT. I plan on getting more in the future but im just now diping my toes into all of this.

@tannewt
Copy link
Member

tannewt commented Apr 20, 2023

Ok, no problem. I'll pick up another S3 TFT with my next order.

dhalbert pushed a commit that referenced this issue Apr 26, 2023
Add address_little_endian for epaper displays with little endian
(low byte first) addresses.

Also clears allocated display and display bus memory so it has a
known state. The acep member wasn't always set so it varied
accidentally.

Fixes #7560. May fix #7778. Fixes #5119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants