已通过proteus仿真,电路图如下所示,希望大家多多指点,积极留言:
//编程:jumpmysoul
#include
#define ulong unsigned long
char tab[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};//共阳数码管数字码
char tab_dp[10]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x70,0x10};//共阳数码管数字码(带小数点)
#define LED P0
#define LIGHT P1
#define WS P2
sbit time_change=P3^0;
sbit time_choose=P3^1;
sbit time_inc=P3^2;
sbit time_ok=P3^3;
ulong t;
ulong sec,min,hour,sec_ge,sec_shi,min_ge,min_shi,hour_ge,hour_shi;
int choose_n;
int flag;
//---------------------------------------------------------------------
void init();
void display();
void delay(int);
void time_modify();
//---------------------------------------------------------------------
void main()
{
}
//---------------------------------------------------------------------
void init()
{
}
//--------------------------------延时子函数------------------------------------
void delay(int x)
{
}
//-------------------------------显示子函数---------------------------------------
void display()
{
}
//----------------------------调时子程序-------------------------------
void time_modify()
{
}
上一篇:51单片机C编程(五、矩阵键盘扫描加显示)
下一篇:51单片机C编程(七、5个IO口扫描10个按键)
推荐阅读最新更新时间:2024-03-16 14:33