如何用51单片机用单数码管做9s的简易秒表?答:假设P0接数码管,程序如下:include<reg52.h> define uchar unsigned char define uint unsigned int uchar a=0;uchar b=9;//共阴数码管七段码 uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x77};void delay(uchar aa)//延时子程序 { uchar bb,cc;fo...
利用51单片机,6个数码管设计一秒表。要求:刚开始时间为12点(120000...答: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,0xfb,0xfd,0xfe };u...
51单片机 秒表设计答:// 51单片机 秒表,显示时间为0000—9999秒,启动、停止,(停止后再次启动复位)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};uchar bai,shi;uint...
单片机AT89C51芯片完成简易秒表的设计(三个8字数码管从0~999秒)设置一...答:unsigned char key_s, key_v;unsigned char code dis_code[11]={0xc0,0xf9,0xa4,0xb0, // 0, 1, 2, 3 0x99,0x92,0x82,0xf8,0x80,0x90, 0xff};// 4, 5, 6, 7, 8, 9, off unsigned char dis_buf[8]; // 显示缓冲区 unsigned char sec_bcd[8]; // 秒计数值, ...
如何用C51单片机做出以下程序 “秒表是倒计时,从100秒开始倒计时 用数...答:假设P0 P2接数码管,静态驱动,程序如下:include<reg52.h> define uchar unsigned char define uint unsigned int uchar num=100;uchar time=0;//共阴数码管七段码 uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x77};void Delay1ms(uint i) //1ms延时...