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 system.map 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 system.map. 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
19.5V 4.62A 90W Laptop Power Adapter for HP Notebook Charger AC DC 4.5*3.0mm Adapter Laptop Keyboard Replacemenet For Dell Inspiron 15-3000 3542 5547 Notebook Keyboards NEW US Laptop Keyboard Replacement For Acer Aspire One D260 Notebook Keyboards Black Laptop Keyboard Replacement For Apple Macbook Air A1370 Notebook Keyboards Hot Sale Laptop Keyboard Replacement For Dell Mini 10 1012 Notebook Keyboards Original Notebook Keyboards For Dell Ins. 11 3000 3157 Laptop Keyboards Rplacement Black Hot Sale US Laptop Keyboard For Lenovo Ideapad Z470 Notebook Keyboard With Frame Black US Laptop Keyboard Replacement For Acer Aspire 3830 Notebook Keyboards-1651908938761790 Laptop Keyboard Replacement For Asus Eee PC 1005 Notebook Keyboards Backlight Laptop keyboard For Dell Latitude E6520 Notebook Keyboards Rplacement with pointer
hot articles
Best 5 Tips to Choose a Best Buy Laptop Battery Replacement
50
Advantages of Selecting Lenovo Thinkpad Ac Adapter
50
How You Can Make Money on Laptop Screen Protective Film Products
50
What Is the RF Connector_ RF Connector Classification and Specification Introduction
50
Why to Choose a Lenovo Laptop Keyboard for Your Home
49
The Evolution of the Laptop Replacement Parts in China
49
Sony Laptop Keyboard Price: the Best New Sony Laptop Keyboard Price in the Market
49
A Quick Brief Guide to Buy the Best Thinkpad Laptop Adapter
49
The New Trend in Laptop Keyboard Replacement
49
How to Choose a Home Central Air Conditioner Is Very Important to Master This Little Trick
49
buzzer driver and LED driver related articles
How to Buy Cheap and Stylish Dell Laptop Keyboard Price
How Does a Acer Laptop Keyboard Replacement Price Work?
How to Select and Toshiba Laptop Keyboard Price Tops Together
How to Choose Professional Samsung Laptop Keyboard Price?
How to Use Fujitsu Keyboard Laptop for Your New Home?
Contact US

    Bao’an District  Shenzhen City, China

     +86 189 3806 5764

NEWSLETTER SUBSCRIBE
no data
Copyright © 2021 CrowBerry

   

chat online
NEED HELP? WE'RE HERE!