ILI9340/ILI9341 TFT Display

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ILI9340/ILI9341 TFT Display

Post by OutoftheBOTS_ » Tue Dec 05, 2017 11:35 am

I have tidy up my ili9341 image loader and uploaded to github to share. see https://github.com/OutOfTheBots/ili9341-tft/tree/master

I welcome feedback and bugs reports for the purpose of improvement :)

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ILI9340/ILI9341 TFT Display

Post by OutoftheBOTS_ » Tue Dec 05, 2017 11:50 am

I also got my scalable text working much better today. Loads much faster with using less resources :)
see https://youtu.be/5fmE3UUa7vQ

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ILI9340/ILI9341 TFT Display

Post by OutoftheBOTS_ » Wed Dec 06, 2017 8:14 am

After finally getting my computer working again I did a bit more work on the scale-able text putter.

I now have a full character set of 94 symbols from ASCII table 32 to 126 see the demo https://youtu.be/FBLlRWRZsyc

Today when I made by own font on my windows PC to save on the ESP board I saved it to the file name "font.dat" and placed it in a low directory on my PC where I send my files to the the ESP board. This file name "font.dat" causes any windows program including file explorer to crash when entering the directory tree that the "font.dat" was in. I couldn't even delete it. I took me all day to work it out thinking my hard drive had crashed. Lesson learnt never ever name a file "font.dat" on a windows computer :9

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ILI9340/ILI9341 TFT Display

Post by OutoftheBOTS_ » Wed Dec 06, 2017 10:25 am

I have added the basic scale-able text putter to a branch of the github. Same as the image putter it is juts at beginning stage and still has lots of development still to do.

scale-able text putter here https://github.com/OutOfTheBots/ili9341 ... /README.md

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ILI9340/ILI9341 TFT Display

Post by OutoftheBOTS_ » Wed Dec 06, 2017 2:32 pm

I have added the scale-able text placer and remover to the master branch. You can choose the foreground and background colour of the text as well as the scale size. There is also a text remover so when you place text ontop of a back ground image you can remove the text and restore the backgound image that was behind the text.

see the demo at https://youtu.be/xjEsYF2QsIg
full driver code and demo code at https://github.com/OutOfTheBots/ili9341-tft

User avatar
on4aa
Posts: 70
Joined: Sat Nov 11, 2017 8:41 pm
Location: Europe
Contact:

Re: ILI9340/ILI9341 TFT Display

Post by on4aa » Wed Dec 27, 2017 11:53 pm

I found the following MicroPython screenshots on the M5Stack Twitter feed.

The December 24, 2017 screenshot shows how a module called m5 is imported, providing an object called lcd.
Image

It seems that the M5Stack developers are preparing a lot of MicroPython goodies!
Image
Serge

jeffm
Posts: 23
Joined: Tue Mar 10, 2015 9:11 am

Re: ILI9340/ILI9341 TFT Display

Post by jeffm » Sat Jan 06, 2018 1:29 pm

I failed to get @tuupola’s version of this driver to work with HW SPI on the standard esp32 port. After a little investigation I discovered that hw spi crashes due to the driver generating a zero length data block spi write - this is not a problem for the sw version.

I have put a version on github that avoids this problem and in addition handles multiple fonts as generated by @pythoncoder’s font-to-py script. To speed up font display, the driver writes multiple characters in one spi transfer up to a maximum CHUNK size. It is still very slow compared to @loboris’s work and the M5Stack micropython driver, however, it should work on any esp32/ili9341 combination.

The github repository is:
https://github.com/jeffmer/micropython-ili9341
mstack.jpeg
mstack.jpeg (45.47 KiB) Viewed 13536 times

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: ILI9340/ILI9341 TFT Display

Post by mattyt » Sat Jan 13, 2018 9:34 am

Heya @jeffm, just wanted to say thanks for putting that code online! I've tried it on my M5Stack and it worked exactly as advertised. Thanks too to @deshipu for the ILI9341 driver.

I need to look into the HW SPI issue though; without faster xfer rates the display is updated way too slowly to be of real use...

jeffm
Posts: 23
Joined: Tue Mar 10, 2015 9:11 am

Re: ILI9340/ILI9341 TFT Display

Post by jeffm » Sat Jan 13, 2018 12:28 pm

Thanks, in fact my driver does work with HW SPI as it avoids the zero length write. The fill rectangle function is now quite fast. Font handling, despite my optimisations, is slow because a lot of work to display a character is done in MicroPython.

I am now playing with the @loboris port which has a fast driver and permits both telnet and ftp. The M5Stack official firmware, which is based on the loboris version does not have telnet enabled.

Kolja.Py
Posts: 1
Joined: Sat Jan 13, 2018 7:46 pm

Re: ILI9340/ILI9341 TFT Display

Post by Kolja.Py » Sat Jan 13, 2018 7:55 pm

Hi, I have the TFT_320QVT with the SSD1289 driver IC. The data sheet says it is using the 8/16 bit interface. It does NOT come with an SPI though. Is there a MicroPython library for 8/16 bit interface? Or could I use an Arduino board as an interpreter between SPI and 8/16 bit?

Post Reply