51单片机为基础用汇编语言编写用数码管显示一个同时有"加""减""乘...答:ORG 0000H LJMP MAIN ORG 0100H MAIN:MOV SP,#7EH MOV 22H,#00H CLR P2.0 CLR P2.3 MOV 20H,#00H MOV 21H,#00H MOV 30H, #00H MOV 31H, #00H MOV 32H, #00H ;初始化 SU: MOV 7DH,#0FFH MOV 7EH,#0FFH MOV 7FH,#0FFH KEYI:ACALL KS1 CJNE A,#0F0H,LK1 ACALL ...
用c语言循环语句怎么写一个51单片机的时钟啊,用8个数码管显示时间。答:include<reg51.h> define uchar unsigned charuchar code ledtab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};//0-9unsigned char sec=0,min=0,hour=12,scanled;unsigned char key,flashbit,mode,time; unsigned char disdat[8];sbit led=P1^0;void delay(...
利用51单片机,4个数码管设计一个计时器,要求在数码管上显示的数据从0开...答:共阳数码管中断程序:include<reg52.h> define uint unsigned int define uchar unsigned char uchar code table[]= { 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x83,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};uint num,a;uchar bai,shi,ge;void init();void delay(uint);void ...