用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...
单片机P1口接共阳极数码管,公共端已接高电频,请写程序使数码管循环显...答:include<reg51.h>unsigned char table={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};void delay(int a){int i;while(a--)for(i=0;i<110;i++);}main(){int i;while(1) { P1=table[i]; i++; i%=16; delay...
单片机P1口接一共阳极数码管,公共端已接高电频,请编写程序使数码管循...答:include<reg51.h>unsigned char code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};//共阳极void delay(int a){unsigned char i;while(a--)for(i=0;i<120;i++);}main(){unsigned char i;while(1) { P1=table[i]...