【正文】
前的調(diào)試和上電后的調(diào)試。完成焊接后 ,通過萬用表的檢測,沒有發(fā)現(xiàn)短路和斷路的地方了,電路基本正常。一、 顯示電路的調(diào)試通過編寫按鍵/顯示程序來對此部分硬件電路進(jìn)行測試,其程序見附錄4。其程序見附錄4。但把程序燒到片子里, ,進(jìn)一步證明了仿真頭的原因。改掉晶振后,得到了正確的通信結(jié)果。歷經(jīng)兩個多月的畢業(yè)設(shè)計,在最大程度上鍛煉了我發(fā)現(xiàn)問題、分析問題、解決問題的能力,為我在即將到來的社會實踐工作中有一個良好的開端奠定了堅實的基礎(chǔ)。對于用LCA51仿真軟件進(jìn)行軟硬件聯(lián)調(diào),則先根據(jù)現(xiàn)有的資料和老師的指導(dǎo),提出了分塊子程序調(diào)試方案,先用簡單子程序?qū)τ布娐愤M(jìn)行調(diào)試,確保硬件電路正確后,再對本系統(tǒng)軟件進(jìn)行調(diào)試。更是意識到了自己很多的不足,比如知識面的狹隘,以前所學(xué)知識的遺忘。. 北京:清華大學(xué)出版社, 2003.[4] [M]J.指導(dǎo)老師多次詢問研究進(jìn)程,并為我指點迷津,幫助我開拓研究思路,精心點撥、熱忱鼓勵。在課題完成寫論文時,指導(dǎo)老師對我的論文不厭其煩的細(xì)心指點,他首先細(xì)致地為我確定提綱,梳理脈絡(luò),使我確立了本文地框架。四年的本科學(xué)習(xí),使我學(xué)到了很多,無論是理論知識還是實驗?zāi)芰Γ诖宋乙兄x各位老師四年來對我的悉心教導(dǎo)以及各位同學(xué)好友的熱忱幫助,謝謝你們!附錄一 元器件明細(xì)表元件名稱數(shù)量規(guī)格型號作 用單片機1AT89C51主芯片芯片1HD7279鍵盤/顯示芯片1HD74LS02P4輸入或非門芯片1ADC0809模數(shù)轉(zhuǎn)換芯片1MAX232串口電平轉(zhuǎn)換芯片座340腳/14腳方便插卸芯片電阻1210KΩ按鍵上拉電阻電阻1100Ω為發(fā)光二極管分壓九腳排阻1330Ω數(shù)碼管顯示上拉電阻晶振111.0592MHz組成時鐘振蕩電路瓷片電容1620PF發(fā)光二極管1上電指示電解電容110uF/25V復(fù)位電容按鍵16四腳控制導(dǎo)線若干元器件連接設(shè)備明細(xì)表設(shè)備名稱設(shè)備型號數(shù)量電腦Lenovo一臺仿真器AEDK51HB一臺穩(wěn)壓電源DW1型5V一臺萬用表MF47一臺示波器YB4320A一臺工具明細(xì)表工具名稱數(shù)量烙鐵一把烙鐵架一個鉗子一把剪刀一把螺絲刀一把附錄二HD7279A譯碼明細(xì)表d0d3(十六進(jìn)制)d3d2d1d07段顯示00H0000001H0001102H0010203H0011304H0100405H0101506H0110607H0111708H1000809H100190AH10100BH1011E0CH1100H0DH1101L0EH1110P0FH1111空(無顯示)附錄三畢業(yè)設(shè)計實物圖附錄四系統(tǒng)設(shè)計源程序//**********************變量定義*************************include include include //nop。sbit cs=P2^3。uchar bdata d_out。extern uchar data buf[8]={0}。//**********************函數(shù)聲明*************************void send(uchar dout )。void del_ms(uchar d)。//****************串行初始化**************************void Init_Com(void){ TMOD = 0x20。 TL1 = 0xFd。 while(TI!=1)。 TxData(buf[2]+48)。 TxData(0x0a)。 cs=1。 send( num1 )。 } else if((d_in=3)amp。key==0。key==0。key==0。} else if(num1==2){A=0。}}//**********************主函數(shù)***************************main(){ P2=0xf9。 send(0x0e)。 test()。//等待轉(zhuǎn)換結(jié)束 num0=XBYTE[AD_address]。//數(shù)據(jù)處理,數(shù)據(jù)拆成8位,存在buf[8]中; } disp_num()。 num=num*5/256。 num=num/10。ii++) { cs=1。 send(buf[ii])。 cs=0。 dat=d_out_7。 clk=0。 dat=1。 clk=1。 clk=0。 while(d) { for(ii=0。 } } 附錄五中英文資料Multichannel data collection and analysis of the design and applicationAbstract:The Paper mainly introduces a multichannel data acquisition and analysis system posed of one PC and one measuring instrument. The system can test eight products parallelly. It reduces the test cost and improves work efficiency. The paper also gives the hardware structure and software flow diagr am of the system. The application in the gyro test is also introduced briefly. Key words:munication prot。s parallel port to provide and meet shown in table 1.Table1 The relation between channel selection and port outputCommunications port outputBinary codeChannel selection select channel00001100122010330114410055101661107711188way channel selector industry can use the SCM, subject to additional controls, select RS232 serial port as data transmission, because the RS232 port is the puter and measuring instruments on the standard configuration, municate with each other without additional hardware , Easy to use. In addition, a serial municationonly a bit, with only a standard datavoltage potential, hence more difficult in data errors. In a parallel port to transfer data 8bit, data transmission speed, but the data vulnerable to interference. Transmission distance in a shorter amount of data transmission larger circumstances, may be parallel port (such as GPIB, LPT, etc.) to municate. In addition, since LPT parallel port may signal transmission, channel selection is suitable for the control port.System in the course of work, good access control modules and data acquisition module synchronization is particularly important because different channels of data storage needs of the corresponding data buffer pool, which is controlled by software.3 software designThe whole system software design is the most important part. Software system from the bottom of the munication protocol can be divided into functional threetier module and user interface. Software design in the use of multithreaded Windows technology, the technology for data collection procedures can effectively accelerate the reaction time and increase the efficiency of implementation. The procedures used in a separate thread for data collection, so the guaranteed maximum energy collection of realtime。給出了系統(tǒng)硬件結(jié)構(gòu)和軟件流程圖,并介紹了該系統(tǒng)在陀螺測試中應(yīng)用。先介紹一個用一臺PC機和一臺測量儀表組成的8路數(shù)據(jù)采集與分析系統(tǒng),可同時進(jìn)行多套產(chǎn)品的測試,在不增加成本的基礎(chǔ)上,充分發(fā)揮了計算機自動測試的優(yōu)勢,提高了工作效率。測試過程中,計算機通過并行端口控制8路通道選擇器,分別打開不同的通道,各通道數(shù)據(jù)通過選擇器傳送到測量儀表中,測量儀表再通過RS232端口把數(shù)據(jù)發(fā)送到計算機中保存,在一個周期內(nèi)完成所有通道的數(shù)據(jù)采集,這樣就實現(xiàn)了同時測試多個產(chǎn)品的功能。表1 通道選擇器和通信端口輸出的對應(yīng)關(guān)系通信端口輸出二進(jìn)制碼通道選擇器選擇通道00001100122010330114410055101661107711188路通道選擇器業(yè)可使用單片機,但需額外的控制,選擇RS232串口作為數(shù)據(jù)傳輸端口,是因為RS232端口是計算機和測量儀表上的標(biāo)準(zhǔn)配置,相互通信不需額外的硬件,使用方便。另外,由于LPT端口可并行傳輸信號,因此適合用作通道選擇器的控制端口。在軟件設(shè)計中采用Windows多線程技術(shù),此技術(shù)進(jìn)行數(shù)據(jù)采集可有效加快程序的反應(yīng)速度,增加執(zhí)行的效率。其程序框圖如圖2所示。如我們開發(fā)的數(shù)據(jù)自動跟蹤算法能自動跟蹤每個通道的數(shù)據(jù),判斷該通道是否處于穩(wěn)定狀態(tài),且只采集穩(wěn)定狀態(tài)的數(shù)據(jù),忽略其他的波動數(shù)據(jù)。零位穩(wěn)定性計算式為:(2)先根據(jù)式(2)編寫出一個算法函數(shù),然后在分析模塊中調(diào)用。另外,在軟件設(shè)計中,一個友好的用戶界面是必須的,把 從程序中的功能封裝起來,通過一個統(tǒng)一的界面提供給用戶,有利于降低操作難度,提高工作效率。由于采用了多線程技術(shù),該系統(tǒng)的數(shù)據(jù)采集速度只與硬件(測量儀表)的響應(yīng)速度和不斷口通信速度有關(guān)。該系統(tǒng)充分發(fā)揮了利用計算機和測量儀表相互通信,進(jìn)行自動化控制和測試的