main.c

来自「51单片机做的万年历」· C语言 代码 · 共 44 行

C
44
字号
#include <REGX51.H>
#include "delay.h"
#include "type.h"
#include "1602.h"
#include "wnl.h"
#include "display.h"
#include "interupt.h"    


static uchar code name[] = "Produced_by_Ken"  ;
static uchar code QQ[] = "QQ:184768514"  ;

sbit SET_SHIFT=P3^2;                    //日期时间闹钟调节选项按钮
sbit SET_DATA=P3^3;                     //日期时间闹钟调节内容按钮

uchar real_time[12],real_date[10];

uchar  status = 0;
uchar  mode = 0;


void main(void)
{ 
    char * time,*date;
    delay_ms(10);                       //启动等待,等TC1602讲入工作状态
    TC1602Init();                       //TC1602初始化
    //delay_ms(5);                        //延时5Ms

    Init_sys_timer();
    DisplayListChar(0,0,name);
    DisplayListChar(0,1,QQ);
    delay_ms(1000);
    WriteCommandTC1602(0x01,1); //显示清屏
    while(1)
    {
       
    }
}





⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?