Driver debugging FAQ _ LCD

Source: Internet
Author: User
Tags scale image sdo

Author: Liu Xuhui Raymond reprinted. Please indicate the source

Email:Colorant@163.com

Blog:Http://blog.csdn.net/colorant/

Home page:Http://sites.google.com/site/rgbbones/

 

Some problems I encountered during the debugging of tft LCD drivers are recorded here, because the specific hardware platform and environment are different and there are some problems, the symptom and cause may not be the same as your actual situation and are for reference only. Initialization cannot be completed correctly
  • Symptom
After the initialization data is sent to the serial bus of the LCD, the LCD module has no response
  • Analysis
Generally, small and medium-sized LCD modules used in the embedded field need to be initialized after power-on before they can work properly. Common communication interfaces include CPU interfaces and serial bus interfaces, while serial bus interfaces are mostly SPI interfaces. There are two reasons for initialization failure: failing to follow the correct power-on Reset process SPI communication control does not meet the requirements of LCD module driver chip spec, although they are all SPI interfaces, different LCD modules often have different requirements on control signals. Sometimes, the SPI interface of the CPU cannot even generate the specific waveform timing required by the LCD module. Some LCD modules may also have specific enable signal lines to control the operation of the SPI interface. Secondly, most LCD driver chips are actually capable of reading registers and ID numbers, but many modules often do not introduce the SDO signal lines of the chip SPI interface when encapsulating, as a result, it is impossible to judge whether the SPI bus communication protocol is correct by reading the register and ID. This increases the difficulty of debugging.
  • Solution
First of all, ensure that the power-on smoothing, reset, and enable signal are correct. Then, if the SPI interface provided by the CPU cannot be configured to be identical to the timing waveform required by the LCD module, the gpio port can be used to simulate the SPI signal to initialize the LCD. After all, the initialization workload is not much and does not need to be done frequently. Therefore, the gpio simulation has almost no impact on the CPU usage. Finally, if the SDO port can be extracted as much as possible, it can bring great convenience to the preliminary debugging, and will also help to automatically determine the LCD type in the future, according to the module automatically loaded different drivers. Image dislocation
  • Symptom
Common symptoms include a few pixels of movement between the left and right, a color stripe above or below, or a black stripe.
  • Analysis
Undoubtedly, this is definitely because the initialization parameter settings are incorrect and the location is misplaced, which is related to the field synchronization model or the row synchronization signal, it is basically the matching of the width, frontend and backend Delay Time, polarity, and other attributes of the row-field synchronization signal between the LCD module and the LCD controller on the CPU. In this case, the mismatch between the image and the time delay before and after the row field is the most likely. In addition, in this case, the number of misplaced screens is usually not too large. If there is a dislocation of 1/2 screens or the like, it is usually caused by other reasons.
  • Solution
Precisely adapt to the line field signal. Sometimes, the setting of some LCD line field signals is also related to the setting of some voltage parameters of the LCD driver chip. To be modified collaboratively.
After a period of work, some screen data is displayed incorrectly.
  • Symptom
After a model of LCD is used for a period of time, some data on the top of the screen is displayed similar to the overlapping display of the line, and over time, starting from the beginning, several rows at the bottom gradually expand upwards and become more and more serious. Sometimes I don't need it for a long time, and it's suddenly better.
  • Analysis
Uncertain Problems are the most troublesome. Poor colors, misaligned data, and blurred screens are often caused by LCD connectors. However, this time, it is useless to repeatedly confirm the good contact with ctor. After careful debugging, we finally found that the problem was related to the hardware initialization sequence. We need to first set the LCD controller-related registers on the CPU, and then initialize the registers in the LCD module, otherwise, after the LCD screen Initialization is complete, modifying the control register of the CPU will have an unpredictable impact on the LCD module of this model. In this example, the trouble is that the impact is not immediately reflected, but only after a period of time. This is strange.
  • Solution
After the initialization order is modified, the problem no longer occurs.
After initialization, data cannot be written to the LCD.
  • Symptom
A manufacturer's LCD driver chip cannot write display data after initialization.
  • Analysis
Carefully studying spec and finding that before writing data on the RGB interface, you need to write a special value on a register address through the serial interface, however, the initialization Code contains the register settings. Even after this value is written, data cannot be written to the RGB data port. Finally, it is found that after the register is modified, no other registers can be written, otherwise there will be an appeal issue. Theoretically, communication serial ports and RGB data interfaces should not affect each other, And the LCD driver chips of other manufacturers do not have such problems that special commands need to be written first, it can only be said that this chip is really special.
  • Solution
Put the register settings at the end of the initialization code.
Large-scale image misplacement, overlay, and repetition
  • Symptom
Common symptoms include the horizontal or vertical repetition of an image displayed on the LCD, which may be accompanied by compression and extraction.
  • Analysis
This is usually caused by incorrect parameter settings of the DMA Controller Used for LCD data transmission. But once, I encountered a very strange phenomenon: the upper half of a LCD driver chip shows two scaled-down images side by side, while the lower half is, it is the lower half of the image that was sent during the last initialization. Finally, the image can be correctly displayed immediately before the system is shut down. First of all, unlike the timing problem, because this phenomenon is completely different from the phenomenon of field scanning, which is caused by Line Scanning Signal mismatch. Secondly, the chip provides sampling and other functions, but the program does not mistakenly set these parameters, sampling should occur during data transmission and storage from the CPU to the LCD cache. In this example, the cached data should be correct, therefore, if this setting error is also ruled out, it may eventually be found that when the driver chip is working in the RGB interface mode, there is a register setting that needs to be modified to set the high-speed write mode, the Register is not set in the initialization Code provided by the manufacturer, and the manufacturer can work normally after testing. It should be because the hardware platform used to drive the LCD is different, and there are some differences in timing and clock frequency.
  • Solution
You can solve the problem by carefully calculating the DMA transmission parameters. Analyze and solve other problems according to the specific situation. Gray images, lost color details, etc.
  • Symptom
Common symptoms include the loss of detailed changes in the image color and the darkness and gray of the entire image.
  • Analysis
Generally, the LCD module has a series of registers used to control the voltage level of each gray scale, and some registers are used to control the overall voltage offset range. Adjust these registers to adjust our so-called color saturation, contrast, and so on. These registers are relatively easy to adjust, but have the greatest impact on the color details of the image, usually gamma curve-related registers, which are actually achieved by controlling the offset voltage levels of the various gray scales mentioned above.
  • Solution
For the gamma curve, you need to calculate the values at the gamma curve sampling points and set the corresponding registers, the gamma curve parameters calculated theoretically do not match the actual display performance of the actual LCD module. Some local adjustments are required, but the overall curve must be smooth, otherwise, the color may change abnormally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.