stm32 arduino tft lcd brands
Brief Tutorial: Use the STM32 development board and STONE LCD screen to develop beauty devices with touch screens Figure 1 Because I have a lot of contacts with ST, MCU like thi...
Beijing STONE Technology co., ltd was established in 2010 and devoted itself to manufacturing and developing high-quality intelligent TFT LCD display modules.
Our core TFT LCD display modules integrate a CPU, flash memory, and touch screen in the hardware unit. Paired with an easy-to-use free GUI design software and complete instruction set, customers can avoid time-consuming accessories selection and system integration tasks. These units greatly reduce the workload in HMI development and make the entire process faster and easier.
The modules come with a UART TFT serial interface that can be controlled by any MCU through the simple but powerful instruction set like the 8051 series, AVR series, MSP430 Series, STM32 series, MC9S12, and Arduino series, among others.
Each TFT display LCD module has a wide range of applications, such as automated system control, vending machine functionality, intelligent lockers, electricity equipment (oiling machine, EV charger), elevators, smart home and office, precision instruments, and much more.
To date, we have delivered custom display solutions to over 3000 customers around the world. Our TFT LCD modules have been widely praised for their quality and performance and that is in large part thanks to our partners, including NI, Siemens, ThyssenKrupp, and many others. These long-term cooperative relationships have been mutually beneficial and we hope to continue a long history of success.
Makerfocus shop provides many kinds of top brands about open source hardwares . Such as Raspberry Pi, Arduino, Nvidia, M5Stack, Orange Pi, ESP8266, ESP32, and other related electronic goodies from all around the globe!
The LCD I am using is a 2.8″ TFT LCD with SPI communication. I also have another 16-bit Parallel TFT LCD but it will be another story for another time. For this post, let’s focus on how to display what you want on the 2.8″ LCD. You can find all details about this LCD from this page:http://www.lcdwiki.com/2.8inch_SPI_Module_ILI9341_SKU:MSP2807
First thing first, this LCD use SPI as the main communication protocol with your MCU. For STM32 users, HAL Library has already implemented this protocol which makes this project easier for us. But, a little knowledge about this protocol does not hurt anyone. SPI is short for Serial Peripheral Interface which, aside from two data lines, also has a clock line and select lines to choose between devices you want to communicate with.
This LCD uses ILI9341 as a single-chip SOC driver for a display with a resolution of 240×320. More details can be found in the official document of ILI9341. But the most important thing is that we have to establish astart sequencein order for this LCD to work. The “start sequence” includes many other sequences which are also defined in the datasheet. Each sequence starts when you send a command to ILI9341 and then some parameters to follow up. This sequence is applied for all communication between MCU and ILI9341.
For this project, I recommend using theSystem Workbench for STM32for coding and building the code. After installing and open the program, go to the source code you have just downloaded and double click the.cprojectfile. It will automatically be open in your IDE. Then build the program by right click on the folder you just open (TFTLCD) and chooseBuild Project. Wait for it to finish and upload it to the board by right clicking the folder, choose Run As and then clickAc6 STM32C/C++ Application. And that’s it for running the example.
The most important library for this project is obviously the ILI9341_Driver. This driver is built from the provided source code in the lcdwiki.com page. I only choose the part that we need to use the most in many applications like writing string, displaying image and drawing symbols. Another library from the wiki page is the TOUCH library. Most of the libraries I got from the Internet were not working properly due to some adjustments to the original one.
To draw symbols or even display images, we need a “byte array” of that image or symbol. As an illustration, to display an image from a game called Transistor, I have a “byte array” of that image stored in a file named transistor.h. You can find this file in the link below. Then, I draw each pixel from the image to the LCD by adding the code in the Display_Picture() function in the Display folder.void Display_Picture()