Coder Social home page Coder Social logo

Comments (8)

tannewt avatar tannewt commented on September 28, 2024 1

RGB565 is what we support currently. It is 16 bits.

You'll want something like RGB666 in 24 bits. I think the 3 bytes of 24 bits will be the hardest part because we usually only do power of twos 1, 2, 4 bits and 1, 2 and 4 bytes.

Most of the color conversion code is here:
https://github.com/adafruit/circuitpython/blob/main/shared-module/displayio/ColorConverter.c

You'll likely need to change

int16_t offset = row_start + (input_pixel.x - start_x + x_shift) * x_stride; // in pixels
too for the 3 byte offsetting.

from circuitpython.

bablokb avatar bablokb commented on September 28, 2024

My patch does not operate on bytes, but on words (i.e. 16bit wide units). And this is only necessary if the SPI-bus on the MCU side is connected to two serial-in, parallel-out shift registers that translate 8bit-SPI to 16bit-parallel. The shift-registers themselves are connected as 16bit-parallelbus input to the ILI9488.

So a very special setup on the display-side. Many ILI9488 displays just connect the SPI-bus of the MCU directly to the chip. These types of displays do not need the patch. In fact, they won't even work with the patch.

My patch is not a solution, it is a bad hack for a very specific hardware setup. A real solution would be to introduce a new parameter to one of the core classes. But this would trigger changes on many board-files and introduce code that is of no use for most of the users.

from circuitpython.

skerr92 avatar skerr92 commented on September 28, 2024

I mean, either way there seems to be something not working right with any init sequence when using SPI with the ILI9488 devices when using SPI. I've tried with an init sequence derived from the data sheet, from TFT_eSPI (Arduino works), with similar sequences from adjacent displays.

I still tend to think the issue might lay with how bus core is sending the spi data to the display. I've compared sending the same init sequence that works with Arduino, and it's not sending the same data. This is even comparing using ESP32, RP2040, and SAMD51.

from circuitpython.

tannewt avatar tannewt commented on September 28, 2024

This looks like normal SPI to me:
image

I think there is a bug on your side. I'd encourage you to use a logic analyzer to compare what CP does to your working Arduino example.

from circuitpython.

tannewt avatar tannewt commented on September 28, 2024

Now that I say it, this is normal SPI. However the pixel format isn't the normal RGB565 because this is three bytes. CircuitPython doesn't support this layout currently.

from circuitpython.

skerr92 avatar skerr92 commented on September 28, 2024

Do you have an idea of what it might look like to support RGB565? I'd be willing to take a look at the addition.

from circuitpython.

bablokb avatar bablokb commented on September 28, 2024

The ILI9488 also supports RGB565. That is what I am using. You will find that in the datasheet as well. It is command 0x3a (in the datasheet section 5.2.34. Interface Pixel Format (3Ah)).

I am not sure if RGB666 will make such a difference on these small displays.

from circuitpython.

skerr92 avatar skerr92 commented on September 28, 2024

RGB565 is only supported in 8b and 16b data bus. SPI only supports RGB111 and RGB666.

from circuitpython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.