Tech Note 045 - ESP32 ILI9341 TFT and how to use Hardware SPI for ultra fast graphics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello folks in this video I'm going to go through how to improve graphic drawing speed by using the hardware SBI bus on the ili nine three four one tier T display so let's begin by running a benchmark both starting exactly the same time on the left hand side the hardware SPI bus implementation on the right software bus implementation and the hardware SPI benchmark is finished already on the left hand side and the software variant will keep on running now for about another thirty seconds so as it runs through all of the benchmarking you can get already get a feel for the difference in speed which I averaged out about twelve times faster there it is the software benchmark is now complete so how do you go about implementing Hardware SPI bus to increase the speed well before we do so if would it be useful just a little yes the expressive pin assignments that have been given to the ESP thirty-two chip and the only one that's implemented by the compiler is the the SPI bus and particularly GPIO 18 for the clock and 23 for master out slave in or serial data I look at the board I'm using the ESP 32 s you can see there those two pins have similarly been allocated by the manifest in the compiler there is an object that needs to be defined for the hardware SPI bus at the top line that's a aided route ili 931 object called TFT and then it starts to define the pins to be a chip select data command and reset master our slave in and clock are predefined already and you can find those definitions in the file that I've highlighted in yellow there and in there if you look inside you'll see the actual definitions they can be varied if you need to for your particular board or you can check them for the software SPI bus implementation the top line you need to remember to add in the additional two pins the master out slave in and the clock origin airily in hardware version predefined for you and again I'll give an example of how you define those pins but you can use any pins you like this is the full environment set up for hardware spi and you'll find that in the example code on github and this is the environment for the software SPI and again I'll copy that version on to the github for you to experiment with in terms of benchmark these are the individual timings or the hardware and software version for each one the most significant improvement is line drawing and but overall about 12 times faster so therefore in conclusion that Hardware SBI implementation is significantly faster I've estimated that to be about 12 times faster the most ESP 32 boards do provide the compiler assigned SPI pins but the for example the lonely ESP 32 board does not so that can only support software SPI in the Arduino IDE compiler that directives can be modified to suit your board so overall it's a worthwhile implementation to to make hardware SPI for the much greater speed of graphics drawing enjoy
Info
Channel: G6EJD - David
Views: 48,726
Rating: undefined out of 5
Keywords: ESP32, TFT, ILI9341, SPI, Hardware
Id: KFjYQMAUDjw
Channel Id: undefined
Length: 4min 24sec (264 seconds)
Published: Fri Jul 07 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.