stm32f429 tft lcd ili9341 manufacturer
STM32F429 has also LTDC driver for LCD like that, but this driver we will use later. For now we will use SPI for driving in serial mode and some other pins for controlling.
Remember: This library can also be used, if you are not using STM32F429 Discovery. It can be used in previous STM32F4 Discovery board. All pins can be changed in defines.h file which is included in project.
It’s been a while when I first got ILI9341 lcd working on discovery, but without LTDC driver. Yesterday I decided to make a new library. With LTDC, you can actually display movies, because it uses parallel communication and support 2 layers simultaneously what gives you a high refresh rate.
I"m using this library but the problem is that I get only two colors at my LCD screen. Black and Purple. That"s because this library is made for 8-bit databus.
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()
It has 40 pins interface and SD card and Flash reader design. It is a powerful and mutilfunctional module for your project. The Screen include a controller ILI9341, it"s a support 8/16 bit data interface , easy to drive by many MCU like arduino families? STM32, AVR and 8051. It is designed with a touch controller in it . The touch IC is XPT2046 , and touch interface is included in the 40 pins breakout. It is the version of product only with touch screen and touch controller.
262K color320*2403.2 inchWide viewing angleILI9341 : 320 TFT Driver X 240 RGBIntegrated Power, Gate and Source Driver With RAMXPT2046-WIRE TOUCH,WIRE TOUCH, UP TO 125kHz CONVERSION RATE, SERIAL INTERFACEVoltage type : 5v or 3v voltage input voltage?input is selectable. Because TFT can only work under 3.3 V voltage, so when the input voltage VIN is 5V, need through the 3.3 V voltage regulator IC step down to 3.3V , when the input voltage of 3.3 V, you need to use the zero resistance make J2 short , is equivalent to not through the voltage regulator IC for module and power supply directly.Note: the factory TFT module, are the 5 v power supply. By default.Carrying on board SD holder, its work to SPI mode.By the use of Stylus we can write anything on Display.
I have tried to compile the example file GxTFT_FSMC_BlackSTM32F407V.ino. The necessary assisting files should be in place including STM32GENERIC in the hardware folder. After having worked for quite some time Arduino IDE stops with an error message. I list the last page of the verbose output:
"C:\Users\Peas\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DF_CPU=168000000L -mthumb -DSTM32GENERIC -DRAM_LENGTH=131072 -DFLASH_LENGTH=524288 -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD -DSTM32F4 -DARDUINO=10807 -DARDUINO_BLACK_F407VE -DARDUINO_ARCH_STM32 -DSTM32F407VE -DHSE_VALUE=8000000 -DMENU_SERIAL_AUTO=SerialUSB "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\cores\arduino/stm32" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\cores\arduino/usb" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/CMSIS" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/CMSIS_Inc" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/CMSIS_Src" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/HAL_Inc" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/HAL_Src" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\system/STM32F4/stm32_chip" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\cores\arduino" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\variants\BLACK_F407VE" "-IC:\Users\Peas\Documents\Arduino\libraries\GxTFT\src" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\libraries\SPI\src" "-IC:\Users\Peas\Documents\Arduino\libraries\Adafruit_GFX_Library" "-IC:\Users\Peas\Documents\Arduino\hardware\STM32GENERIC-master\STM32\libraries\stm32_dma\src" "C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp" -o "C:\Users\Peas\AppData\Local\Temp\arduino_build_724464\libraries\GxTFT\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp.o"
C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp: In constructor "GxIO_STM32F407ZGM4_FSMC::GxIO_STM32F407ZGM4_FSMC(bool)":
C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp:97:11: error: "PG12" was not declared in this scope
C:\Users\Peas\Documents\Arduino\libraries\GxTFT\src\GxIO\STM32GENERIC\GxIO_STM32F407ZGM4_FSMC\GxIO_STM32F407ZGM4_FSMC.cpp:98:11: error: "PG0" was not declared in this scope
It’s time to write about a more complex but interesting connection with the STM32F4-Discovery board. Since I started developing with electronics, I’ve found a lot of applications in which an LCD is needed or can be an added value, specially if it includes a Touchscreen.
Last week I received a 3.2″ TFT LCD with Touchscreen from waveshare, model HY32D. It is based on SSD1289 display controller and also includes a touchscreen interface based on XPT2046 which communicates over SPI link. With a QVGAresolution (320×240 pixels) is enough for many applications and, more important, it is very affordable.
Well, fortunately Waveshare(LCD module supplier) includes some code to drive different kinds of displays and touchscreens. On Waveshare module’s page there is also a very helpful table that indicates the pinout (also the module itself has named pins on bottom side) that helps wiring to the board. Basically I have connected in this way:
Ahh yeah look at that! If you look closely, top right of the LCD, that’s obviously a flex connector for a resistive touch overlay (4 contacts running to the 4 sides of the LCD overlay).
A fair number of inexpensive baseboards/motherboards/accessories have also appeared for earlier versions. I hope Olimex puts out a couple nice STM32F429/427 boards.
I can see there is only a STLINK usb connector on board, so there is even no FS to expect. beside HS, I suppose does mean High Speed (480mbps). but HS anyway needs a separate physical layer USB chip for addition to STM32F4 chip and most likely this is chip is not present on this board anyway, because this is STM32F4+LCD+SDRAM demoboard and there is no need for USB at all.
I think Farnell’s 21€ will be accurate, as ST’s suggested USD price is $24. The placeholders for the STM32F429I-DISCO on element14 (a division of Farnell) and mouser show $42, which I think predates the later ST announcement. I think the ST announced $24 will hold, and the distributor prices will match that, as they have in the past.
I wouldn’t expect TI to hack profits from their calculator range, and HP have always been expensive, but ST could easily change their format to calculator-friendly. Clamshell design, LCD & battery in top half, CPU & keypad in bottom half, expansion pins to left / right of keypad makes a self contained unit.
HP Palm – Love the idea, hate the baguette (french bread loaf) layout. If I could get custom key covers, and surface-mount key switches, I’d be designing my own low-profile keypad to go with an LCD module. Top side keypad, bottom side CPU / RAM / USB / LCD driver / power regulation / expansion port.
Great find, thanks! Man, could they have buried the details on that guy any farther down into the document? I can’t help but feel like a quick pointer in the LCD section to “oh by the way there’s a touch screen, here’s how to talk to it” would have been a good idea.
It’s certainly useable in any other project where you have an onboard LCD controller. Especially any other project that happens to use a STM32F4. What difference would it have made if it had an external controller? Surely it’d have been on the same PCB. Were you hoping for a removeable SPI-interfaced module?
Look in the UM1670 user manual, paragraph 4.8: the tft includes an ILI9341 controller. The ILI9341 has it’s own graphics ram inside, it is not mapped into the STM32 address space. It is connected to the STM32 via a parallel bus. The ILI9341 and similar controllers are common on cheap chinese tfts. So it is no problem to source similar tfts for your final product after developing on the discovery board.
UM1670 in paragraph 4.8 also says that “The TFT LCD is a 2.41″ display of 262 K colors. Its definition is QVGA (240 x 320 dots) and is directly driven by the STM32F429ZIT6 using the RGB protocol”. ILI9341 has multiple modes of operation including direct RGB/HSYNC/VSYNC mode which bypasses internal GRAM. I don’t have the board yet but I assume display buffer is located in external SDRAM which is also on the board. The whole point of this kit is to show TFT and SDRAM interface in new STM32F4x9.
I’ve checked this discovery board firmware available from ST’s site (“STM32F429 discovery firmware package UM1662” number: STSW-STM32138, btw. finding it is a bit difficult – ST’s site is terrible):
Check again martin. Those lines have pullups to vdd and are connected to cpu pins. I have this board for some time and I can confirm that lcd is driven by lcd controller from cpu and frame buffer is in external dram which is also on the board.
WF28E is full color 240xRGBx320 TFT LCD display module, diagonal size 2.8 inch. This module is built in with ILI9341V IC; it supports 8/ 16bit 8080-series Parallel MCU Interface. WF28E model is having module dimension of 50.0 x 69.2 mm and Active area size of 43.2 x 57.6 mm; it integrated ILI9341V controller on module, logic supply voltage range from 2.5V to 3.3V.
WF28E is portrait mode LCD module, if you would like to use it as landscape mode, please contact with us for more technical support. This 2.8” TFT LCD module is featured with brightness 500 cd/m2(typical value), it can be operating at temperatures from -20℃ to +70℃; its storage temperatures range from -30℃ to +80℃. This 2.8" TFT LCD Module 6:00 o"clock viewing direction works well for devices that is easy to read above eye level without fading, such as signal analyzers or bench top laboratory equipment, handhold microscope and other handhold devices.
Search keyword: ili9341 tft display, tft 2.8", 2.8 tft lcd, 2.8" tft lcd, 2.8 inch tft lcd, tft lcd 2.8, 2.8 tft display, 2.8" tft display, 2.8 inch tft display, tft display 2.8, tft display 2.8"
GPIO configuration is done similiar way as in example for SDRAM. But unfortuneatly TFT controller pins are shared in two alternate functions group (9 and 14), so there is third table with AF initialization values.
At this moment easiest way to display antything on LCD is use random content that SDRAM holds after power-up. Go to sdram.c file and comment following lines: