//芯片資料請到www.elecfans.com查找 //DS1820 C51 子程序//這里以11.0592M晶體為例,不同的晶體速度可能需要調整延時的時間//sbit DQ =P2^1;//根據實際情況定義端口 typedef unsigned char byte;typedef unsigned int word; //延時void delay(word useconds){ for(;useconds>0;useconds--);} //復位byte ow_reset(void){ byte presence; DQ = 0; //pull DQ line low delay(29); // leave it low for 480us DQ = 1; // allow line to return high delay(3); // wait for presence presence = DQ; // get presence signal delay(25); // wait for end of timeslot return(presence); // presence signal returned} // 0=presence, 1 = no part //從 1-wire 總線上讀取一個字節byte read_byte(void){ byte i; byte value = 0; for (i=8;i>0;i--) { value>>=1; DQ = 0; // pull DQ low to start timeslot DQ = 1; // then return high delay(1); //for (i=0; i<3; i++); if(DQ)value|=0x80; delay(6); // wait for rest of timeslot } return(value);} //向 1-WIRE 總線上寫一個字節void write_byte(char val){ byte i; for (i=8; i>0; i--) // writes byte, one bit at a time { DQ = 0; // pull DQ low to start timeslot DQ = val&0x01; delay(5); // hold value for remainder of timeslot DQ = 1; val=val/2; } delay(5);} //讀取溫度char Read_Temperature(void){ union{ byte c[2]; int x; }temp; ow_reset(); write_byte(0xCC); // Skip ROM write_byte(0xBE); // Read Scratch Pad temp.c[1]=read_byte(); temp.c[0]=read_byte(); ow_reset(); write_byte(0xCC); //Skip ROM write_byte(0x44); // Start Conversion return temp.x/2;}
上傳時間: 2013-11-03
上傳用戶:hongmo
load initial_track s; % y:initial data,s:data with noiseT=0.1; % yp denotes the sample value of position% yv denotes the sample value of velocity% Y=[yp(n);yv(n)];% error deviation caused by the random acceleration % known dataY=zeros(2,200);Y0=[0;1];Y(:,1)=Y0;A=[1 T 0 1]; B=[1/2*(T)^2 T]';H=[1 0]; C0=[0 0 0 1];C=[C0 zeros(2,2*199)];Q=(0.25)^2; R=(0.25)^2;
上傳時間: 2014-12-28
上傳用戶:asaqq
Contents 1 Introduction 1 2 Glosary 1 2.1 Concepts 1 2.2 Abbreviations and acronyms 4 3 Capabilities 6 4 Technical Description 6 4.1 General 6 4.2 Service oriented Allocation of Resources on the Abis interface (SARA) 8 4.3 Configuration of dedicated PDCHs in Packet Switched Domain (PSD) 10 4.4 Handling of Packet Data traffic 15 4.5 Channel selection in Cicuit Switched Domain (CSD) 19 4.6 Return of PDCHs to Cicuit Switched Domain (CSD) 22 4.7 Main changes in Ericsson GSM system R10/BSS R10 24 5 Engineering guidelines 24 6 Parameters 26 6.1 Main controlling parameters 26 6.2 Parameters for special adjustments 26 6.3 Value ranges and default values 28 7 References 29
上傳時間: 2013-11-12
上傳用戶:ainimao
C語言函數大全,已包含絕大部分的函數。每個函數包含函數名,功能,用法,舉例,內容詳盡。希望對大家有所幫助~~ 函數名: abort 功 能: 異常終止一個進程 用 法: void abort(void); 程序例: #include #include int main(void) { printf("Calling abort()\n"); abort(); return 0; /* This is never reached */ } 函數名: abs 功 能: 求整數的絕對值 用 法: int abs(int i); 程序例: #include #include int main(void) { int number = -1234; printf("number: %d absolute value: %d\n", number, abs(number)); return 0; }
上傳時間: 2013-12-06
上傳用戶:feifei0302
1. 簡介 ISIS中的屬性有非常大的用處。一個特定的對象的屬性是由一些關鍵字組成,比如,在ISIS中,我們使用封裝的屬性與PCB的封裝關聯。 對象,管腳,電路圖都有自己的屬性,如果你想很把這個功能強大的軟件用好你必須很清楚他們之間的聯系,這個軟件和以前你所用過的畫電路的軟件有些不同。 2. 對象屬性 對象屬性有兩個類型—系統屬性和使用屬性。在ISIS中的這些功能是由一些保留字所組成,不管是內部的程序比如ARES和VSM,或者你自己所使用的軟件都是有關聯的。 (1)系統屬性 系統屬性在ISIS中是由一些特殊含義的關鍵字所夠成。比如,一個元件中的DEVICE屬性是根據元件庫在分配時候定義的。這些屬性一般是文本的—比如元件的REF和VALUE屬性可以直接從Edit Component對話框中訪問,但是別的比如DEVICE屬性就是做為圖形操作所生成的結果。
上傳時間: 2013-11-22
上傳用戶:AbuGe
如何把由Protel99se PCB轉換的PADS PCB的元件加上Value屬性
上傳時間: 2013-11-14
上傳用戶:jshailingzzh
1. 簡介 ISIS中的屬性有非常大的用處。一個特定的對象的屬性是由一些關鍵字組成,比如,在ISIS中,我們使用封裝的屬性與PCB的封裝關聯。 對象,管腳,電路圖都有自己的屬性,如果你想很把這個功能強大的軟件用好你必須很清楚他們之間的聯系,這個軟件和以前你所用過的畫電路的軟件有些不同。 2. 對象屬性 對象屬性有兩個類型—系統屬性和使用屬性。在ISIS中的這些功能是由一些保留字所組成,不管是內部的程序比如ARES和VSM,或者你自己所使用的軟件都是有關聯的。 (1)系統屬性 系統屬性在ISIS中是由一些特殊含義的關鍵字所夠成。比如,一個元件中的DEVICE屬性是根據元件庫在分配時候定義的。這些屬性一般是文本的—比如元件的REF和VALUE屬性可以直接從Edit Component對話框中訪問,但是別的比如DEVICE屬性就是做為圖形操作所生成的結果。
上傳時間: 2014-03-27
上傳用戶:wangfei22
sniffer for win 2k/><P 用winrar解壓
上傳時間: 2013-12-23
上傳用戶:66666
C.P.Sub公告系統 v2.26
上傳時間: 2013-12-19
上傳用戶:dengzb84
Use P/Invoke to Develop a .NET Base Class Library for Serial Device Communications
標簽: Communications Develop Library Invoke
上傳時間: 2014-12-21
上傳用戶:zjf3110