单片机C51编程(C语言):实现学号的显示(学号是10位数字)答:你用什么驱动数码管呢?不同的驱动,程序写法不同。如果直接用I/O口驱动,8位数码管就这样写: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){ ucha...
请求一段单片机控制数码管的C语言编程答:include<reg52.h> define uchar unsigned char define uint unsigned int sbit dula=P2^6;sbit wela=P2^7;uchar num;uchar code table[]= {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x07,0x7d,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};//我用的是573 还有延时也很短你自己调下 数码管...