亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊(cè)

define

define,宏定義,C語言中預(yù)處理命令一種。分為無參宏定義和帶參宏定義。無參宏定義的一般形式為:#define宏名字符串;帶參宏定義的一般形式為:#define宏名(參數(shù)表)字符串;
  • this code define genetic programming tools and some applications

    this code define genetic programming tools and some applications

    標(biāo)簽: applications programming genetic define

    上傳時(shí)間: 2014-02-05

    上傳用戶:徐孺

  • 了解模數(shù)轉(zhuǎn)換器的噪聲、ENOB

    Abstract: Specifications such as noise, effective number of bits (ENOB), effective resolution, and noise-free resolution inlarge part define how accurate an ADC really is. Consequently, understanding the performance metrics related to noise isone of the most difficult aspects of transitioning from a SAR to a delta-sigma ADC. With the current demand for higherresolution, designers must develop a better understanding of ADC noise, ENOB, effective resolution, and signal-to-noiseratio (SNR). This application note helps that understanding.

    標(biāo)簽: ENOB 模數(shù)轉(zhuǎn)換器

    上傳時(shí)間: 2013-10-16

    上傳用戶:x18010875091

  • TLC2543 中文資料

    TLC2543是TI公司的12位串行模數(shù)轉(zhuǎn)換器,使用開關(guān)電容逐次逼近技術(shù)完成A/D轉(zhuǎn)換過程。由于是串行輸入結(jié)構(gòu),能夠節(jié)省51系列單片機(jī)I/O資源;且價(jià)格適中,分辨率較高,因此在儀器儀表中有較為廣泛的應(yīng)用。 TLC2543的特點(diǎn) (1)12位分辯率A/D轉(zhuǎn)換器; (2)在工作溫度范圍內(nèi)10μs轉(zhuǎn)換時(shí)間; (3)11個(gè)模擬輸入通道; (4)3路內(nèi)置自測試方式; (5)采樣率為66kbps; (6)線性誤差±1LSBmax; (7)有轉(zhuǎn)換結(jié)束輸出EOC; (8)具有單、雙極性輸出; (9)可編程的MSB或LSB前導(dǎo); (10)可編程輸出數(shù)據(jù)長度。 TLC2543的引腳排列及說明    TLC2543有兩種封裝形式:DB、DW或N封裝以及FN封裝,這兩種封裝的引腳排列如圖1,引腳說明見表1 TLC2543電路圖和程序欣賞 #include<reg52.h> #include<intrins.h> #define uchar unsigned char #define uint unsigned int sbit clock=P1^0; sbit d_in=P1^1; sbit d_out=P1^2; sbit _cs=P1^3; uchar a1,b1,c1,d1; float sum,sum1; double  sum_final1; double  sum_final; uchar duan[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; uchar wei[]={0xf7,0xfb,0xfd,0xfe};  void delay(unsigned char b)   //50us {           unsigned char a;           for(;b>0;b--)                     for(a=22;a>0;a--); }  void display(uchar a,uchar b,uchar c,uchar d) {    P0=duan[a]|0x80;    P2=wei[0];    delay(5);    P2=0xff;    P0=duan[b];    P2=wei[1];    delay(5);   P2=0xff;   P0=duan[c];   P2=wei[2];   delay(5);   P2=0xff;   P0=duan[d];   P2=wei[3];   delay(5);   P2=0xff;   } uint read(uchar port) {   uchar  i,al=0,ah=0;   unsigned long ad;   clock=0;   _cs=0;   port<<=4;   for(i=0;i<4;i++)  {    d_in=port&0x80;    clock=1;    clock=0;    port<<=1;  }   d_in=0;   for(i=0;i<8;i++)  {    clock=1;    clock=0;  }   _cs=1;   delay(5);   _cs=0;   for(i=0;i<4;i++)  {    clock=1;    ah<<=1;    if(d_out)ah|=0x01;    clock=0; }   for(i=0;i<8;i++)  {    clock=1;    al<<=1;    if(d_out) al|=0x01;    clock=0;  }   _cs=1;   ad=(uint)ah;   ad<<=8;   ad|=al;   return(ad); }  void main()  {   uchar j;   sum=0;sum1=0;   sum_final=0;   sum_final1=0;    while(1)  {              for(j=0;j<128;j++)          {             sum1+=read(1);             display(a1,b1,c1,d1);           }            sum=sum1/128;            sum1=0;            sum_final1=(sum/4095)*5;            sum_final=sum_final1*1000;            a1=(int)sum_final/1000;            b1=(int)sum_final%1000/100;            c1=(int)sum_final%1000%100/10;            d1=(int)sum_final%10;            display(a1,b1,c1,d1);           }         } 

    標(biāo)簽: 2543 TLC

    上傳時(shí)間: 2013-11-19

    上傳用戶:shen1230

  • MEGA16制作的電子時(shí)鐘(附仿真圖+源代碼)

    #include <iom16v.h> #include <macros.h> #define uchar unsigned char #define uint unsigned int uchar num,miao,fen,shi,miaoge,miaoshi,fenge,fenshi,shig

    標(biāo)簽: MEGA 16 電子時(shí)鐘 仿真圖

    上傳時(shí)間: 2013-10-14

    上傳用戶:sc965382896

  • AVR單片機(jī)數(shù)碼管秒表顯示

    #include<iom16v.h> #include<macros.h> #define uint unsigned int #define uchar unsigned char uint a,b,c,d=0; void delay(c) { for for(a=0;a<c;a++) for(b=0;b<12;b++); }; uchar tab[]={ 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,

    標(biāo)簽: AVR 單片機(jī) 數(shù)碼管

    上傳時(shí)間: 2013-10-21

    上傳用戶:13788529953

  • c51流水燈仿真與程序

    對(duì)應(yīng)程序: #include<reg52.h> #define uint unsigned int #define uchar unsigned char uchar code tab[]={ 0x81, 0x42, 0x24, 0x18, }; void delay(uint z) { uint i,j; for(i=z;i>0;i--) for(j=120;j>0;j--); } void init() { P0=0x00; }

    標(biāo)簽: c51 流水燈 仿真 程序

    上傳時(shí)間: 2014-01-17

    上傳用戶:ruan2570406

  • ucos在ATMEGA128L上的移植

    和其他的μC/OS-II移植文件類似,設(shè)備代碼由以下3 到5 個(gè)文件組成的。 Os_cpu.h Os_cpu_c.c Os_cpu_a.s90 (該文件僅在ICC 編譯器中使用) Os_cpu_i.s90 (該文件僅在ICC 編譯器中使用) Os_dbg.c Os_dbg.c 僅需在IAR 工程中使用。 3.01 OS_CPU.H 3.01.01 OS_CPU.H, macros for ‘externals’ Listing 3-1, OS_CPU.H, 外部宏(macros for ‘externals’) #ifdef OS_CPU_GLOBALS #define OS_CPU_EXT #else #define OS_CPU_EXT extern #endif  

    標(biāo)簽: ATMEGA ucos 128L 128

    上傳時(shí)間: 2013-11-25

    上傳用戶:zhaistone

  • 單片機(jī)幾種軟件濾波程序示例

    假定從8位AD中讀取數(shù)據(jù)(如果是更高位的AD可定義數(shù)據(jù)類型為int),子程序?yàn)間et_ad(); 1、限幅濾波法(又稱程序判斷濾波法)     A、方法:         根據(jù)經(jīng)驗(yàn)判斷,確定兩次采樣允許的最大偏差值(設(shè)為A)         每次檢測到新值時(shí)判斷:         如果本次值與上次值之差<=A,則本次值有效         如果本次值與上次值之差>A,則本次值無效,放棄本次值,用上次值代替本次值     B、優(yōu)點(diǎn):         能有效克服因偶然因素引起的脈沖干擾     C、缺點(diǎn)         無法抑制那種周期性的干擾         平滑度差 /*  A值可根據(jù)實(shí)際情況調(diào)整     value為有效值,new_value為當(dāng)前采樣值      濾波程序返回有效的實(shí)際值  */ #define A 10 char value; char filter() {    char  new_value;    new_value = get_ad();    if ( ( new_value - value > A ) || ( value - new_value > A )       return value;    return new_value;          } 2、中位值濾波法     A、方法:         連續(xù)采樣N次(N取奇數(shù))         把N次采樣值按大小排列         取中間值為本次有效值     B、優(yōu)點(diǎn):         能有效克服因偶然因素引起的波動(dòng)干擾         對(duì)溫度、液位的變化緩慢的被測參數(shù)有良好的濾波效果     C、缺點(diǎn):         對(duì)流量、速度等快速變化的參數(shù)不宜 /*  N值可根據(jù)實(shí)際情況調(diào)整     排序采用冒泡法*/

    標(biāo)簽: 單片機(jī) 軟件濾波 程序

    上傳時(shí)間: 2014-12-26

    上傳用戶:nanshan

  • 51單片機(jī)實(shí)現(xiàn)的RS485通訊程序

      #ifndef __485_C__   #define __485_C__   #include   #include   #define unsigned char uchar   #define unsigned int uint   /* 通信命令 */   #define __ACTIVE_ 0x01 // 主機(jī)詢問從機(jī)是否存在   #define __GETDATA_ 0x02 // 主機(jī)發(fā)送讀設(shè)備請(qǐng)求   #define __OK_ 0x03 // 從機(jī)應(yīng)答   #define __STATUS_ 0x04 // 從機(jī)發(fā)送設(shè)備狀態(tài)信息   #define __MAXSIZE 0x08 // 緩沖區(qū)長度   #define __ERRLEN 12 // 任何通信幀長度超過12則表示出錯(cuò)   uchar dbuf[__MAXSIZE]; // 該緩沖區(qū)用于保存設(shè)備狀態(tài)信息   uchar dev; // 該字節(jié)用于保存本機(jī)設(shè)備號(hào)   sbit M_DE = P1^0; // 驅(qū)動(dòng)器使能,1有效   sbit M_RE = P1^1; // 接收器使能,0有效

    標(biāo)簽: 485 RS 51單片機(jī) 通訊程序

    上傳時(shí)間: 2014-12-26

    上傳用戶:604759954

  • ds18b20程序

      /通過DS18B20測試當(dāng)前環(huán)境溫度, 并通過數(shù)碼管顯示當(dāng)前溫度值, 目前顯示范圍: 0.0~ +99.9度   #include   #include   #define uchar unsigned char   #define uint unsigned int   #define DATAPORT P0 //定義P0口為Led數(shù)據(jù)口   //#define SETTEMP P1 //定義P1口為設(shè)定溫度   #define SELECT P2 //定義P2口為選擇信號(hào)   sbit L1 = P1^1; //燈作為電機(jī)   sbit L2 = P1^2;   sbit L3 = P1^3;

    標(biāo)簽: 18b b20 ds 18

    上傳時(shí)間: 2013-11-04

    上傳用戶:liulinshan2010

主站蜘蛛池模板: 富锦市| 霸州市| 宝坻区| 道孚县| 绥芬河市| 固镇县| 家居| 康定县| 右玉县| 泗水县| 青龙| 滨海县| 石景山区| 海城市| 长沙市| 静安区| 永川市| 大洼县| 万盛区| 英吉沙县| 新密市| 漳州市| 临清市| 资中县| 永靖县| 虹口区| 普格县| 皋兰县| 米林县| 遂平县| 泌阳县| 陆川县| 荆门市| 阿合奇县| 江津市| 阆中市| 合阳县| 皮山县| 梁山县| 汪清县| 通州市|