【正文】
那些曾經(jīng)所謂的非做不可,只是青蔥年華里自己給自己注射的一支強(qiáng)心劑,或者說(shuō),是自以為是的精神寄托罷了。s time, your ideas are always special to clear. Want, want, line is clear, as if nothing could shake his. Also once seemed to be determined to do something, but more often is he backed out at last. Dislike his cowardice, finally found that there are a lot of love, there are a lot of miss, like shadow really have been doomed. Those who do, just green years oneself give oneself an arm injection, or is a selfrighteous spiritual. 一個(gè)人的時(shí)候,自己的想法總是特別地清晰。t want to give vent to out your inner voice can be in the high school children of the feelings in a period, but was eventually infarction when graduation party in the throat, later again stood on the pitch he has sweat profusely, looked at his thrown a basketball hoops, suddenly found himself has already can39。 The end of our life, and can meet many things really do? 而窮盡我們的一生,又能遇到多少事情是真正地非做不可? During my childhood, think lucky money and new clothes are necessary for New Year, but as the advance of the age, will be more and more found that those things are optional。 May be back in the past, to oneself the paranoid weird belief disillusionment, these days, my mind has been very messy, in my mind constantly. Always feel oneself should go to do something, or write something. Twenty years of life trajectory deeply shallow, suddenly feel something, do it. 一字開頭的年齡已經(jīng)到了尾聲。s 21 win. Michel Platini, president of European football39。s antiracism taskforce, is in London for the Football Association39。t agree with the disciplinary action your employer has taken against you ? your employer dismisses you and you think that you have been dismissed unfairly. For more information about dismissal and unfair dismissal, see Dismissal. You can make a claim to an employment tribunal, even if you haven39。 a=0。TH1=0。 P0=ktemp。 else if(P0==0x7f)i=0。 else if(P0==0xf7)i=4。 ktemp=P0。 if(timer==800)//控制數(shù)碼管的閃動(dòng)效果 { if(choose !=0) flash=~flash。 if((P1amp。 while(1) { Scan()。 // Skip ROM write_byte(0x44)。 河南工業(yè)職業(yè)技術(shù)學(xué)院 —— 基于 51 單片機(jī)的數(shù)字頻率計(jì) 26 Dat_Int()。STA=0。 break。 else collect_time[0]=16。 case 4 :if(fd==0) collect_time[1] |= 0x09。 break。 if(sg==2amp。 河南工業(yè)職業(yè)技術(shù)學(xué)院 —— 基于 51 單片機(jī)的數(shù)字頻率計(jì) 25 break。keyboard==1) { RdefineT1。 } } if(DEC==0amp。 else {collect_time[0]++。 else {collect_time[0]+=16。 else {collect_time[1]++。 else {collect_time[1]+=16。 else {collect_time[2]++。 if((sg=2)amp。 case 2 :if((sg2)amp。 switch (choose) 河南工業(yè)職業(yè)技術(shù)學(xué)院 —— 基于 51 單片機(jī)的數(shù)字頻率計(jì) 24 { case 1 :if(sg==2) collect_time[2] = collect_time[2]amp。keyboard==1) //檢測(cè)加調(diào)整鍵有無(wú)按下,并進(jìn)行相應(yīng)操作 { if(ADD==0amp。 STA=1。 while(SET==0)。keyboard==1) //檢測(cè)設(shè)置鍵有無(wú)按下,并進(jìn)行相應(yīng)操作 { if(SET==0amp。 display[6] = num[(uchar)((lstemp)/10)]。 TR0=1。break。break。break。 display[5] = num[md]。 display[1] = num[sd]。 uint lstemp。 RW_DS1302(0x82,receive[1])。//格式為 : 秒 分 時(shí) ucCurtime[1] = Read_DS1302(0x83)。 S_CLK。 C_CLK。 S_CLK。 C_CLK。 if(DS_IO!=0) temp|=(1i)。 uchar temp=0。 S_CLK。 for(i=8。 //溫度低 8位 collect_temperature[1]=read_byte()。 // 發(fā)轉(zhuǎn)換命令 ow_reset()。 return(value)。_nop_()。 //4us DS18B20 = 1。 // _nop_()。_nop_()。 uchar value = 0。 //66us val=val/2。_nop_()。_nop_()。 i) // 河南工業(yè)職業(yè)技術(shù)學(xué)院 —— 基于 51 單片機(jī)的數(shù)字頻率計(jì) 19 { DS18B20 = 1。 } DS18B20 = 1。 delayus(6)。_nop_()。t)。 IE = 0x0a。 //定時(shí)器 0為 8位自動(dòng)重載定時(shí)采樣,定時(shí)器 1為 16位超時(shí)檢測(cè)處理 TCON = 0x00。 P2=0xff。k120。 uchar num[10] = {0x7e,0x48,0x3d,0x6d,0x4b,0x67,0x77,0x4c,0x7f,0x6f}。 //溫度傳感器接口 bit keyboard,flash,STA=1。0x30)/16 sbit DS_RST = P1^2。0x70)/16 define fd collect_time[1]amp。_nop_()。_nop_()。 //初始化超時(shí)檢測(cè) //define Delay2us() _nop_()。 //調(diào)整減 define RdefineT1 TH1=0。實(shí)驗(yàn)178。擴(kuò)展了知識(shí)面,不但掌握了本專業(yè)的相關(guān)知識(shí),而且對(duì)其他專業(yè)的知識(shí)也有所了解,而且較系統(tǒng)的掌握單片機(jī)應(yīng)用系統(tǒng)的開發(fā)過(guò)程,因而自身的綜合素質(zhì)有了全面的提高 。 根據(jù)定時(shí)器的結(jié)構(gòu)原理,若我們將 GATE位、 TR0均設(shè)為‘ 1’, INT0端輸人被測(cè)頻率信號(hào),當(dāng)被測(cè)信號(hào)的高電平到來(lái)時(shí),開始計(jì)數(shù);當(dāng)被測(cè)信號(hào)的低電平到來(lái)時(shí),計(jì)數(shù)器停止計(jì)數(shù),此時(shí) TL0、 TH0的數(shù)據(jù)就是相應(yīng)的 N值。 在此種情況下, INT0引腳的電平變化對(duì)或門不起作用。 B = 0: 消隱關(guān) (4) 輸入方式設(shè)置 (ENTRY MODE SET ) I/D = 1:(增量 ): S = 0: 無(wú)移位 : ) 軟件復(fù)位 如果電路電源不能滿足復(fù)位電路的要求的話 ,那么初始化就要用軟件來(lái)實(shí)現(xiàn) ,過(guò)程如下 : 八位接口初始化流程圖 河南工業(yè)職業(yè)技術(shù)學(xué)院 —— 基于 51 單片機(jī)的數(shù)字頻率計(jì) 12 ↓ ↓ ↓等待 ↓等待 100us ↓檢查忙標(biāo)志或延時(shí) 40us ↓檢查忙標(biāo)志或延時(shí) 40us ↓檢查忙標(biāo)志或延時(shí) 40 us ↓檢查忙標(biāo)志或延時(shí) ↓檢查忙標(biāo)志或延時(shí) 40 第 3 節(jié) 軟件設(shè)計(jì) 主要能過(guò)編寫軟件來(lái)控制硬件完成以下各模塊的功能: 定時(shí)讀數(shù) 量程轉(zhuǎn)換 BCD 轉(zhuǎn)換 顯示的功能 單片機(jī)當(dāng) C/T=1時(shí)為計(jì)數(shù)方式,多路開關(guān)與定時(shí)器的外部引腳連通,外部計(jì)數(shù)脈沖由引腳輸入。 F = 0:5179。 (1) 清屏 (DISPLAY CLEAR)。 10% 河南工業(yè)職業(yè)技術(shù)學(xué)院 —— 基于 51 單片機(jī)的數(shù)字頻率計(jì) 11 3 VEE 液晶驅(qū)動(dòng)電壓 保證 VDDVEE=∽ 5V電壓差 4 RS 寄存器選擇信號(hào) H:數(shù)據(jù)寄存器 L:指令寄存器 5 R/W 讀 /寫信號(hào) H:讀 L:寫 6 E 片選信號(hào) 下降沿觸發(fā) ,鎖存數(shù)據(jù) 7 | 14 DB0 | DB7 數(shù)據(jù)線 數(shù)據(jù)傳輸 )寄存器選擇功能表 RS R/W 操 作 0 0 指令寄存器 (IR)寫入 0 1 忙標(biāo)志和地址計(jì)數(shù)器讀出 1 0 數(shù)據(jù)寄存器 (DR)寫入 1 1 數(shù)據(jù)寄存器讀出 (注 :忙標(biāo)志為 1時(shí) ,表明正在進(jìn)行內(nèi)部操作 ,此時(shí)不能輸入指令或數(shù)據(jù) ,要等內(nèi)部操作結(jié)束 ,即忙標(biāo)志為 0時(shí)。 C ) 電參數(shù)表 名 稱 符 號(hào) 測(cè) 試 條 件 標(biāo) 準(zhǔn) 值 單位 MIN TYPE MAX 輸入高電平 VIH VDD V 輸入低電平 VIL V 輸出高電平 VOH IOH = V 輸出低電平 VOL IOL = V 工作電流 IDD VDD = mA 液晶驅(qū)動(dòng)電壓 VDD VEE Ta = 0176。輸入 ,接受控制器送出的串行數(shù)據(jù)和控制信號(hào) ,偏壓 (V1∽ V6)。 圖七 秒脈沖產(chǎn)生電路原理圖 顯示模塊 1602基本技術(shù): 1)、主要功能 A、 40通道點(diǎn)陣 LCD 驅(qū)動(dòng) 。置位和復(fù)位或復(fù)位線上的高電平完成。 由于輸入的信號(hào)幅度是不確定、可能很大也有可能很小,這樣對(duì)于輸入信號(hào)的測(cè)量就不方便了,過(guò)大可能會(huì)把器件燒毀,過(guò)小可能器件檢測(cè)不到,所以在設(shè)計(jì)中采用了這個(gè)信號(hào)調(diào)理電路對(duì)輸入的波形進(jìn)行阻抗變換、放大限幅和整形,信號(hào)調(diào)理部分電路具體實(shí)現(xiàn)電路原理圖和參數(shù)如下圖 4所示: 圖 4 時(shí)基信號(hào)產(chǎn)生電路: CD4013雙上升沿 D觸發(fā) 器 ,引腳及功能見如下圖 5: CD4013 由兩個(gè)相同的、相互獨(dú)立的數(shù)據(jù)型觸發(fā)器構(gòu)成。它將正弦輸入信號(hào) Vx整 河南工業(yè)職業(yè)技術(shù)學(xué)院 —— 基于 51 單片機(jī)的數(shù)字頻率計(jì) 8 形成同頻率方波 Vo,幅值過(guò)大的被測(cè)信號(hào)經(jīng)過(guò)分壓器分壓送