用c51写简易秒表程序,用四个LED数码显示,显示时间为00.00到99.99s,每0...答:include <reg52.h>#define u8 unsigned char#define u16 unsigned intsbit key1=P3^2;sbit key2=P3^3;sbit D0=P2^0;sbit D1=P2^1;sbit D2=P2^2;sbit D3=P2^3;u16 js;u8 js1;u8 zt=0;u8 ds[4];char flag; const u8 tab[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8...
用完整的汇编语言编写使数码管循环显示0,1,2,3,4,5,6,7,8,9的程序答:程序如下:/ 用P0口输出到数码管显示0-9 编写:jzy23 交流:[email protected] / include<reg52.h> define uint unsigned int define uchar unsigned char / 共阴数码管显示码 / uchar code display[10]= { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f };/ 延时函数 功...
求问程序,如何用两位数码管显示从00开始,到03,06,09,12.答:你要程序,也不给仿真图或原理图,只好画一个仿真图,采用两位静态显示数码管,按下面这个仿真图写的程序如下 include<reg51.h> unsigned char code tab[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};void delay(unsigned char x)//延时子程序 { unsigned int j;while(x--)...