freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[學士論文]畢業(yè)設(shè)計論文-基于單片機的具有語音報時電子鐘(編輯修改稿)

2025-02-14 13:14 本頁面
 

【文章內(nèi)容簡介】 *****************************************/void WriteByte( uint data ) //寫一個字節(jié)到1302{ //向DS1302寫入1B數(shù)據(jù)(內(nèi)部函數(shù)) int i。 unsigned int temp。 *P_IOA_Dir|=0x2000。 *P_IOA_Attrib|=0x2000。 temp=data。//ACC clr_CLK。nop()。nop()。 clr_IO。 nop()。 for(i=8。i0。i) { if(tempamp。0x0001) { set_IO。 nop()。nop()。 }//IO=ACC0 else { clr_IO。 nop()。 nop()。 } set_CLK。nop()。nop()。//CLK=1 clr_CLK。nop()。nop()。//CLK=0 temp=1。 }//for}/*****************************從DS1302讀出1B數(shù)據(jù)************************* 名稱: ReadByte()* 功能: 從DS1302讀出1B數(shù)據(jù)(內(nèi)部函數(shù))* 調(diào)用: 無* 輸入: 無* 返回值: 1B數(shù)據(jù)* 作者:廣西職業(yè)技術(shù)學院* 時間:***********************************************************************/uint ReadByte( void ) //從1302讀一個字節(jié){ //從DS1302讀出1B數(shù)據(jù)(內(nèi)部函數(shù)) int i。 unsigned int temp=0。 //設(shè)IOA14為輸入口 DS1302的IO口 *P_IOA_Diramp。=0xdfff。 *P_IOA_Attrib|=0x2000。 for(i=8。i0。i) { clr_CLK。 nop()。//CLK=0 temp=1。 tempamp。=0x7fff。 if(*P_IOA_Dataamp。0x2000)temp|=0x8000。nop()。 // 移植程序時,這個地方也要修改 set_CLK。 nop()。nop()。nop()。//CLK=1 }//for //將IOA14改回輸出口 DS1302的IO口 *P_IOA_Dir|=0x2000。 *P_IOA_Attrib|=0x2000。 temp=8。 tempamp。=0x00ff。 return temp。}/*******************************向DS1302寫入指令或數(shù)據(jù)******************** 名稱: void WriteDate(unsigned int add,unsigned int Date_temp)* 功能: 向DS1302寫入以add為地址的data數(shù)據(jù)* 調(diào)用: void WriteDate(unsigned int data)* 輸入: add,data* 返回值: 無* 作者:廣西職業(yè)技術(shù)學院* 時間:***********************************************************************/void WriteDate( uint Add , uint Date_temp ) {//add 為寫入數(shù)據(jù)的地址,data為要寫入的數(shù)據(jù)寫入單個的數(shù)據(jù) uint temp。 clr_RST。 nop()。 nop()。//RST=0 clr_CLK。 nop()。 nop()。//CLK=0 set_RST。 nop()。 nop()。//RST=1,啟動數(shù)據(jù)傳輸 WriteByte(Add)。 WriteByte(Date_temp)。 clr_RST。 nop()。nop()。//RST=0 }/******************************讀DS1302里對應(yīng)寄存器的數(shù)據(jù)**************** 名稱: unsigned int ReadDate(unsigned int add)* 功能: 從DS1302讀出以add為地址的數(shù)據(jù)* 調(diào)用: void ReadDate(unsigned int data) unsigned int WriteDate()* 輸入: add* 返回值: temp* 作者:廣西職業(yè)技術(shù)學院* 時間:***********************************************************************/uint ReadDate( uint Add ) {//add 為讀數(shù)據(jù)的地址 unsigned int temp。 clr_RST。 nop()。 nop()。//RST=0 clr_CLK。 nop()。 nop()。//CLK=0 set_RST。 nop()。 nop()。//RST=1,啟動數(shù)據(jù)傳輸 WriteByte(Add)。//寫入地址 temp=ReadByte()。 clr_RST。 nop()。nop()。//RST=0 return temp。}//////////////////////////////////////////// 鍵盤掃描/////////////////////////////////////////unsigned int key_disp(){unsigned int key_temp。unsigned char i,j。unsigned int a[]={0x00fe,0x00fd,0x00fb,0x00f7}。 //P2 = 0xf0。 *P_IOA_Dir|=0x00ff。 //置輸出 *P_IOA_Dataamp。=0xff00。 //清低八位 *P_IOA_Data|=0x00f0。 //置為0x00f0。 *P_IOA_Dir|=0x0000。 //置輸入 if((*P_IOA_Dataamp。0xf0)!=0xf0) { DelayMs(2)。 if((*P_IOA_Dataamp。0xf0)!=0xf0) { for(i=0。i4。i++) { *P_IOA_Dir|=0x00ff。 //置輸出 *P_IOA_Dataamp。=0xff00。 //清低八位 *P_IOA_Data|= a[i]。 //掃描 if((*P_IOA_Dataamp。0xf0)!=0xf0) { key_temp = *P_IOA_Dataamp。0xf0。 for(j=0。j4。j++) { if(!(key_tempamp。0x10)) break。 key_temp=1。 } while((*P_IOA_Dataamp。0xf0)!=0xf0){Display()。}//顯示 key_temp = i*4 + j。 if(key_temp9)key_temp = key_temp + 6。 return(i*4+j)。 } } } } return 21。} //////////////////////////////////////////////// 按鍵處理//////////////////////////////////////////////unsigned int key_process(){ unsigned int
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1