Domestic teaching experiment box_Operation tutorial: 2-2 LED light control experiment
[Copy link]
2-2 LED灯控制实验
1. Experimental Purpose
This video tutorial is based on the Chuanglong teaching instrument TL6748-PlusTEB teaching experiment box.
The purpose of this video is to learn the methods and principles of configuring GPIO pins based on the StarterWare development environment, and to implement LED light control in the StarterWare development environment.
2. Experimental Principle
StarterWare
StarterWare is a free software development kit that provides OS platform (no OS platform) support for ARM and DSP TI processors. Includes the Device Abstraction Layer (DAL) library and sample applications that demonstrate the functionality of peripherals on TI processors.
Hardware Schematic
LED13~LED16 are used in the experiment, and the corresponding interface names are "GPIO0[5], GPIO0[0], GPIO0[1] and GPIO0[2]". When the GPIO output is high level, the LED will light up, and when the output is low level, the LED will go out.
Source code
The source code and instructions for configuring GPIO as output can be found in gpio.c. The first parameter is the base address of the GPIO, the second parameter is the number of the GPIO, and the third parameter sets the direction of the GPIO.
The function source code and function usage instructions for configuring GPIO output values can be found in gpio.c. The first parameter is the base address of the GPIO, the second parameter is the GPIO number, and the third parameter sets the GPIO level.
3. Operation phenomenon
Hardware Hookup
- Connect the emulator to the computer's USB port.
- Set the DIP switch to DEBUG mode 01111.
- Connect the power supply of the experimental box and turn on the power switch.
operate
- Import Project
- Compile project
- Connect CCS to the development board and load the program
- Click Run Program
- You can see the 4 LED running lights on the experimental board flashing
|