The first small driving process [LCD]

Source: Internet
Author: User

By Yili Xie (yili.xie@gmail.com)
Date: 2010/04/07

You are welcome to reprint it. Please indicate the source

 

First of all, I would like to thank Cheng Dafeng for giving me the opportunity to get started. What are the tasks that the leaders have explained? There is pressure to be motivated ~~ Thanks again to our lovely colleagues, we are always patient in answering a bunch of childish questions during the initialization process. Thank you ~~

Before that, I always report a fear to the driver, not to mention anything else, because the circuit diagram cannot be understood... When I went to school, I had too many courses on digital circuits, and I had never done any experiment. I think I can't even build a crystal head with a network cable .. Past Events --! I will not talk much about it in the idle time. The purpose of this article is to think that many people, like me, can find a starting point in terms of driving blank people and how to get started with driving in the shortest time ~~ Well, I can summarize it myself, but it is just a superficial remark. Please give me more advice when you pass ~~

 

Task: Light up the screen within one day after the Board is started;

MPU: msm7627

Platform: Android

IC: rm68040

 

When you are completely unfamiliar with what you want to do, the biggest obstacle is that you do not know what you must do to complete the job. Before I call this screen, my basic driver knowledge is the first four chapters of Song's book. It's really nothing in my mind... After a sea search on the Internet, I thought so. To make a screen shine is to make a hardware work, so it is necessary to understand the hardware, you must know under what conditions it can work, and the screen must be controlled by MCU. How can MCU control it? So you have to understand this MCU chip, so you start by learning about these hardware.

So how can we understand this hardware knowledge? The Datasheet of the chip ~~ The Datasheet of the chip is generally smelly and long, and is told to be a joke. I saw these datasheet, but it was just a rough story... Next, I will summarize what I think is the most important in the chip information: pin, timing, and register ~~

The first one is the datasheet of the driver IC. After reading the description of the pin, we will look at the schematic diagram to see which lines are connected, and what are these lines used, specific to the LCD driver, after reading datasheet, you will roughly know what kind of work needs to be done to make the hardware work. Specifically, for this screen, we must first use SPI to issue command initialization. If other hsync vsync margin pclk and other signals are correct, we should be able to display the image. As a result, Alibaba Cloud launched a sea search on the Internet and learned what SPI is. It is a serial bus with a specific time series ~~

At this time, you don't have to worry about some concepts. Maybe you just stay on the concept. You don't know what it is. What's going on? It's Okay To understand Google.com, if you cannot understand it, you will be able to see the code later. I will talk about how to find the part of the code you should read later ~~

After learning about the LCD, the next step is to understand how the MCU controls this screen. Taking out the datasheet of the main chip, you can easily find things about lcdc and MDP. With Datasheet and Google.com, you can easily understand how these controllers control this screen. You may not know the details yet, but at least you can concatenate such a process, that is, a process from MDP to lcdc to LCD, data flow, etc, it is very helpful to look at the code with such a process ~~

Now you have a basic understanding of the hardware and schematic diagram. The next step is to look at the implementation process of the Code, so that some unfamiliar concepts encountered on datasheet are all specific. My environment is Linux. Let's talk about how to find the code I need.

In a Linux environment, makefile is the soul of compilation, so you must have an understanding of the kernel compilation mechanism so that you can find the code you need more accurately, the compiling of Linux kernel is based on kconfig to determine the modules you need to compile. After learning about Kernel compilation, you can easily find the required code in Driver/Video Based on the config file.

After finding the code you need, your current task is to understand it. You have never seen the Linux kernel code before. So where can you start? The simplest way is to think about how your driver is called? So there are two simple points: one is to figure out how your driver is used by kernel, and the other is how your driver deals with hardware. For the first question, you need to have a brief understanding of the Linux kernel Startup Process (if you have time, you 'd better read the startkernel () function carefully), according to startkernel () you basically know how device and driver are used. Then, you must have an understanding of the driver's framework. Here, you must have an understanding of FB. It will be easier to see the code later. To know how the driver controls the hardware, you should focus on the flow of data streams and configure the registers. The flow of data streams is concentrated on several important data structures. You must understand the data structures so that you can configure your registers in the framework ~~~

To debug the hardware, you need to know how to use the two tools, whether the voltage measured by the multimeter is normal, and whether the waveform produced by the oscilloscope measurement is correct ~~ Unfortunately, I still cannot use the oscilloscope --! This debugging process should be quite painful. If you don't talk about it, you will naturally know it when debugging ~~

Summarize the work required for the next hardware task ~~

1. Normal power supply 2. Normal clock 3. correct register configuration (initialization)

This is basically the case. I have roughly explained the process of solving this driver and hope to help people who have never done it ~~ Think about it later. The driver is not as advanced as you think. Just calm down and read Datasheet and code with a hard head. There are no problems with .com ~~

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.