一个8位数码管去连接单片机的21~28号引脚,程序该怎么写 谢谢.._百...答:include <reg52.h> //头文件调用,写程序时都要加上 define uint unsigned int //宏定义,为了后面定义变量书写简便 define uchar unsigned char uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};//共阴数码管0-f /...
请问谁能给我一个c52单片机控制8位共阴数码管显示,ds18b20的测温程序...答:unsigned char tab[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F}; //0, 1, 2 3 4 5 6 7 8 9 void delay(unsigned int i);//延时函数 Init_DS18B20(void); //初始化函数 ReadOneChar(void); //读一个字节 WriteOneChar(unsigned ch...
89C52单片机怎么点亮8个数码管?下面代码为什么就亮了3个答:0x7F, //"8"0x6F, //"9"0x77, //"A"0x7C, //"B"0x39, //"C"0x5E, //"D"0x79, //"E"0x71, //"F"0x76, //"H"0x38, //"L"0x37, //"n"0x3E, //"u"0x73, //"P"0x5C, //"o"0x40, //"-"0x00, //???0x00 //???};voi...
用51单片机八位共阴极数码管三极管,设计单片机动态扫描显示系统,八位...答:include <reg51.h> unsigned char code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};void show();void delay();void main(){ while(1)show();} void show(){ unsigned char i;for(i=0;i<8;++i){ P0=table[i+1];P2=~(0x01<...