How to use Keil3 to develop 51 microcontroller program

Publisher:Zhenai5201314Latest update time:2023-06-26 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Double-click the icon to open the Keil software

2. Click [Project]->[New Project] on the menu bar

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

3. Save the new project to a folder

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

4. Choose a CPU chip, here STC89C52RC corresponds to Philips' P89V51RD2

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

5. Prompt whether to copy the startup code of 8051 to the folder. Select "No" here.

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

6. After completion, you can see Source Group1 in Project Workspace

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

7. Create a new code file

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

8. Save with “*.c” as the suffix name

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program


9. Add the file led .c you just saved to the project.

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

10. Select the source code file and add
 

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

11. You can see that led.c is already in Source Group1

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

12.Add the code as follows

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

13. Click "Op" on the toolbarTI ons for target" tool, select the Output tab, and check "Create HEX File"

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

14. Press F7 to compile and generate a hexadecimal HEX file

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

15. Open the STC_ISP_V480 download tool

16.Select MCU  Type as STC89C52RC

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program


17. Open the program file and select the led.hex file you just compiled.

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

18. Open the computer device manager to see which port the serial port of the 51 development board is. This is the COM4 port.

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

19.Select COM4

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

20. Click the " Download " button and wait for the download to complete before powering on!

[STC89C52RC MCU] How to use Keil3 to develop 51 MCU program

21. The operation effect is as shown in the figure below, the first LED light is on


Reference address:How to use Keil3 to develop 51 microcontroller program

Previous article:Lesson 17 C51 Use of Structures, Unions and Enumerations
Next article:How to use 51 microcontroller to implement traffic lights

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号