keil4 builds the first 51 single-chip project
One, install cracked keil
51 MCU programming kiel4 installation and cracking tutorial https://blog.csdn.net/qq_38105227/article/details/81676095
After keil4 has been installed and successfully cracked, let’s create the first 51 microcontroller
Two, create a project
- First open our Keil uVision4 software
Note that opening the software interface is blank, as shown in the figure below:
2. Create a new project
3. Here I create a new project named example, and save it in the firstproject folder of the D drive. The name of the project can be chosen arbitrarily, and the location of the new project can also be set arbitrarily.
As shown in the figure below : 4. After saving, a dialog box as shown in the figure pops up, select the single-chip microcomputer chip used in the project. Select "Atmel", click the "+" symbol in front of "Atmel", select "AT89C52", click "OK" and then click "Yes". As shown in the figure below:
5. To create a new file, click "File" in the upper left corner and select "new" to create a new file. Then click the menu "File", select "save", the ""save
as " dialog box pops up , select the save location (the save location is the same as the project location by default, and it is recommended not to change), and name the new file " example_led.c ". The file name does not matter and can be modified arbitrarily, but it must have a ".c" suffix. As shown below:
6. Add the file (the newly created example_led.c file) to the project, click the "Source Group 1" folder, right-click, select "Add Files to
Group Source Group
1...", a dialog box pops up, select the C to add File (the newly created example_led.c file), click "Add" to complete the addition and click "Close" to close the window. As shown below:
Three, program writing and compilation
7. Enter the program (the program is below the picture), click "Project" in the menu bar and select "Options for Target'Target
1'...", a dialog box will pop up, click "Output", and tick "Create HEX File". Click OK. As shown in the figure below:
8. Check the correctness of the input program, click the "" three buttons in the upper left corner, the following figure appears to prove that there is no problem, as shown in the figure below:
Fourth, download the burning program
Reference tutorial
https://jingyan.baidu.com/article/09ea3ede4e8b23c0aede39ed.html
If the above link method does not work well, add the following operations
Open and select Keil simulation settings-add model and header files to keil
(note: the keil file directory added here must have both UVx and C51 folders)