电子万年历的设计毕业论文

湖北文理学院理工学院 附录1:程序

}

}

}

}

}

day=31;

write_nyrz(8,day); write_com(0x80+9); break;

case 6: month--;

if(month==0)

month=12;

write_nyrz(5,month); write_com(0x80+6); break;

case 7: year--;

if(year==-1)

year=99;

write_nyrz(2,year); write_com(0x80+3); break;

void main()//主函数 {

Initial(); lcdws=0; init(); while(1) {

keyscan();//按键扫描 if(flag==1)

湖北文理学院理工学院 附录1:程序

{ } else { }

tempchange(); for(i=10;i>0;i--) { }

dis_temp(get_temp());

write_1302(0x80,0x80);//时钟振荡器停止 miao=Read1302(0x81);//显示秒 write_sfm(6,miao);

fen=Read1302(0x83);//显示分 write_sfm(3,fen);

shi=Read1302(0x85);//显示小时 write_sfm(0,shi);

day=Read1302(0x87);//显示日 write_nyrz(8,day);

month=Read1302(0x89);//显示月 write_nyrz(5,month); year=Read1302(0x8d);//显示年 write_nyrz(2,year);

week=Read1302(0x8b);//显示日期 display_week(week);

} }

联系客服:779662525#qq.com(#替换为@)