...具有时、分、秒计时功能和8位数码管显示功能,显示格式为:“时-分...答:这是一个秒表的例子,稍微做一下tt0参数就可以当作时钟了,而且还有按键控制 暂停,清零等功能 include<reg51.h> define uint unsigned int define uchar unsigned char sbit key1=P3^0;sbit key2=P3^1;uchar tt0,pin,fen,miao,pin1,fen1,miao1,pin2,fen2,miao2;uchar code table[]={0xc0...
C51单片机:用数码管显示0到999的值。求c语言程序和原理图答:int key1,key,disbuf;// 此表为 LED 的字模 0 1 2 3 4 5 6 7 8 9 a b c d e f unsigned char code LED7Code[] = {0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71};unsigned char ledx[8];bit s0,s1;void delay(uchar z...
单片机C51编程(C语言):实现学号的显示(学号是10位数字)答:wei=位选 duan=段选 //断码表 uchar code shuzi[12]={0xc0,0xf9,0xa4,0xb0,0x99,//0,1,2,3,4,0x92,0x82,0xf8,0x80,0x90,//5,6,7,8,9,0x00,0xff};void led_scan(void){ uchar i,j;//共阳数码管 wei=0xff;j=0x01;for(i=0;i<8;i++){ duan=shuzi[i];wei=!j...
c51数码管显示数据程序答:单个数码管0-f循环显示程序以及PROTUES的仿真电路图,希望对你有用 include <reg51.h> define uchar unsigned char define uint unsigned int uchar code Pattern_P2[]= { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71 };void delay(uint ms)...
、编写静态数码管显示的C51程序。功能要求:实验板上最后一个静态数码管...答:以下是一份简单的C51程序,能够实现静态数码管的显示:```c include <reg51.h> // 数码管码表 unsigned char code LED[] = { 0xc0, 0xf9, 0xa4, 0xb0, 0x99,0x92, 0x82, 0xf8, 0x80, 0x90 };void delay(unsigned int t) { unsigned int i, j;for (i = 0; i < t; i++...