Step 1: Install Keil software
1. Select the C51V900 installation program in the folder and open it, as shown in the figure:
2. Keep selecting Next in the installation dialog box until Finish completes the Keil installation.
Step 2: Install the USB to Serial Cable Driver
1. Select and open the HL-340 installer in the folder
2. Click INSTALL to automatically complete the installation
Step 3: Create a Keil project
1. Open the Keil icon on the desktop and create a new project. Click [New μVision Project] in the [Project] menu, as shown below:
2. Select the location to save the project. It is recommended to create a new folder to save the project file for easy management in the future.
3. Select the microcontroller model: Open the Atmel directory, select AT89C52 in the subdirectory, click OK, and select No (N) in the new dialog box that pops up.
4. Click the [New] menu item in the [File] menu, or press Ctrl+N to create a new file Text1 , click the icon in the toolbar or press Ctrl+S, enter the file name in the pop-up save dialog box, and note that you must add ".c" after the file name as the saved file type (for example, shuangshuangbang.c), and then save. [page]
5. Return to the editing interface, click the "+" sign in front of [Target], and then right-click on the [Source Group 1] option to pop up the menu shown in the figure below. Then select the [Add Files to Group 'Source Group1'] menu item, as shown below:
6. In the pop-up dialog box, select the "XXX.c" file you just saved and click [Add], then click [Close], as shown in the figure:
7. Click the "+" sign in front of [Source Group 1] on the left. You can notice that there is an additional sub-item [XXX.c] in the [Source Group 1] folder. The source code file is now associated with the project. Copy Viagra's code from the "XXX.c" code editing window on the right, as shown in the figure:
8. Click [Target Options…] on the toolbar, open the Output tab and select [Create Hex File], click [OK]. Only after the compilation is completed will a Hex file that can be downloaded to the microcontroller be generated, as shown below:
[page]
8. Click [Rebuild] on the toolbar, and you can see the status displayed in the status bar (0 errors and 0 warnings). At this time, the establishment of the Keil project is completed and a Hex file that can be downloaded to the microcontroller is generated, as shown below:
Step 4: Query the COM port
1. Use a USB to serial port cable to connect the computer's USB port to the microcontroller's serial port;
2. Right-click "My Computer" and click "Manage". In the pop-up window, select "Device Manager". Click "Port" on the right to see the COM port of the USB-to-serial cable (COM3 port in the figure). Remember that the COM port is displayed, which will be used when downloading the program, as shown in the figure below:
Step 5: Download the Hex file
1. Open the "Program Download" compressed package in the folder and open the STC_ISP_V481.exe program inside, as shown in the figure:
2. In the pop-up interface, select MCU Type as STC89C52RC, click [Open Program File], find the file with the ".hex" suffix in the location where you saved the Keil project before, and choose to open it. Select "COM" as the COM port displayed in Step 4 (my computer shows COM3, so I chose COM3, but different computers may be different, so be sure to choose according to your own computer), as shown below:
2. Finally, click [Download] (before clicking [Download], the MCU must not be powered on), and then press the power switch of the MCU to power on the MCU. At this time, the program will start to download to the MCU. The following figure shows that the program has been successfully burned into the MCU. You only need to install the MCU with the program burned into the Shuangshuang stick:
Previous article:Electric vehicle wireless remote control system based on AT89C51 single chip microcomputer
Next article:51 MCU burning detailed whole process
Recommended ReadingLatest update time:2024-11-16 15:26
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Fundamentals and Applications of Single Chip Microcomputers (Edited by Zhang Liguang and Chen Zhongxiao)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University Hall----Keithley 4200A-SCS parameter analyzer accelerates semiconductor equipment, materials and process development
- EEWORLD University Hall ---- Advanced C Language Programming for Embedded Systems (Ling Ming, Southeast University)
- Two-phase brushless DC motor speed control system based on DSP and CPLD
- The main structure of the DM642 image processing program
- Multi-way switch, battery inspection instrument
- EEWORLD University ---- Wildfire FPGA Video Tutorial
- 【Node.js for Embedded Systems】Electronic version
- 24V to 16V circuit problem
- The problem of the propagation speed of electric pulses in wires
- CCS usage problems and solutions