51单片机4个数码管显示程序答:include<reg52.h> //52系列单片机头文件 define uchar unsigned char //宏定义 define uint unsigned int sbit dula=P2^6; //申明u1锁存器的锁存端 sbit wela=P2^7; // u2 uchar num1,num2;uchar code table[]={ //数组定义 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,...
51单片机数码管显示答:include<reg52.h>unsigned char code shu[]={0x08,0x5e,0x82,0x42,0x54,0x41,0x01,0x5a,0x00,0x40};//0-9unsigned char code wei[]={0xfe,0xfd,0xfb,0xf7,0xef}; unsigned int x,y,z;unsigned char con;unsigned char dis[5];/***/void init(void){TMOD = 0x16;//T1定时...
51单片机(四位数码管的显示)程序答:下面这个程序是4x4距阵键盘,LED数码管显示,一共可以到0-F显示,你可以稍微改一下就可以实现你的功能了,如还有问题请发信息,希望能帮上你!include<at89x52.h> unsigned char code Dig[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e}; ...