For technical support, many beginners do not know how to adjust the display of Chinese characters, characters and pictures on TFT-LCD, and how to adjust the font size of Chinese characters. Here is a special explanation-next.
First of all, we need to know that whether it is Chinese characters, characters or pictures, it needs dot matrix data to be displayed on the TFT-LCD. The dot matrix data of characters and Chinese characters is a bit of data representing a point, in fact, it is also 0 or 1. The dot matrix data after taking the modulus is 1 pixel, and the color of the pen needs to be displayed, that is to say, light up, and the background color of the pixel is displayed as 0. This color contrast can show Chinese characters or characters. The picture is different. The data of one pixel of the picture is related to your modulus. Because the picture needs to be displayed in color, the data of the picture is directly sent to the color screen for display. For Chinese characters or characters, the background color or the color of the pen is displayed by judging whether each bit is O or 1.
To display a picture or character on the LCD, a display area is needed. First, we must first determine its display starting point, and then whether the next data is sent along the X axis or the Y axis, that is, the X axis or the Y axis. The order of address growth and its direction. The picture below shows the display in one display area. It is the display starting point of eight different situations and the growth of the X-axis and Y-axis addresses and their directions. When we want to display the corresponding characters or pictures, we only need to ensure that the display starting point of the LCD screen and the growth order and direction of the X-axis and Y-axis, and the dot matrix data that we modulo the characters or Chinese characters. Keep the order-consistent, and then we can show the effect we want normally.

There are two methods for general LCD display to choose from:
The first type is to set the address every time the data of a pixel is sent to control the position of the next pixel. For example, the program in the figure below

In this program, we can see that we are sending data through two for loops, one is the control row and the other is the control column. Horizontal screen display or vertical screen display depends on your for loop control. Whether to send the X-axis data or the Y-axis data first, this also depends on the algorithm of the programmer. But the downside of this method is that the address must be set again every time a pixel of data is sent, which obviously causes the screen refresh speed to be very slow. But the advantage is that this algorithm is suitable for any kind of screen.
The second type: Use the address auto-increment function of the LCD driver chip to display characters or pictures (generally LCD driver chips will have this function). To use this function, first we need to set a display window so that it can only be displayed in a certain area of the LCD screen. For example, if you want to display a 16*16 Chinese character, then you have to set the display area to 16* Then set the display start point, which is the position of the cursor, and then send the LCD data write command. Then you only need to send the pixel data, without setting the address again, and then send the data, It will be displayed one by one in the display area you set. For example, the following program.
、
To use the second display method, you must first set the display start point of the display area and the direction of address increment of the LCD driver chip. Next, I will use the SSD1963 and SSD1298 chips to illustrate the register settings.
The first is SSD1963. Check the data sheet of the SSD1963 chip, and you can find a register that controls the direction of the auto-increment of the address. For example, the following figure:

You can see that it is set this order through the Ox36 command, these eight orders are the same as we mentioned above. So just set the corresponding relationship.
SSD1298 is the same. The sequence is also controlled by setting the register, which can be found in the data sheet, as shown in the figure below:

This is to use the ox11 register to control the sequence.
Another thing to note is: The window set must be the same as the display area of the picture or Chinese characters you want to display, otherwise it will be misaligned.
There is also when displaying Chinese characters or characters, the size of different fonts, the number of pixels to be displayed in each line is different, a byte is 8 bits, which represents 8 pixels, so when using for When looping, you need to pay attention. Don't reverse the high and low positions and display misalignment. Pay attention to whether the high bit is sent first or the low bit is sent first. This has something to do with your modulo and display, and it needs to correspond.

