【文件属性】:
文件名称:闹铃时钟的c语言程序
文件大小:12KB
文件格式:C
更新时间:2012-08-08 04:55:49
闹铃时钟 c语言
#include
#include //内部函数,包含_nop_()空函数指令
#define uchar unsigned char
#define uint unsigned int
sbit RS = P1^0; // 定义LCD模块控制引脚
sbit RW = P1^1;
sbit E = P1^2;
sbit Y=P2^1;
#define DataPort P0 //定义LCD模块数据端口
#define Busy 0x80 //忙标志,D7位为1说明忙
uchar Xpos; //列方向地址指针
uchar Ypos; //行方向地址指针
uchar code table[]={0x30,0x31,0x32,0x33,0x34,0x35,
0x36,0x37,0x38,0x39,0x52,0x20};
uchar cg=0;//闹钟标志位
uchar shi=0,fen=0,miao=0,month=11,day=7,week=5;
int year=2009;
uchar qian,bai,sh,ge,m1,m2,n1,n2,n3,n4,y1,y2,d1,d2;
uchar C_shi=0,C_fen=0,C_miao=0;
uchar M=0;
uchar k,key;
int tt=0;