Next we will start to learn LCD:
There are many registers involved in the LCD section. Let me analyze them step by step.
The following section is displayed in the LCD manual:
It can be understood that the LCD is a TFT screen that contains backlight, touch and other functions. The size is 480*272, and the Panel can display as many as MB of color.
1. initialize the LCD first:
GPIO pin configuration: do not understand the manual
2. Turn off the display to prevent garbled characters
3. Why does the image adopt the rgb I/F type? Go to the s36410 Manual
4. Configure the control register to complete timing and clock frequency configuration. The notes are very detailed and can be understood.
5. Next, we will find the relevant sequence diagram.
With this sequence chart, I believe that you will not have any difficulties in looking at the code.
6. Next we will customize our coordinates, because we have the following code since (0.0) to (480.272 ).
7. Allocate the video memory. When we put the data into this part of the video memory, 6410 will automatically retrieve the data from it and send it to the display, initialization is basically completed here. ^_^
8. Don't forget to enable LCD in the last step.
Sorry, I almost missed a very important point, that is, configuring the window register !!!!
After the code is pasted, you can understand what it means by referring to the manual.
I will paste two subfunctions below:
The LCD settings are here. I feel that some other functions will involve related algorithms. Fortunately, it is not very difficult now. During the winter vacation, it will be charged !!!