Short and sweet. I have a 3.5" 320x480 using the ILI9488 with SPI interface. UTFT is not an option. Wondering if there is a solution to this? Everything i keep pulling up for the '9488 is parallel interface. Thanks in advance!
There is nothing special about using SPI instead of parallel.
Even UTFT copes with different interfaces. Of course you would use the proper hardware SPI instead of bit banging like UTFT.
Which module are you actually using. Most do not give you access to the IMn pins that select the hardware interface.
David.
Hello,
It is a Waveshare Spotpear 3.5" for the Raspberry Pi. The pinout of the 2x13 female header includes SCK, MOSI, RS, RST and CS. I've done some snooping with a bit-scope sketch I run on a DUE. Basically, those five line I bring over from the RPi to the DUE, and the sketch scans those pins for any change. When so much as 1 pin changes, it logs it. I then do some post-processing on the resulting 5-bit numbers. I've poked around in Adafruit_TFTLCD library and see that they treat ILI9341 and ILI9488 the same at least for initialization. I can tell it's 8-bit SPI (not some oddball 9-bit as would be the case if RS was missing) and it appears to be MSB first.
I 'spose I could modify Adafruit's library to do hardware SPI rather than 8-bit parallel. Was hoping that it was already done
As I said, SPI is no different to parallel.
I Googled "Waveshare Spotpear 3.5" and looked at the schematic. It seems very odd. I know nothing about a RaspPi.
I will assume that the TFT and the Touch use the SPI bus with P_CE1 and P_CE0 being the /CS for each device.
It is simple enough to read the ID of the TFT controller. Reading 4 bytes from register #0x00 gives 0x89898989 for an SSD1289 and reading register 0xD3 gives 0x00009341 or 0x00009488.
Since Waveshare says the display is 320x480, it could never use SSD1289 or ILI9341.
Looking at the schematic, the display control signals are NOT 5V compatible.
Life is a lot simpler if you buy a regular display with a Due Shield Adapter.
Oh, if it turns out to be a 9488, Marek's ILI9341_due library should work nicely with adaption.
The 9488 needs slightly different initialisation and screen size but the operation is identical to a 9341.
David.
Yes as I bit-scoped the SPI lines, I could see the CS toggle, as the RaspPi was switching its attention between the touch and the LCD. I was only interested in getting the LCD to work on something other than the RPi. It's a well-built and rugged display. Waveshare wrote me back to confirm it's a 9488 they're using. I agree on the voltage. One reason I knew I had to use the DUE to act as bit-scope. The other reason for the DUE is of course its speed. I slowed down the SPI speed on the RPi so that the DUE would not miss a line's state change. Ya know the idea of a shield is nice, but as a mechanical engineer (what my degree is in) I bristle when I see one board cantilevered off of a header, and then yet another board cantilevered off of it. I'm wondering would it have made it so much more expensive to have a non-conductive standoff so that the far end is supported? Especially for ones where touchscreen is possible. Now the displays that plug onto the Arduino are nice, using the various headers as mechanical support, at the expense of losing access to those headers.
When you say the operation between 9341 and 9488 is identical, I assume you mean that drawing a pixel on the screen uses the same command/data? I see in Adafruit's TFTLCD library a section of code that initializes the 9341 and 9488 in the same function. I believe it does some inline calculations with respect to display size, with that being the only apparent differences. So, I would take the differences there and move them to Marek's DUE-optimized library.
Thanks for your help
The initialisation is a little different.
I suggest that you just try Marek's library as-is. Make sure to connect the same pins. You will probably get something visible.
I have not looked closely at Marek's code. I suspect that you just need to change the WIDTH and HEIGHT. And obviously the specific NL field in the ILI9488 registers.
Compare the 9341 and 9488 entries in my library.
You will be impressed by the performance of the ILI9341_due library.
You might find that Adafruit_ILI9341 library also works out of the box on the Due.
With any library, make sure that you specify the RESET pin in the constructor().
Daviid.