音影先锋亚洲天堂网|电影世界尽头的爱完整版播放|国产 熟女 91|高清无码免费观看欧美日韩|韩国一区二区三区黄色录像|美女亚洲加勒比在线|亚洲综合网 开心五月|7x成人在线入口|成人网站免费日韩毛片区|国产黄片?一级?二级?三级

登錄 免費注冊 首頁 | 行業(yè)黑名單 | 幫助
維庫電子市場網(wǎng)
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng)
驅(qū)動編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機 | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計 | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe

哪位大蝦幫我看看這段程序

作者:qioujw 欄目:ARM技術(shù)
哪位大蝦幫我看看這段程序
#include "..\inc\lcd320.h"
#include "..\inc\44b.h"
#include"..\inc\44blib.h"
#include "..\inc\option.h"
#include"..\inc\def.h"
extern int LCDCurrentPrnTxt;
extern int LCD_start_AddressX;
extern int LCD_txt_Start_Address;
extern int LCD_start_AddressY;
void Set_Rtc(U8 yea, U8 mon, U8 dat, U8 hou, U8 min, U8 sec);
void Display_Rtc(void);
int Main(int argc, CHAR **argv)
{
rPCONG=0x5fff;
rPUPG=0xc0;  
rPDATG=0xc0;   
Led_Display(0x0);
Delay(2000);
Led_Display(0x3);
         LCD_Init();
        Set_Rtc(05, 04, 04, 18, 03, 00);
   
        while(1)
{   
Display_Rtc();
}
return 0;
}

void Set_Rtc(U8 yea, U8 mon, U8 dat, U8 hou, U8 min, U8 sec)
{
       U8 a,b,c,d,e,f;
       rRTCCON=0x01;

       rBCDYEAR=yea;//( ((yea/10)<<4) + (yea%10) );
       a=rBCDYEAR;
       rBCDMON=mon;//( ((mon/10)<<4) + (mon%10) );
       b=rBCDMON;
       rBCDDATE=dat;//( ((dat/10)<<4) + (dat%10) );
       c=rBCDDATE;
       rBCDHOUR=hou;//( ((hou/10)<<4) + (hou%10) );
       d=rBCDHOUR;
       rBCDMIN=min;//( ((min/10)<<4) + (min%10) );
       e=rBCDMIN;
       rBCDSEC=sec;//( ((sec/10)<<4) + (sec%10) );   
       f= rBCDSEC;

       rRTCCON=0x00;
}

void Display_Rtc(void)

{  U8 year,month,day,weekday,hour,minute,second;
    rRTCCON =0x01; // R/W, 1/32768, Normal(merge), No reset

   while(1)
       {year =rBCDYEAR;
        month=rBCDMON;
        day=rBCDDAY;
        weekday=rBCDDATE;
         hour=rBCDHOUR;
minute=rBCDMIN;
second=rBCDSEC;
        if(second!=0)break; // &Egrave;&ccedil;&sup1;&ucirc;&reg;”&Ccedil;°&Atilde;&euml;&Ouml;&MICRO;&Ecirc;&Ccedil;0&Atilde;&euml;&pound;&not;&#8222;t&Ograve;&ordf;&Ccedil;ó&Ouml;&Oslash;&ETH;&Acirc;×x&Ograve;&raquo;&acute;&Icirc;RTC
        }

       LCD_Printfnum(1,1,year);
       LCD_Printfnum(1,5,month);
       LCD_Printfnum(1,9,day);
   
        LCD_Printfnum(2,1,hour);
        LCD_Printfnum(2,5,minute);
        LCD_Printfnum(2,9,second);
rRTCCON =0x00; // êPé]R/W
}


怎么讀不出實踐時鐘;顯示函數(shù)是對的!

如果知道請發(fā)qioujw@163.com


參與討論
昵稱:
討論內(nèi)容:
 
 
相關(guān)帖子
TI的OMAP系列性能好,在想可以用他來搞一個什么東西賣賣。
S3C44B0X支持多機通信嗎?
請教設(shè)計ARM內(nèi)核的MCU芯片問題
【請教】請教一下,怎么使用開發(fā)板? (micetek的EV40)
哪位大哥有標(biāo)準(zhǔn)的SPI及其規(guī)范  謝謝!
免費注冊為維庫電子開發(fā)網(wǎng)會員,參與電子工程師社區(qū)討論,點此進(jìn)入


Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號