Connecting and Configuring the ST7789 LCD SPI Display to the ESP32

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I wanted to make a quick video about getting these particular displays working on the ESP 32 this is a - IPS 130 V - got this on bang good this is a st 77 89 display and you will see here this one is a 240 by 240 resolution immediately we come to the crux of this problem and it doesn't matter what resolution these are is the fact that we can see it's written clearly that the interface is SPI that's written on the back and it is SPI to be sure however when we look at the pin outs on the front we could see that the pin outs are in fact I squared C so it really doesn't make any sense trying to wire this thing up for comparison here's a display with an I squared C interface it's correctly labeled so we're gonna go through and see how to pin this out correctly ignoring what's written on the front of it let's get started the one I got from banggood came with a header I generally point out you should have stuff in a breadboard powered off before you make these connections ground is one of the pins correctly labeled so we'll add that one now the VCC connection will go to the three volt pin no external power is necessary if you're just driving this board and nothing else the pin which is labeled as SC L will go to D 18 on the ESP 32 and the pin labeled as SDA will go to D 23 this is followed by re s which will go to d 4 and then DC which will go to d 2 final pin blank is optional if you want the screen to turn off you can tie blank to ground with this completed let's take a look at the board everything is set up exactly as instructed we can now apply power to the unit now I'm applying power to a defaulted ESP 32 we could see as it turns on also the backlit screen turns on and to demonstrate the blanking the blk signal taking that black wire and I'm touching ground so the next order of business will be to go to tools under the arduino ide to manage libraries when that opens under filter search we're going to type in the name of the library we're going to use and the one that we're going to be using is called TFT underscore ESP i and we're gonna select that one mine's already installed obviously one dot 4.20 at the time of this video click install and then close once it finishes installing we'll be ready to continue onward now we're gonna have to edit the user setup file to accommodate the device we're using and regardless of the operating system you're using you go to the arduino directory and in the arduino directory there's a subdirectory called libraries not library directories there's going to be that TFTP ESPI directory for the library that was just installed and within that directory you will see a file called user setups dot H that'll be opened with you a text editor of choice and definitely read the comments I'm just setting up a single instance one device on an ESP 32 there are more complicated settings read the comments and learn how you could do more complicated tasks let's get underway in this section we're told to define only one driver I choose the st 77 89 underscore driver there's an underscore - I didn't try it it's a minimal configuration this is one I went with works just fine if you have an ESP 32 and a 77 89 supports this feature as well so I've enabled this one also this next one talks about the correct color order only one of them works correctly I tried the top one first and it didn't work correctly I've left it on the top one so I could show you later how I made that determination but if you're using this module like I have you should be selecting the second one next is width and height orientation I have a 240 by 240 so for width I chose obviously 240 for that setting as shown here and for height I did the same thing I also selected 244 240 by 240 next part was for the ST 7735 so I skipped over it and went right to section 2 scrolling past the initial commentary the first thing we see is a note MCU we're not using that so we'll just move past that next is 82 66 not using that either also move past that as well finally make our way to SP 32 and we could see all the pins that were set up physically on the board or before and those are the ones that are drawn out here on these particular numbers and all these are defined reset it also has the option of being tied to the board reset instead of a pin on the ESP 32 I elected not to do that you do what you want obviously but this is how we're setting it up now according to this the backlight pin could also be set to a particular I oh I didn't do that either you just like I said tied to ground as I showed in the example to shut off the screen at this point I made in my way all the way down to section 3 which is fonts I made no changes here I left all the fonts as they were defined for section 4 in setting up the SPI frequencies I used default values that are shown here I made no modifications and I had no need to uncomment this use HSP I port so I left this one alone and this concluded the configuration it wasn't too bad so I saved it and I closed it now we can move on to the initial testing of the library the first program we're going to run is from the diagnostic section runs the library reads using a fig so we're going to scroll down to TFT ESPI tests and diagnostics and click read user setup it's a small program not very complicated and scroll through right quick show the extent of it I'm going to push it right to this device and upload it like I said there's not much that it doesn't take very long and once it's finished we're going to open up the terminal and reset the device so we could see what the output is and we can see that it shows all of the configurations that we did plus some extra information library version the process for the frequency transactions flag what type of interface the driver the resolution the pins that were using for this particular device is also shown as well as the font information and then we have some of the extra parameters below so now we'll move on to the next important configuration test make sure everything's working correctly from file again we're going to go to examples and then back down to TFT underscore ESP I test the Diagnostics and select the color test we call test opens again another short program and we're going to execute this program we're going to push it to the device when this program is loaded there'll be no visual indication on the computer we're going to look to device to see what the output is as we look at the display we could see that the indications for red and blue or labeled backwards so are the corresponding inversions we could see the Aqua and the yellow or backwards so we're gonna have to go in back into the config file and change that commented section let's do that now so we're back at the config file where that area is defined for RGB or BGR I did that before I purposely set it wrong and now I'm setting the second one to correct that issue I then saved the config file and we pushed that test program to the device we could see that the red and the blue are now in the correct order Green never had a change also the inversions are now correct for both of them as well you will have a notice that the inversion flag is backwards when it says inversion off it's on and when it's on it's off this wasn't overlooked and I'll tell you that in the config there's an option for this and as I've tried to set it I haven't seen any change this is where it's located and says to try each of these and it should be some sort of effect as a result of trying them but I haven't seen any effect on each one so I'm just gonna say that maybe a bug and you're just gonna have to set true for false or false for true when you're doing any program within versions last one I'd like to do is the free fonts demo make sure the fonts are in working order also lets you know what the fonts look like I use the resolution for the demos 320 by 240 there's no 240 by 240 demo in this selection that's fine if I select all free fonts demo and when it loads up we could see the fonts were all just gonna cycle through on the screen give you an idea what they look like and this goes on for a long while I'm not going to display everyone we'll just move to the next thing now and if you spend some time to look down the example section you'll find all sorts of examples and code that you can use and see the capabilities of these devices we look in tests and diagnostics before but there are also others especially you'll find in the generic section as well as the resolution for the device you have again there is no 240 by 240 section I used the 320 by 240 up above here and there's a whole bunch of them in this one that will display the capabilities of this device this one I like this one is called starfield we'll load this one quick that's pretty cool simple demo move on to a last one we'll end it here and this one's called meters I could see that this one be pretty useful implemented in the design let's take a look I think that's pretty cool you can see using the a sine wave in the input in the demo when you look at the bottom meters you can see that I think this pretty much wraps it up going through the demo there and this is how to implement the SPI interface 77 89 driven zjy IPS 130 v 2.0 display to the ESP 32 with the messed up pin out as it's written the board I hope you found this useful helpful entertaining give you some insight how to configure it with this library hit that thumbs up button and the subscribe helps me out a lot when you do thanks for watching thanks for watching would you like to reply
Info
Channel: Retro Tech & Electronics
Views: 59,804
Rating: undefined out of 5
Keywords: esp32, arduino, electronics, esp8266, wifi, esp32 tutorial, tutorial, iot, esp32 arduino, beginners, simple, esp32 review, esp32 arduino ide, bluetooth, ble, easy, how to, ide, beginner, c++, diy, git, web, server, app, hobby, espressif, programming, touch, esp8266 datasheet, eevblog, esp32 datasheet, lorawan, pwm, esp32 servo, esp-32, arduino (brand), esp32 pwm, esp-32 tutorial, esp32 board, spi, ips130, zjy-ips130, st7789, lcd display, i2c, bangood, ips, pinout, tft_espi, connect, library
Id: HoZhgNcJjNA
Channel Id: undefined
Length: 11min 9sec (669 seconds)
Published: Sun Feb 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.