我用单片机汇编语言让4个数码管同时显示1234,结果显示的是乱码?_百 ...答:ORG 00H AJMP MAIN ORG 30H MAIN: LCALL DISP MOV 00H,#1 MOV 01H,#2 MOV 02H,#3 MOV 03H,#4 AJMP MAIN DISP: MOV A,00H ACALL SEG7 MOV P1,A MOV P0,#01H ACALL DLY MOV A,01H ACALL SEG7 MOV P1,A MOV P0,#02H ACALL DLY MOV A,02H ACALL SEG7 MOV P1,A MOV ...
用51单片机程序显示3位7段数码管,求具体程序答:假设为共阴极数码管,驱动输入端接单片机P1口,共阴极接P2口的0.1.2.脚。我的程序如下,当前显示数字123 include <reg52.h> typedef unsigned char uint8;typedef unsigned int uint16;typedef long int uint32;code uint8 number[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f...
求一个51单片机汇编程序,让四个数码管动态显示1 2 3 4,不是静态轮流显 ...答:include<stc89c51RC.h> define uchar unsigned char define uint unsigned int int counter=0;sbit w0=P2^7;sbit w1=P2^6;sbit w2=P2^5;sbit w3=P2^4;uchar code table[]={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71 };void ...
51单片机如何让一个数码管闪烁而其他数码管一直保持亮的状态不受影响...答:假如有6 个数码管,每个亮5ms,30ms是一轮,用一个变量a计数,40轮为一周期,如果a小于20,需闪烁的哪一位数码管不亮,a大于20,该位正常显示。就形成了亮0.6s灭0.6S的效果。下面是4位数码管闪烁程序:uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x...
51单片机怎么用一个按键控两个数码管,按一下改变两个数字的显示速度_百 ...答:include<reg51.h> define uchar unsigned char;uchar distab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x00}; //0到f uchar number,dat,dattop=10,cnt=0;sbit keyu=P1^0;sbit keyd=P1^1;void t0isr() interrupt 1 { TH0...