-
Notifications
You must be signed in to change notification settings - Fork 272
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
Can this be updated for ILI9488 #26
Comments
Yeah I would also like this to be updated for an ILI9488 please. |
I am not currently familiar with ILI9488 and don't have an ILI9488 display unfortunately, so I am not able to do this. Perhaps ILI9488 is close enough to ILI9486 or ILI9486L so that one of those backends could be used as a basis to do a port, if you have got access to a ILI9488 display. If someone is able to get it working, patches are welcome. |
I’ve also got little to no experience. What’s the challenge to figure out when trying to to get it to work with ili9488? |
Well one massive issue stemming from me not reading I see that this driver is only for 4-wire not the dual line input header mine came with{; |
fbcp-ili9341 now gained 3-wire SPI support (no Data/Control line) in the above commit. That can be activated in CMake by setting See the above commit for updates to Readme.md for the docs. |
So I've gotten this to run on an ILI9488 display (specifically an MSP3520 display) on a Raspberry Pi 4 running Buster Light. I just built for the ILI9486L, my specific options were:
Currently get ~19fps; I just have the display wired to the Pi with long dupont connectors right now so I haven't bothered to experiment with the clock divisor yet to see how fast I can get. Also note that the '9488 supports 24-bit color, so a slight code change to the '9846L could improve display quality. I'll look into making that change and submitting a pull req. |
Also interested in ILI9488 support. |
I purchased a couple of these displays https://www.buydisplay.com/serial-spi-3-5-inch-tft-lcd-module-in-320x480-optl-touchscreen-ili9488. They have the ili9488 datasheet on their site https://www.buydisplay.com/download/ic/ILI9488.pdf. It's a bit dense for me so I am struggling a bit to understand it. However I compared the registers listed in that datasheet with the ones used in the 9431 and 9486 and their purpose appears to line up well. The supplier also has sample code for microcontrollers posted on the site and looking through those I wrote an ili9488 module using the 9486L as a template. However, I can see the screen reset and blank but I can't see anything on the screen. I also found a project (for microcontroller) claiming that a slight change in the Adafruit 9341 driver allowed the 9488 to work: https://www.instructables.com/id/Arduino-and-35-Inch-320x480-TFT-LCD-ILI9488-SPI-In/ with a slight modification:
I have not tried this yet. There is also this project which added the ili9488 to the Adafruit display ecosystem: https://github.com/jaretburkett/ILI9488. The code inside appears to be the same used in the code provided by the supplier I mentioned above. Would it be reasonable to use the initialization and control sequences used in the microcontroller code when writing the module for the Pi? I would expect this would be the case since the display does not care where the instructions come from, only that they match what it expects. Also, I am doing this on a ZeroW. Not sure if that may be part of my struggle. I did get a Adafruit PiTFT working on it so I suspect the Zero is ok. |
It would - please make sure though that the licenses of the other repositories are compatible, I do not want to have other peoples' work reach this repository if their licensing requirements are different. There may be a difference in color spaces: ILI9341 is RGB565, but iiuc ILI9488 like ILI9486L might be a R6X2G6X2B6X2 color format display? Though perhaps it does have different color formats configurable. |
I agree, I did not mean to imply that the code should be copy/pasted but rather used as a basis. The only header with information in the code from the supplier is:
As far as I can tell it is provided on their website explicitly to be used and there is no mention of licensing conflicts. So I believe it should be ok. The color space, according to the data sheet, varies depending on the interface method used. For SPI 3 wire there is a choice of 8 color (RGB 1, 1, 1) or 262K (RGB 6, 6, 6). The 4 wire interface has 3 options: 8 color (RGB 1, 1, 1) or 65K (RGB 5, 6, 5) or 262K (RGB 6, 6, 6) I got my 9488 to display content using @hakmo 's solution from above, but at least in my case the colors were off which I suspect is related to the details mentioned above, I will look into that as soon as I get a chance. |
The datasheet indicates that the driver at least supports RGB888 space, but I've found that it'll run in R6X2G6X2B6X2, though it doesn't look great. Colors are off like quezadaminter mentions (see attached images) but sometimes blink into looking good briefly. I'm not sure if that's down to color space or some other settings. I've started trying to implement RGB888 color space, but am having to learn dispmanx as I go. Trying the settings quezadaminter mentioned first to see if that clears things up is a good idea. For DSPI_BUS_CLOCK_DIVISOR, I was able to get that down to 8 before I got image corruption, still with long dupont wires. |
Nice! I have not been able to set the clock divider lower than 12, but I am also on dupont wires for now. I do agree that it "works" in 6X2 but I have not checked what the 3Ah register is set to for the 9486L. You could try messing with that, the details I have from the datasheet I reference above are on pages 199 (3Ah register details) and 119-122 for the description of the color spaces and the expected bit packing order. |
@hakmo That's great! Any chance you could share the code you set up? I tried doing the same thing but mine is locking up on startup, even at slow speeds. I clearly did something wrong with the settings. Did you replace the code inside the BEGIN/END_SPI_COMMUNICATION() scope? I noticed that the END_SPI_ call is removed when building with DMA support. However jaretburkett's code calls the END, then BEGIN_, then sends another message, then calls END_ again. The datasheet makes reference to this steps as needed to reset the communication state with the 9488. Did you add these lines also? |
Sure, a pull request would be welcome! |
Hi there, Panel--- Panel------RPI-------RPI pin others pins are not connected here the cmake command I've used: at least display fired up when I launch "sudo ./fbcp-ili9341" but nothing is displayed. Did I miss something ? Thank for help. |
@le51 , Can you post a picture of your setup? It may be helpful to see what your panel looks like. In the meantime, here are some flags you may consider adding to your build attempt:
Make sure you indeed have a 9488 display, the initialization sequences are not always interchangeable and will cause the panel to misbehave. |
Hi, thank you very much for help ! This is the display I own: I will investigate this tomorrow as it's getting late here. |
@le51 I noticed that your list of pin connections indicates that the CS pin is unconnected. This cannot be. The CS pin is a critical part of the SPI interface and if you don't connect it then the display won't know when the pi is talking to it. Connect the CS pin of the display to GPIO8 (CE0) on the pi and try your driver again. |
Hi @quezadaminter , you make my day, thank you very much. For those who are here, this is my display: MSP3520 with ili9488 driver. Wiring I used: Panel--- Panel------BCM-------RPI pin cmake command: cmake -DILI9488=ON -DGPIO_TFT_DATA_CONTROL=25 -DGPIO_TFT_RESET_PIN=7 -DSPI_BUS_CLOCK_DIVISOR=10 -DBACKLIGHT_CONTROL=OFF -DARMV8A=ON -DSTATISTICS=0 -DUSE_DMA-TRANSFER=ON .. Now, make the touch function to work ! Cheers |
After a few weeks of fiddling, the driver seemed working, but got a "vc_dispmanx_display_open failed!" message, and the display showed no image. the solution was here : [https://github.com//issues/100] (enabling tvservice) sudo tvservice -p |
Any way to get this to be run with a ILI9488.
The text was updated successfully, but these errors were encountered: