My application needs a larger display with higher resolution than the OpenMV 1.8" 128x160 LCD Shield (ST7735R driver). I’ve connected a 2.8" 320x240 TFT display (ILI9341 driver) to SPI2 using the simple SPI write of the image frame buffer by OutOfTheBots GitHub - OutOfTheBots/OpenMV_TFT.
LCD Display Test V1.py (917 Bytes)
OpenMV_TFT.py (3.3 KB)
Writing to the 320x240 TFT display is fast at 28 fps, but the image color is distored. It looked like the byte order was incorrect. When I swapped the byte order for each pixel in the frame buffer with the following code snippet the image on the TFT display is perfect, but the frame rate falls to 2 fps.
img_byte = img.bytearray()
for i in range (0, 153599, 2):
tmp = img_byte[i]
img_byte[i] = img_byte[i+1]
img_byte[i+1] = tmp
I cannot find a setting on the ILI9431 for changing the byte order.
Is there a way to change the RGB565 byte order in the image frame buffer, or quickly swap the byte order in the frame buffer, or swap the byte order during the SPI.write.
Would be great to be able to use the OpenMV with these larger higher resolution displays.
Thanks in advance for help on this.