New Project study notes the microcontroller 51, a small lamp lighting

 

 

  1. After we keil software installation is successful, we started a new project trip.
  2. First, we create a new folder on the desktop, named 51 projects . Inside the new two folders named obj, main

  3. We double-click keil software. Click Project , select New uVision Project ........

  4. Then we found just the new 51 project folder for our new file named LED , and stored in 51 project folder inside the obj folder, click Save

  5. In the pop-up window find Atmel , click next to +

  6. We choose to learn AT89C52 , click the OK .

  7. In the next pop-up window, we have chosen  is

  8. We press the shortcut Ctrl + N , . Ctrl + S to save the file in the new 51 projects inside the main folder inside, a name called led.c

  9. We click on the three colored small box , which pops up in the screen, click Add Files

  10.  找到我们刚才保存的led.c文件点击Add,添加进我们的工程

  11. 文件添加完成后,在文件里面输入下图代码

  12. 再点击一便下图三个按钮

  13. 下面出现提示0错误0警告

  14. 我们再点击小魔术棒按钮

  15. 选择output,将里面的Create HEX File勾选上点击OK即可。

  16. 我们在将刚才的三个按钮,在点击编译一遍
  17. 我们接下来找到第一次上课文件夹,找到下图软件单击

  18. 我们选择一下单片机型号,在STC89C51系列里面选择STC89C52.

  19. 我们将单片机连接至电脑,并打开开发板开关。在串口号里面选择最长的那个,单击一下

  20. 我们接着点击打开程序文件,找到我们新建的C51工程里面的obj文件夹,点击打开

  21. 点击下载程序,在将开发板开关关掉并打开,程序就下进去了

如果我写的文章帮助大家节省了时间,记得点个赞,如果想跟我一起学习知识,可以关注我一下

 

发布了45 篇原创文章 · 获赞 96 · 访问量 1万+

Guess you like

Origin blog.csdn.net/qq_40831778/article/details/102526533