How to use Keil5 to write source code? There may be many friends who don’t know how to do it yet. So those who don’t know how to do it should come and learn how to use Keil5 to write source code with the editor. I hope that this tutorial can help. Everyone.
1. First, open Keil5, create a new project, and click the first new project option of Proctect.
2. Then select the microcontroller chip you need to download, usually AT89C51.
3. Create a new text and save the text. The code is written in assembly language and saved as an .asm file. If the code is written in C language, it is saved as a .c file.
4. Save the saved text into Source Group1. Right-click Source Group1, select Add Exitting, find the file you just saved and add it.
5. After completing the above steps, you can write code in the text.
6. After writing and compiling, if there is no ERROR, it means there is no syntax error. If there is an error, find the error and observe it.
Note: Make sure that the first 4 steps are correct before the code written later can be compiled successfully.
The above is the method of writing source code using Keil5 brought by the editor. I believe it can help everyone.