單片機(jī)設(shè)計(jì)LCD數(shù)字鐘(萬年歷)
delay(2);
lcd_w_dat('-');
delay(2);
lcd_w_dat(lcdd[day/10]);
delay(2);
lcd_w_dat(lcdd[day%10]);
delay(2);
}
/*第二行顯示時(shí)間、星期函數(shù)*/
void dispt()
{
lcd_w_cmd(0x0c); //設(shè)置光標(biāo)不顯示、不閃爍
delay(20);
lcd_w_cmd(0xc3); //第二行起始顯示地址0x80+0x43
delay(20);
lcd_w_dat(lcdd[hour/10]);
delay(2);
lcd_w_dat(lcdd[hour%10]);
delay(2);
lcd_w_dat(':');
delay(2);
lcd_w_dat(lcdd[min/10]);
delay(2);
lcd_w_dat(lcdd[min%10]);
delay(2);
lcd_w_dat(':');
delay(2);
lcd_w_dat(lcdd[sec/10]);
delay(2);
lcd_w_dat(lcdd[sec%10]);
delay(2);
lcd_w_dat(' ');
delay(2);
lcd_w_dat('W');
delay(2);
lcd_w_dat(lcdd[week]);
delay(2);
}本文引用地址:http://m.butianyuan.cn/article/172587.htm
評(píng)論