#include<reg51.h>
#define uchar unsigned char
uchar LED[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79};
int i=0;
void delay(){
unsigned int j;
for(j=0;j < 30000;j++);
}
void main(){
TMOD = 0x20;
TH1 = TL1 = 0xfd;
PCON = 0x0;
TR1 = 1;
SCON = 0xd0;
EA = 1;
ES = 1;
ACC = LED[i];
TB8 = P;
SBUF = ACC;
delay();
while(1);
}
void series(void) interrupt 4 {
uchar a;
if(RI == 1){
RI =0;
a = SBUF;
if(a == 0){
if(i < 9) i++;
else i = 0;
ACC = LED[i];
TB8 = P;
SBUF = ACC;
delay();
}
else{
ACC = LED[i];
TB8 = P;
SBUF = ACC;
}
}
else TI = 0;
}
南岸青栀*
- 粉丝: 1271
- 资源: 32
最新资源
- (源码)基于JavaWeb的学生管理系统.zip
- (源码)基于Android的VR应用转换系统.zip
- (源码)基于NetCore3.1和Vue的系统管理平台.zip
- (源码)基于Arduino的蓝牙控制LED系统.zip
- SwitchResX 4.6.4 自定义分辨率 黑苹果神器
- (源码)基于Spring Boot和MyBatis的大文件分片上传系统.zip
- (源码)基于Spring Boot和MyBatis的后台管理系统.zip
- (源码)基于JDBC的Java学生管理系统.zip
- (源码)基于Arduino的教室电力节能管理系统.zip
- (源码)基于Python语言的注释格式处理系统.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈