nspsck / RM67162_Micropython_QSPI

This is a C driver as a user module for the T-AMOLED-S3 using QSPI-protocol.
MIT License
7 stars 4 forks source link

RM67162 Driver for MicroPython

Note:

Scrolling does not work. Maybe using a framebuffer (provided by Micropython) to scroll will work.

Contents:

Newer versio Lilygo AMOLED S3

According to Issue#2, apparently, you have to set IO38 High for the display to work on newer versions. Huge thanks go to dobodu to bring this up and lewisxhe for providing the solution.

SPI Version

There is a SPI version of this firmware provided by gampam2000. Thank you for sharing your work!

Introduction

This is the successor of the previous lcd_binding_micropython. It is reconstructed to be more straightforward to develop on, and this allows me to test the changes before committing.

This driver is based on esp_lcd.

Available functions: fill, fill_rect, rect, fill_cirlce, cirlce, pixel, vline, hline, colorRGB, bitmap, brightness, line, text, write, write_len etc. For full details please visit the documentation.

All fonts are created by russhughes.

The firmware is provided each time when I update this repo.

To-DO: (This is a lie. :c I hope I can find time to make this happen later in my life..)

Features

The following display driver ICs are supported:

Supported boards:

Driver IC Hardware SPI Software SPI Hardware QSPI I8080 DPI(RGB)
ESP32-S3 supported supported supported no support no support

Documentation

In general, the screen starts at 0 and goes to 535 x 239, that's a total resolution of 536 x 240. All drawing functions should be called with this in mind.

Related Repositories

Build

This is only for reference. Since esp-idf v5.0.2, you must state the full path to the cmake file in order for the builder to find it.

cd ~
git clone https://github.com/nspsck/RM67162_Micropython_QSPI.git

# to the micropython directory
cd micropython/port/esp32
make BOARD_VARIANT=SPIRAM_OCT  BOARD=ESP32_GENERIC_S3 USER_C_MODULES=~/RM67162_Micropython_QSPI/micropython.cmake

You may also want to modify the sdkconfig before building in case to get the 16MB storage.

cd micropython/port/esp32
# use the editor you prefer
vim boards/ESP32_GENERIC_S3/sdkconfig.board 

Change it to:

CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_ESPTOOLPY_AFTER_NORESET=y

CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MiB.csv"

If the esp_lcd related functions are missing, do the following:

cd micropython/port/esp32
# use the editor you prefer
vim esp32_common.cmake

Jump to line 105, or where ever APPEND IDF_COMPONENTS is located, add esp_lcd to the list should fix this.

Optional Scripts