1、新建项目,如图所示。
2、添加reg51.h头文件。#include<reg51.h>
3、sbit s2=P3^0;位定义
4、sbit led1=P1^0;定义灯。
5、创建C主函数
6、创建循环效果。
7、选择效果。