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_ » Sat Jan 13, 2018 8:43 pm

Not sure how Laboris did it but his TFT driver seems to be the fastest SPI TFT driver I have ever seen on any platfrom.

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

Re: ILI9340/ILI9341 TFT Display

Post by on4aa » Mon Jan 15, 2018 12:10 am

Note to myself:
Here is the GitHub repository of M5Stack's MicroPython firmware.

However, I am extremely uncomfortable with sending my code or WiFi password to some (Asian?) cloud server.
Certain details of my code projects are strictly private.

Is there a way to still use M5Stack's MicroPython firmware/libraries whilst circumventing their cloud?
I prefer to program over a USB cable.
Serge

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

Re: ILI9340/ILI9341 TFT Display

Post by jeffm » Mon Jan 15, 2018 11:53 am

@on4aa. For exactly that reason, I am using a firmware build directly from loboris’s github repository :-
https://github.com/loboris/MicroPython_ ... D/firmware

I am using ftp and telnet which I find easier than the m5cloud IDE which does not give remote access to repl.

BTW: You can use USB and simply disable their wifi/cloud module in boot.py.

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

Re: ILI9340/ILI9341 TFT Display

Post by on4aa » Mon Jan 15, 2018 12:53 pm

jeffm wrote:
Mon Jan 15, 2018 11:53 am
For exactly that reason, I am using a firmware build directly from loboris’s github repository :-

BTW: You can use USB and simply disable their wifi/cloud module in boot.py.
Loboris certainly looks to be the cool kid in town! 8-) I will try this out.

As a matter of fact, I opened a bug report against M5Cloud to see what they have to say about this. Here is their reaction:
Hi, if you just want programs over an USB cable, you can remove import wifisetup and import m5cloud at boot.py file.
Anyhow, I do not consider this to be a smart strategy for a company that wants to position itself as a prototyping platform for other companies. They should at least put clear warnings up there. Millennials might not think twice about their privacy like us old farts. :mrgreen:
Serge

User avatar
tuupola
Posts: 54
Joined: Sun Sep 17, 2017 12:10 am
Contact:

Re: ILI9340/ILI9341 TFT Display

Post by tuupola » Wed Jan 24, 2018 11:48 am

jeffm wrote:
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.
Can you give a pointer how you fixed this problem? I quickly scanned through your version but did not identify the change.

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

Re: ILI9340/ILI9341 TFT Display

Post by jeffm » Wed Jan 24, 2018 10:43 pm

@tuupola. The zero data length write occurs in your driver in the line:

Code: Select all

 self._block(x, y, x + w - 1, y + h - 1, b"")   # in fill_rectangle
My version splits _block into _writeblock and _readblock which avoids the need to interpret None as a read operation and so I use None to mean no data rather than b””.

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 Jan 31, 2018 11:11 pm

@jeffm
jeffm wrote:
Sat Jan 13, 2018 12:28 pm
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.
How did you achieve this feat? My M5 keeps on rebooting with every attempt to employ the esptool.

Edit: It seems to be a known hardware bug.
Serge

User avatar
tuupola
Posts: 54
Joined: Sun Sep 17, 2017 12:10 am
Contact:

Re: ILI9340/ILI9341 TFT Display

Post by tuupola » Thu Feb 01, 2018 2:55 pm

on4aa wrote:
Wed Jan 31, 2018 11:11 pm
How did you achieve this feat? My M5 keeps on rebooting with every attempt to employ the esptool.
Edit: It seems to be a known hardware bug.
I never had any problems with mine. I do flash with relatively low 115200, maybe that is related?

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: ILI9340/ILI9341 TFT Display

Post by rcolistete » Thu Feb 01, 2018 7:50 pm

on4aa wrote:
Wed Jan 31, 2018 11:11 pm
How did you achieve this feat? My M5 keeps on rebooting with every attempt to employ the esptool.
I've had the same problem. Solution : change to other USB port of my notebook, do not use "-b 115200".
Both items aren't needed with ESP8266.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: ILI9340/ILI9341 TFT Display

Post by rcolistete » Fri Feb 02, 2018 10:46 am

on4aa wrote:
Mon Jan 15, 2018 12:10 am
Note to myself:
Here is the GitHub repository of M5Stack's MicroPython firmware.

However, I am extremely uncomfortable with sending my code or WiFi password to some (Asian?) cloud server.
M5Stack have released off-line firmwares :
https://github.com/m5stack/M5Cloud/tree ... s/OFF-LINE

But I prefer to use Loboris MicroPython for ESP32, configured with :
https://github.com/tuupola/micropython-m5stack
Thanks, tuupola !
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

Post Reply