juj / fbcp-ili9341

A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3, 4 and Zero
MIT License
1.61k stars 266 forks source link

GC9A01 Driver | round 1.28" 240x240 screen is super cool, can we make it fit this library? ⌚📺 #229

Open Shargil opened 3 years ago

Shargil commented 3 years ago

First, this library docs are amazing, I read most of it. I couldn't find if one of the supported drivers are super similar to this GC9A01 driver.

I want to show the HDMI output on this display, or even just show a video via python.

  1. What is my best bet? (I only found this 9 fps option, which is slow https://www.pcbway.com/project/shareproject/Raspberry_Pi_Pico__CircuitPython_and_Round_Display_GC9A01.html)

  2. How can I fit another supported driver, to this one? Is it similar to another driver at all?

Thanks :)

Shargil commented 3 years ago

I found it's data sheet https://www.buydisplay.com/download/ic/GC9A01A.pdf Do you think I have a chance making this driver work in few hours (know python and a bit of C, never done anything with drivers)? If so, do you know any guides I should start with?

Shargil commented 3 years ago

Also, in the waveshare code example there is the init sequence for this display, maybe it can help? Look something like this:

def Init(self):
        """Initialize dispaly"""  
        self.module_init()   
        self.reset()

        self.command(0xEF)
        self.command(0xEB)
        self.data(0x14)

        self.command(0xFE)           
        self.command(0xEF) 
        # ...

https://www.waveshare.com/wiki/1.28inch_LCD_Module https://www.waveshare.net/w/upload/a/a8/LCD_Module_RPI_code.7z

juj commented 3 years ago

The data sheet you have does look very compatible with existing ILI9341 and ST7789 displays. It is possible to probably copy one of those controller files as a basis and adjust it to work for that display. The protocol commands seem to be quite similar than what ILI9341 has.

Using existing code as a basis can also help, but be sure to be careful around the license of the source where you take the code. If you intend to publish or propose a pull request, if there is any copied code, need to be careful to avoid stomping on other companies licenses.

jonathandann commented 3 years ago

I have something working. It's not working properly yet, but it's displaying something, at least :D IMG_0798

This is a Waveshare 1.28 round LCD with a GCA901 driver, connected to a RPi 4B over 4-wire SPI.

jonathandann commented 3 years ago

And it seems I can log in to the terminal too. This is running Raspbian Buster Lite. Ideally I'd like to get webkit rendering to a frame buffer so I can render a UI CSS animations.

My refresh rate is dog slow right now, but it does refresh as I type.

Shargil commented 3 years ago

I finally found a solution and wrote it down! https://www.instructables.com/Connected-Round-Screen-240x240-GC9A01-Controller-t/ @jonathandann maybe it will help you scenario too :)

Shargil commented 3 years ago

@juj Used the deprecated fbtft flex https://github.com/notro/fbtft/wiki/flexfb. With init code found in the regular python example from waveshare. With that working, you think it would have been easy to make this work with fbcp?

jonathandann commented 3 years ago

I've managed to get a very high frame rate using -DSPI_BUS_CLOCK_DIVISOR=6. Seems to work pretty well except for a single corrupted row at the bottom of the screen.

jonathandann commented 3 years ago

maybe it will help you scenario too :)

Thanks for taking the time to do that!

vialde commented 2 years ago

I have something working. It's not working properly yet, but it's displaying something, at least :D IMG_0798

This is a Waveshare 1.28 round LCD with a GCA901 driver, connected to a RPi 4B over 4-wire SPI.

Hey @jonathandann What did you do to get this far? My efforts are proving fruitless