久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

標題: 不知道問題出在哪里, 向高手請教 [打印本頁]

作者: condity    時間: 2009-9-19 23:54
標題: 不知道問題出在哪里, 向高手請教

由于剛學C語言編程,沒學匯編,對硬件不是太了解。這是用1302編時鐘程序;用Proteus仿真。我不知道問題出在哪里??向高手請教;
郁悶不知道怎么插入圖片。
void main()    
{
 init();  //初始化
 displayda();   //初始化 顯示;
// testdate();
 while(1)
 {
  displayda1();    //液晶顯示;
   keyTimeSet();   //鍵盤掃描;
  a=read_2401add(1);     //  加這句就出錯,液晶顯示不能做到一秒走一步;??????去掉正常;
                                     //讀出2401地址碼1的數據;
   k2=!k2;        //正常;P1^0口;
 }
}
uchar read_2401add(uchar address)//測試過讀取正常;
{
 uchar date2401;
 start();
 write_byte(0xa0);
 respons();
 write_byte(address);
 respons();
 start();
 write_byte(0xa1);
 respons();
 date2401=read_byte();
 stop(); 
 return date2401; 
}

void  displayda1()    液晶顯示;

{
  second = read1302(0x80);
  timestring[6] = (second&0xf0)>>4;
  timestring[7] = second&0x0f;
  lcddisplay_com(0x80+0x4b);  
  lcddisplay_date(timestring[6]+0x30);
  lcddisplay_date(timestring[7]+0x30);
   if(second==0)
   {
    minute = read1302(0x82);
     timestring[3] = (minute&0xf0)>>4;
     timestring[4] = minute&0x0f;
    lcddisplay_com(0x80+0x48);
   lcddisplay_date(timestring[3]+0x30);
   lcddisplay_date(timestring[4]+0x30);
  if(minute==0)
    {
     hour  = read1302(0x84);
         timestring[0] = (hour&0xf0)>>4;
      timestring[1] = hour&0x0f;
     lcddisplay_com(0x80+0x45);
    lcddisplay_date(timestring[0]+0x30);
    lcddisplay_date(timestring[1]+0x30);
   if(hour==0)
     {
          day  = read1302(0x86);
    week = read1302(0x8a);
    datestring[6] = (day&0xf0)>>4;
     datestring[7] = day&0x0f;
    lcddisplay_com(0x80+0x0a);
    lcddisplay_date(datestring[6]+0x30);
     lcddisplay_date(datestring[7]+0x30);
    lcddisplay_com(0x80+0x09+0x04);
    week=week&0x07;
    displayweek(week);
    if(day==1)
       {
         month  = read1302(0x88);
      datestring[3] = (month&0xf0)>>4;
        datestring[4] = month&0x0f;
      lcddisplay_com(0x80+0x07);
      lcddisplay_date(datestring[3]+0x30);
      lcddisplay_date(datestring[4]+0x30);
      if(month==1)
       {
        year  = read1302(0x8c);
        datestring[0] = (year&0xf0)>>4;
          datestring[1] = year&0x0f;
        lcddisplay_com(0x80+0x04);
        lcddisplay_date(datestring[0]+0x30);
        lcddisplay_date(datestring[1]+0x30);
       }
       }
     }
    }
   }
}


 






歡迎光臨 (http://www.zg4o1577.cn/bbs/) Powered by Discuz! X3.1
主站蜘蛛池模板: 国产精品免费一区二区三区四区 | 欧美片网站免费 | 国产玖玖 | 夜夜夜操 | 狠狠躁天天躁夜夜躁婷婷老牛影视 | 欧美日韩精品一区二区三区视频 | 欧美亚洲成人网 | 精品视频一区二区 | 免费看a| 午夜精品一区二区三区免费视频 | 亚洲香蕉 | 在线播放国产一区二区三区 | 少妇精品亚洲一区二区成人 | 色婷婷av一区二区三区软件 | 国产精品高清在线 | 日本高清中文字幕 | 鸡毛片 | 男女久久久 | 亚洲日韩欧美一区二区在线 | 欧美成人免费在线 | 天天澡天天狠天天天做 | 日韩电影一区 | 91色视频在线观看 | 亚洲每日更新 | 一区二区三区av | 毛片免费观看 | 国产精品久久久久久久久久久久久 | 久久不卡| 精品蜜桃一区二区三区 | 一区二区三区国产视频 | 免费骚视频 | 羞羞视频免费观看入口 | 久久久久国产精品午夜一区 | 精品日韩一区 | 男女视频在线观看网站 | 午夜在线影院 | 久久国内| 欧洲一区二区在线 | 美国av毛片| 中文字幕亚洲欧美日韩在线不卡 | 亚洲欧美在线一区 |