This Paper Analyzes the Preparation of Buzzer Driver and LED Driver

To write LED driver, first know the structure of development board; The development board is divided into core board and bottom board; The first step in writing the driver is to look at the development board and find the position and corresponding name of the LED lamp on the development board; The first step is to check the core board circuit diagram and the backplane circuit diagram; Finally, check the development board manual and write the program:

By looking at the development board, we can know the location of LED lights on the core board. Find the LED circuit diagram on the core board. Ctrl F can quickly find it in the document:

Through the circuit diagram, we can see that one end of the LED lamp has been connected to the high level, and the LED will be lit as long as the low level is added to the other end.

Then check the LED pin on the core board:

As can be seen from the above figure, LED1 corresponds to gpm4_ 0

Then you can find its specific usage through the chip data manual:

Through the manual, we can see that gpm4con sets an output to indicate control, sets a zero input to indicate detection, gpm4dat indicates its value and the voltage state of the pin. For, a value of one indicates high level, and a value of zero indicates bottom level. The code is pasted below:

The following code in C language is to realize the flashing of four LED lights

Running Lantern:

Water lamp:

The delay function udelay () always used in the above program does not have the content in the standard C library because u-boot is used as the boot of the embedded Linux system. To use the delay function udelay () like printf, you need the function provided in u-boot. The contents of the u-boot function in the u-boot source file need to be provided in u-boot. The contents of the u-boot function are in the file in the u-boot source file. The system. Map file is the symbol table used by the kernel. A symbol table is a query table between symbol names and their memory locations. The symbol name may be the name of a variable or the name of a function. When you want to query the location of the symbol name or the symbol name of a specific location, you need Find the corresponding address of the function, and you can use it;

Through the development board, we can see that the buzzer is located on the base plate:

View the circuit diagram:

It can be seen from the backplane manual that when xpwmtout0 is at high level, the buzzer will sound; Through xpwmtout0, we find its pin on the core board

Then check the chip Manual:

As can be seen from the figure, when gpd0con is 0x1, control: when gpd0dat is 1, it is high level: the assembly code is pasted below:

Code of C language:

This Paper Analyzes the Preparation of Buzzer Driver and LED Driver 1

hot searches
20V 3.25A 65W USB Type C PD Wall Fast Charger Laptop Power AC Adapter for Lenovo Acer HP Elitebook Spectre Chromebook Elite New Laptop Keyboard for Lenovo K2450 Notebook Keyboard With Frame Laptop Keyboard Replacement For MSI Wind U100 Notebook Keyboards Original Laptop Keyboard For Toshiba Portege Z30-B Notebook Keyboards Replacement With Frame Black US Laptop Keyboard For HP Pavilion DV2000 Notebook Keyboards Replacement Black 18.5V 3.5A 65W Laptop Power Adapter for HP Notebook Charger AC DC 7.4*5.0mm Adapter Laptop Keyboard For Sony Vaio VPC-YA Notebook Keyboards Replacement With Frame Black Universal 12V 3A 36W DC 5.5*2.5mm for AC Laptop Power Adapters LED Power Adapters and Other Power Chargers US Laptop Replacement Keyboard For HP Pavilion DV5 Notebook Keyboards Black Laptop White Keyboard Replacement For MSI CR400 Notebook Keyboards
hot articles
How You Can Make Money on Laptop Screen Protective Film Products
What Are the Advantages and Disadvantages of Replacement Laptop Keyboard Keys?
Why to Choose a Custom Laptop Keyboard for Your Home
5 Top Tips When It Comes to Laptop Screen Supplier
Why to Choose a Lenovo Laptop Keyboard for Your Home
What Is the RF Connector_ RF Connector Classification and Specification Introduction
What Are the Best Dell Laptop Keyboard for 2021?
Sony Laptop Keyboard Price: the Best New Sony Laptop Keyboard Price in the Market
How to Choose the Perfect Mac Led Keyboard?
How to Choose a Home Central Air Conditioner Is Very Important to Master This Little Trick
buzzer driver and LED driver related articles
Corning Brings Gorilla NBT Glass to Touch Screen Laptop
Beginners Guide to Laptop Screen Replacement
How Does QFN Package Solve the Heat Dissipation Problem of LED Display Screen
Factors Affecting the Price of LED Display Screen
How to Fix This Problem with IPhone4s, Got Blue Dark Display Screen with Black Lines?
Contact US

    Bao’an District  Shenzhen City, China

     +86 189 3806 5764

no data
Copyright © 2021 CrowBerry


chat online