【文件属性】:
文件名称:80c51 C51电子钟
文件大小:3KB
文件格式:C
更新时间:2011-10-16 12:45:01
89s51 c51 keil 单片机 电子钟
80c51 c语言电子钟
#include
#include
unsigned char data dis_digit;
unsigned char key_s, key_v;
unsigned char code dis_code[11]={0xc0,0xf9,0xa4,0xb0, // 0, 1, 2, 3
0x99,0x92,0x82,0xf8,0x80,0x90, 0xff};// 4, 5, 6, 7, 8, 9, off
unsigned char data dis_buf[8];
unsigned char data dis_index;
unsigned char hour,min,sec;
unsigned char sec100;
sbit K1 = P1^0;
sbit K2 = P1^1;
//sbit JJ=P2^0;
bit scan_key();
void proc_key();
void inc_sec();
void inc_min();
void inc_hour();
void display();
void delayms(unsigned char ms);