Bootstrap

简单51单片机数字钟

51单片机数字钟

#include <reg51.h>
sbit P3_3=P3^3; //定义按键
sbit P3_2=P3^2; //定义按键
///
void delay(unsigned long t)
{
    unsigned long i;
	for(i=0;i<t;i++) {
   ;}   //定义延时函数delay
}
///
unsigned char miao;   //定义秒    
unsigned char fen;    //定义分
unsigned char shi;    //定义时

void main()
{
     unsigned char led[10]={
   0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}<
;