-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Re-enable paralleldisplaybus on ESP #8862
Conversation
Add lilygo t-display s3 because it has a parallel display. Fixes micropython#8437
Changes in 18 files is a lot. I copied the changes to my local build, compiled the image and uploaded the created firmware.bin to my T-Display S3 with The MADCTL value I have only two observations. The flash chip should have 16 MByte but in Windows the total size indicated is 5.66 MB. And the only |
Two problems are solved. I had already flashed another CircuitPython image to this board prior to trying this new build here. The old image was compiled for 8MB and I think the partition scheme was carried over and not overwritten. After now erasing the flash first and then flash the Don't know yet how to get into the UF2 boot mode where I could just drop a new |
The 8 parallel lines connecting to the display really speed up the graphic output. A simple 1000x "Hello world" gets around 5x faster: import board, displayio, time
board.DISPLAY.root_group = displayio.CIRCUITPYTHON_TERMINAL
start = time.monotonic()
for i in range(1000):
print("Hello world!", end=" ")
print(f"\nThis took {time.monotonic() - start} seconds.") New 1.89 seconds versus 10.3 seconds. Without rendering to the build-in display (serial) its 1.27 seconds. Looking forward to some high-fps applications with CircuitPython (Some examples in Arduino with 57 fps are posted on Youtube) |
On ESP you need to install UF2 separately. The RP2040 has it in ROM and adafruit boards usually have it factory installed.
Yup, will look at this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tannewt This now has merge conflicts.
Has a decision been made about the button pin names?
I intend to do it. Just haven't gotten to it. Will do tomorrow hopefully. |
Thanks @tannewt for the good work! And standardizing the button names for all T-Display boards! |
When I try to use the ST7789 driver for this, I get an error: The code was the example at https://github.com/adafruit/Adafruit_CircuitPython_ST7789 ... and the 'module' is 'board' I am gathering from the above conversation that LilyGo isn't using SPI to drive the ST7789. Can you help point me in the direction of how to get the CircuitPython Adafruit_gfx library going? The display works... I can get the REPL display on it, and the Hello World test from above. I think I need to dive into the DisplayIO driver? Sorry if this is too far off topic, but the context seemed relevant. |
If f you're using the tdisplay-s3, its a parallelbusdisplay and I believe it's already set up on boot for use feom the Also, best place for this sort of question is the adafruit discord in the #help-with-circuitpython channel |
Yep, @dsteidley I just verified what @SeanTheITGuy said is correct: just installing the CircuitPython for the LilyGo TDisplay S3 automatically creates the display and you can get it for your own purposes with If you do want to create your own, it looks like the equivalent is something like the below. But what I'd like to know: """
LilyGo T-Display S3 display hand-setup
"""
import time
import board
import digitalio
import displayio
import paralleldisplaybus
import adafruit_st7789
displayio.release_displays()
lcd_power = digitalio.DigitalInOut(board.LCD_POWER_ON) # IO15
lcd_power.switch_to_output(value=True)
display_bus = paralleldisplaybus.ParallelBus(
# IO39,40,41,42,43,44,45,46,47,48
data_pins = (board.LCD_D0, board.LCD_D1, board.LCD_D2, board.LCD_D3,
board.LCD_D4, board.LCD_D5, board.LCD_D6, board.LCD_D7),
command = board.LCD_DC, # IO7,
chip_select = board.LCD_CS, # IO6,
write = board.LCD_WR, # IO8,
read = board.LCD_RD, # IO9,
reset = board.LCD_RST, # IO5,
frequency = 15_000_000,
)
display = adafruit_st7789.ST7789(display_bus, width=320, height=170, rotation=270, colstart=35)
while True:
print(time.monotonic(), "this is on screen")
time.sleep(0.2) |
when rotated 270 (-90) degrees, the columns become rows, so colstart instead of rowstart makes sense, right? As to WHY it's rotated, I'd guess it comes down to how the individuals who wrote board.c vs that demo code wanted to hold the t-display. |
There were several PRs like #8772 / #8773 which eliminated the screen rotation of the display by updating the display init strings in the core board files. The library init strings probably haven't been updated the same way which is why you still need to specify the old rotation/rowstart/colstart values. |
Add lilygo t-display s3 because it has a parallel display.
Fixes #8437