用keil写51单片机数码管由0到60的程序,急,谢谢答:include<reg51.h> define uchar unsigned char uchar table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f};void delay(int a){ while(a--);} main(){ uchar i;while(1){ P2=table[i/10];P3=table[i%10];i++;i%=61;delay(60000);} } ...
51单片机控制数码管循环显示0-9程序答:采用共阴极LED数码管,51单片机P1口输出数据:ORG 0000H JMP MAIN ORG 0100H MAIN:MOV DPTR,#TAB MOV R1,#00H DISP:MOV A,R1 MOVC A,@A+DPTR MOV P1,A LCALL DELAY INC R1 CJNE R1,#0AH,DISP SJMP TAB: DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FHDELAY: MOV R4,#...
单片机 at89c51 6位数码管24小时倒计时程序。怎么办?答:"#include<reg51.h> define uchar unsigned char define uint unsigned int uchar hour,min,sec;uint count;uchar code tab[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};uchar code add[6]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb};/***延时一毫秒***/ void delay1ms(...