专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
proteus
请教:用proteus仿真动态数码管显示异常
2019-07-18 09:38
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
proteus
13962
10
1331
用
proteus
仿真
动态数码管显示时,开始启动时有全段都显示,然后才能正常显示,如何去掉全段显示,附资料,请高手帮忙解决,
动态数码管显示C程序及仿真电路.rar
下载积分: 积分 -1 分
64.7 KB, 下载次数: 70, 下载积分: 积分 -1 分
友情提示:
此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
10条回答
scccx8106
2019-07-19 14:47
1 数码管显示1和2,同时LED每秒闪烁
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display()
{
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[1];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[2];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
}
display();
}
}
实现秒表0-60循环
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
time_counter++;
}
if(time_counter== 60)
time_counter= 0;
display(time_counter);
}
}
数码管0-59显示,到60时流水灯循环显示
#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
uchar ledflow = 0x7f;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
P0= 0xff; //清除断码
wei= 1;
P0= 0xbf;//点亮第7位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
P0 = 0xff;
wei= 1;
P0= 0x7f;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
time_counter++;
}
if(time_counter== 60)
{
wei = 1;
P0= 0xff;//关闭数码管显示
wei= 0;
TR1= 0;
P1= ledflow;
ledflow= _cror_(ledflow,1);
delay(500);
}1 数码管显示1和2,同时LED每秒闪烁
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display()
{
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[1];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[2];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
}
display();
}
}
实现秒表0-60循环
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
time_counter++;
}
if(time_counter== 60)
time_counter= 0;
display(time_counter);
}
}
数码管0-59显示,到60时流水灯循环显示
#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
uchar ledflow = 0x7f;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
P0= 0xff; //清除断码
wei= 1;
P0= 0xbf;//点亮第7位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
P0 = 0xff;
wei= 1;
P0= 0x7f;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
time_counter++;
}
if(time_counter== 60)
{
wei = 1;
P0= 0xff;//关闭数码管显示
wei= 0;
TR1= 0;
P1= ledflow;
ledflow= _cror_(ledflow,1);
delay(500);
}
else
display(time_counter);
}
}
else
display(time_counter);
}
}
加载中...
查看其它10个回答
一周热门
更多
>
相关问题
STM32F4上I2C(在PROTEUS中模拟)调试不通的问题
6 个回答
为什么Proteus 仿真点阵字体缺笔画 而且速度奇慢
7 个回答
2012~~单片机C语言程序设计实训100例-基于8051+Proteus仿真(第2版)
27 个回答
新手求帮忙解决proteus的问题
1 个回答
大家好,请问用三菱plc仿真软件跟mcgs组态软件怎么样连接?
1 个回答
相关文章
×
关闭
采纳回答
向帮助了您的知道网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
proteus
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
×
付费偷看金额在0.1-10元之间
确定
×
关闭
您已邀请
0
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display()
{
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[1];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[2];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
}
display();
}
}
实现秒表0-60循环
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
time_counter++;
}
if(time_counter== 60)
time_counter= 0;
display(time_counter);
}
}
数码管0-59显示,到60时流水灯循环显示
#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
uchar ledflow = 0x7f;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
P0= 0xff; //清除断码
wei= 1;
P0= 0xbf;//点亮第7位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
P0 = 0xff;
wei= 1;
P0= 0x7f;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
time_counter++;
}
if(time_counter== 60)
{
wei = 1;
P0= 0xff;//关闭数码管显示
wei= 0;
TR1= 0;
P1= ledflow;
ledflow= _cror_(ledflow,1);
delay(500);
}1 数码管显示1和2,同时LED每秒闪烁
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display()
{
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[1];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[2];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
}
display();
}
}
实现秒表0-60循环
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
sbit LED1 = P1^0;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
wei= 1;
P0= 0xfe;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
wei = 1;
P0= 0xfd;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
LED1= ~LED1;
time_counter++;
}
if(time_counter== 60)
time_counter= 0;
display(time_counter);
}
}
数码管0-59显示,到60时流水灯循环显示
#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei = P2^7;
sbit duan = P2^6;
uchar ledflow = 0x7f;
uchar counter, time_counter;
unsigned char leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
0x6F, //"9"
0x77, //"A"
0x7C, //"B"
0x39, //"C"
0x5E, //"D"
0x79, //"E"
0x71, //"F"
0x76, //"H"
0x38, //"L"
0x37, //"n"
0x3E, //"u"
0x73, //"P"
0x5C, //"o"
0x40, //"-"
0x00, //熄灭
0x00 //自定义
};
void delay(uint z)
{
uintx,y;
for(x= z;x > 0;x--)
for(y= 120; y > 0; y--);
}
void display(uchar i)
{
ucharshi,ge;
shi= i / 10; //求模
ge= i % 10; //求余
P0= 0xff; //清除断码
wei= 1;
P0= 0xbf;//点亮第7位数码管
wei= 0;
duan= 1;
P0= leddata[shi];
duan= 0;
delay(1);
P0 = 0xff;
wei= 1;
P0= 0x7f;//点亮第一位数码管
wei= 0;
duan= 1;
P0= leddata[ge];
duan= 0;
delay(1);
}
void main()
{
TMOD= 0x10;//定时器1 工作模式1 16位模式定时器
TH1= 0x4b;
TL1= 0xfe; //定时50ms
TR1= 1; //启动定时器
while(1)
{
if(TF1== 1)
{
TF1= 0;
TH1= 0x4b;
TL1= 0xfe; //初始化值,定时50ms
counter++;
}
if(counter== 20)
{
counter= 0;
time_counter++;
}
if(time_counter== 60)
{
wei = 1;
P0= 0xff;//关闭数码管显示
wei= 0;
TR1= 0;
P1= ledflow;
ledflow= _cror_(ledflow,1);
delay(500);
}
else
display(time_counter);
}
}
else
display(time_counter);
}
}
一周热门 更多>