基于STC89C52单片机流水灯设计
1、1.电脑软件准备
<1>,STC_ISP_V480 程序下载软件
<2>,Keil uVision4 编程软件
<3>,ISIS 仿真软件
2、2.STC89C52芯片

3、3.单片机最小系统板

4、4.STC89C52单片机程序
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar code Pattern_P0[]=
{
0xfc,0xf9,0xf3,0xe7,0xcf,0x9f
};
uchar code Pattern_P2[]=
{
0xf5,0xf6,0xfe,0x54,0x56,0x76,0xd7,0x49,0xa9,0xe4,0xc6
};
void DelayMS(uint x)
{
uchar t;
while(x--)
{
for(t=120;t>0;t--);
}
}
void main()
{
uchar i;
while(1)
{
for(i=136;i>0;i--)
{
P0=Pattern_P0[i];
P2=Pattern_P2[i];
DelayMS(2000);
}
}
}
5、5.ISIS仿真

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:99
阅读量:135
阅读量:125
阅读量:98
阅读量:137