#include
#define uchar unsigned char
#define uint unsigned int
sbit dula=P2^6;
sbit wela=P2^7;
uchar code table[]={ //编码表
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71,
0x76,0x79,0x38,0x3f,0};
uchar temp,t0,t1,bai,shi,ge,flag,flag1; //flag
uint shu;
void init();
void display(uchar,uchar,uchar,uchar,uchar,uchar);
void delay(uint z)
{
}
void main()
{
}
void init()
{
}
void timer0() interrupt 1
{
}
void timer1() interrupt 3
{
}
void display(uchar aa,uchar bb,uchar cc,uchar ba,uchar sh,uchar g)
{
}
以上代码来源于网络,仅供参考,我看了遍觉得可以学学。
关键字:51单片机 数码管 二极管『本文转载自网络,版权归原作者所有,如有侵权请联系删除』