如题所述
1、用精确定时的方法,设置流水灯运行时的时间间隔,延时时间为500MS。
2、#include "reg51.h"首先写出单片机的头函数。
3、#include "intrins.h"输入位移函数。
4、unsigned int count=0,led;定义函数。
5、输入主函数,定义单片机的端口,写入延时函数。
6、中断跳转,使流水灯运行起来。