51单片机数码管0832烟雾报警器的编程程序答:0x3f,6,0x5b,0x4f,0x66,0x6d,0x7d,7,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71 };void disly(){ P2_2=0;P2_3=1;P2_4=1;P2_5=1;P0=tab1[ge];delay1ms();P2_2=1;P2_3=0;P2_4=1;P2_5=1;P0=tab1[shi];delay1ms();P2_2=1;P2_3=1;P2_4=0;P2_5=1;P0=...
怎么用单片机实现6位led数码管显示?答:用仿真实现,采用6位一体的共阴数码管,P0口输出段码,P2口输出位码。仿真图如下:程序如下 include <reg51.h> include <intrins.h> define uint unsigned int define uchar unsigned char uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,//0~9段码 0x77,0x7...
单片机温度检测的程序?答:include <reg51.h> include <intrins.h> define uint unsigned int define uchar unsigned char sbit DQ = P3^6;uchar code DSY_CODE[] = { 0X3F,0X06,0X5B,0X4F,0X66,0X6D,0X7D,0X07,0X7F,0X6F,0X00};uchar code df_Table[] = {0,1,1,2,3,3,4,4,5,6,6,7,8,8,9,9}...
51单片机共阴数码管利用静态显示,让六个数码管显示1~6,程序怎么写?答:首先把位选打开,送入位选数据后,关闭锁存器,实现锁存,进入循环,随之打开段选锁存器,送入段选数据后,再次关闭段选。 接下来,这个延时操作对于实际看到数码管的显示效果特别重要,因为程序在段选后之后,会马上消隐,显示的时间之后几个微秒,这显然不太合理,需要在关闭段选后加上延时,这样一来,才会让每位数码管亮...
利用51单片机,6个数码管设计一秒表。要求:刚开始时间为12点(120000...答:include<reg52.h> include<intrins.h> define uchar unsigned char define uint unsigned int define show P2 code table[16]= { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71 };code tuble[9]= { 0x00,0x7f,0xbf,0xdf,0xef,0xf7,0x...
单片机89c51一个6位LED数码管显示功能 程序,希望能准确点的程序,只显...答:void delay(unsigned int i); //函数声名 char DelayCNT;//定义变量 //此表为 LED 的字模, 共阴数码管 0-9 - unsigned char code Disp_Tab[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40}; //段码控制 //此表为8个数码管位选控制, 共阴数码管 1-...