ST7735 1.8" TFT Display and STM32 || HAL

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone welcome to controllers tech today in this video we will see how to interface st 7735 tft display with sdm32 i am using a 1.8 inches tft display and i will use spi to interface it the libraries used in this project can be downloaded from the link in the description let's start by creating a project in cube id i am using nucleo f446 re for this project here is our cube mx first of all i am going to set up the clock as the sp i will need it to set the board rate i have 8 megahertz crystal and i want the system to run at maximum possible clock i am using spi 1 and half duplex mode will be enough since we will only be sending data to the tft as you can see the clock and the mossy pins got selected i am selecting the prescaler of 32 here so the baud rate is around 2.8 megabits per second i am keeping this board rate intentional for now i will show you what happens when we increase the baud rate this here is the pin out of my mcu pin pa5 is the sbi clock pin pa7 is the mossy pin and i am going to use pb6 pc7 and pa9 also let's take a look at the connection here you can see other than the clock and the mossy pins the cs reset and the dc pins are also connected so i am going to select the pb6 pin for the chip select c7 for the reset and the a9 for the data or command pin that's all for the setup click save to generate the project here is our main file let's include the libraries first copy the c files in the source directory and header files in the include directory let's take a look at the st 7735 header file first change the sbi handler here if you are using any other define the pins that you are using for cs reset and dc now define the type of the display that you are using and also define the new width and the new height that's all the changes you need to make here are some functions available specific for the st7735 and gfx functions have all the common functions that are used in the tft i have included a test all function which will perform some tests by drawing different shapes on the display let's go back to our main file now include the sd 7735.h and the gfx functions.h files initialize the display first this function takes the rotation as the parameter i will keep the default orientation at first so rotation will be zero now fill the screen with black color we have more colors available as you can see the color list is right here and now i am going to call the test all function to perform the tests let's build this now we don't have any errors let's flash it you can see all the tests being performed on the display now i talked about the sbi board rate in the beginning let's try changing it i am going to increase it to 11 megabits per second let's build and flash the new code you can see the display processing is faster now so choose the board rate according to your requirement now let's print some strings on this display [Music] i am setting the rotation to zero and i am going to print hello there are some more fonts available in the fonts.c file [Music] this here is the color of the text and then the background color then i am rotating the display and printing world rotate again and print from and again let's build and flash it [Music] you can see the display rotation and text printing both are working all right this is it for this video i hope the process was clear this code is a port from the arduino library so please don't ask for sd card support in it you can download the code from the link in the description keep watching be safe and have a nice day ahead
Info
Channel: ControllersTech
Views: 38,825
Rating: undefined out of 5
Keywords: stm32, stm32f4, f103, discovery, nucleo, st7735, spi, tft, display, example, 7735, inetrafce, tutorial
Id: 93xUUvEUbQI
Channel Id: undefined
Length: 8min 37sec (517 seconds)
Published: Sun Nov 08 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.