spi tft lcd display module 240x320 ili9341 made in china

(The following is the touch screen signal line wiring, if you do not need to touch function or the module itself does not have touch function, you can not connect them)

As a 2.4inch TFT display module with a resolution of 240 * 320, it uses the SPI interface for communication. LCD has an internal controller with basic functions, which can be used to draw points, lines, circles, and rectangles, and can display English, Chinese as well as pictures.
The 2.4inch LCD uses the PH2.0 8PIN interface, which can be connected to the Raspberry Pi according to the above table: (Please connect according to the pin definition table. The color of the wiring in the picture is for reference only, and the actual color shall prevail.)
The LCD supports 12-bit, 16-bit, and 18-bit input color formats per pixel, namely RGB444, RGB565, and RGB666 three color formats, this demo uses RGB565 color format, which is also a commonly used RGB format.
For most LCD controllers, the communication mode of the controller can be configured, usually with an 8080 parallel interface, three-wire SPI, four-wire SPI, and other communication methods. This LCD uses a four-wire SPI communication interface, which can greatly save the GPIO port, and the communication speed will be faster.
Note: Different from the traditional SPI protocol, the data line from the slave to the master is hidden since the device only has a display requirement.
Framebuffer uses a video output device to drive a video display device from a memory buffer containing complete frame data. Simply put, a memory area is used to store the display content, and the display content can be changed by changing the data in the memory.
There is an open source project on github: fbcp-ili9341. Compared with other fbcp projects, this project uses partial refresh and DMA to achieve a speed of up to 60fps
If you need to draw pictures, or display Chinese and English characters, we provide some basic functions here about some graphics processing in the directory RaspberryPi\c\lib\GUI\GUI_Paint.c(.h).
Set points of the display position and color in the buffer: here is the core GUI function, processing points display position and color in the buffer.
The fill color of a certain window in the image buffer: the image buffer part of the window filled with a certain color, usually used to fresh the screen into blank, often used for time display, fresh the last second of the screen.
Display time: in the image buffer,use (Xstart Ystart) as the left vertex, display time,you can choose Ascii visual character font, font foreground color, font background color.;
2. The module_init() function is automatically called in the INIT () initializer on the LCD, but the module_exit() function needs to be called by itself
Python has an image library PIL official library link, it do not need to write code from the logical layer like C, can directly call to the image library for image processing. The following will take 1.54inch LCD as an example, we provide a brief description for the demo.
Note: Each character library contains different characters; If some characters cannot be displayed, it is recommended that you can refer to the encoding set ro used.

Maclight have whole series 2.4 inch tft lcd module, our standard 2.4 inch tft lcd have the resolution with 240x320 pixels, with MCU/SPI/RGB interface, we could also custom made 2.4 inch tft lcd with SPI interface and RGB interface based on customer"s application. our 2.4 inch tft lcd have wide viewing angle, and TN TFT LCD tft type viewing angle. our 2.4" tft touch screen could custom make capacitive touch screen( CTP / PCAP), to the 2.4" PCAP, frame bonding and optical bonding to the CTP is welcome to us. to the 2.4 inch capacitive touch, we could custom make the CTP cover glass with 3mm cover glass and anti-finger print, anti-glare surface treatment. Maclight 2.4 inch tft lcd display is also including 2.4" sunlight readable tft lcd display with 500 nits high brightness tft lcd, that is suitable for outdoor application.

Specifications:Resolution: 240x320Driver IC: ILI9341Input Voltage: 5V/3.3VSize 2.2 inch, It has PCB backplane with power IC, SD card socketLED Numbers 4 LEDs, Driver IC: ILI9341, Color Depth 262K/65KModule Size:67mm(length)*40mm(width)*4mm(thickness), Active Area: 47.5mm(Length)x36.5mm(Width)How to use it?1. use 5v to led pin, 3.3v to vcc and 1k / 1.5k resistor voltage dividers to get it to work. 1k resistor in series from Arduino to tft logic pin, 1.5k from tft pin to ground.2.#define TFT_DC 9#define TFT_CS 10#define TFT_MOSI 11#define TFT_CLK 13#define TFT_RST 12#define TFT_MISO 83.// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC//ILI9341 tft = ILI9341(TFT_CS, TFT_DC);4.// If using the breakout, change pins as desiredILI9341 tft = ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO).Serial monitor output:1-- ILI9341 Test!Display Power Mode: 0x94MADCTL Mode: 0x48Pixel Format:0x5ImageFormat: 0x80Self Diagnostic: 0xC0Benchmark Time (microseconds)2-- Screen fill 18159720Text 921664Lines 8537648Horiz/Vert Lines 1485756Rectangles (outline) 946520Rectangles (filled) 37689232Circles (filled) 5325780Circles (outline) 3725412Triangles (outline) 1944508Triangles (filled) 12525852Rounded rects (outline) 1782700Rounded rects (filled) 40989648

ILI9341 is a 262,144-color single-chip SOC driver for a-TFT liquid crystal display with resolution of 240RGBx320 dots, comprising a 720-channel source driver, a 320-channel gate driver, 172,800 bytes GRAM for graphic display data of 240RGBx320 dots, and power supply circuit. ILI9341 supports parallel 8-/9-/16-/18-bit data bus MCU interface, 6-/16-/18-bit data bus RGB interface and 3-/4-line serial peripheral interface (SPI). The moving picture area can be specified in internal GRAM by window address function. The specified window area can be updated selectively, so that moving picture can be displayed simultaneously independent of still picture area.
You can find ILI9341-based TFT displays in various sizes on eBay and Aliexpress. The one I chose for this tutorial is 2.2″ length along the diagonal, 240×320 pixels resolution, supports SPI interface, and can be purchased for less than $10.
Note that we will be using the hardware SPI module of the ESP8266 to drive the TFT LCD. The SPI communication pins are multiplexed with I/O pins D5 (SCK), D6 (MISO), and D7 (MOSI). The chip select (CS) and Data/Command (DC) signal lines are configurable through software.
For ILI9341-based TFT displays, there are some options for choosing the library for your application. The most common one is using Bodmer. We will use this library in this tutorial. So go ahead and download the
The library is based on the Adafruit GFX and Adafruit ILI9341 libraries and the aim is to retain compatibility. Significant additions have been made to the library to boost the speed for ESP8266 processors (it is typically 3 to 10 times faster) and to add new features. The new graphics functions include different size proportional fonts and formatting features. There are a significant number of example sketches to demonstrate the different features.
Configuration of the library font selections, pins used to interface with the TFT and other features is made by editting the User_Setup.h file in the library folder. Fonts and features can easily be disabled by commenting out lines.
Now you are all set to try out tons of really cool built-in examples that come with the library. The following output corresponds to the TFT_Pie_Chart example.
My favorite example is TFT terminal, which implements a simple “Arduino IDE Serial Monitor” like serial receive terminal for monitoring debugging messages from another Arduino or ESP8266 board.
Ms.Josey
Ms.Josey