【正文】
潘老師不僅在學(xué)業(yè)上對我嚴(yán)格要求,悉心指導(dǎo),在生活上也給了我無微不至的關(guān)心、支持和幫助。在中斷結(jié)束后,還要來判斷波形是否符合,如符合,則顯示其頻率,不符則返回,重新判斷。DAC0832 主要由 8 位輸入寄存器、8 位 DAC 寄存器、8 位 D/A 轉(zhuǎn)換器以及輸入控制電路四部分組成。其中“S0”號鍵代表方波輸出, “S1”號鍵代表正弦波輸出, “S2”號鍵代表三角波輸出, “S3” 號鍵代表鋸齒波輸出。在程序運行中,當(dāng)接收到來自外界的命令,需要輸出某種波形時再調(diào)用相應(yīng)的中斷服務(wù)子程序和波形發(fā)生程序,經(jīng)電路的數(shù)/模轉(zhuǎn)換器和運算放大器處理后,從信號發(fā)生器的輸出端口輸出。當(dāng)二進(jìn)制編碼信號的脈沖寬度墹 T 足夠小,且一個碼周期所含墹 T 數(shù) N 很大時,則在低于 fb=1/墹 T 的頻帶內(nèi)信號頻譜的幅度均勻,稱為偽隨機信號。圖 2 為產(chǎn)生上述波形的方法之一,將積分電路與某種帶有回滯特性的閾值開關(guān)電路(如施米特觸發(fā)器)相連成環(huán)路,積分器能將方波積分成三角波。 正弦信號發(fā)生器正弦信號發(fā)生器主要用于測量電路和系統(tǒng)的頻率特性、非線性失真、增益及靈敏度等。 Flash 存儲器的編程 AT89C52 單片機內(nèi)部有 8k 字節(jié)的 Flash PEROM,這個 Flash 存儲陣列出廠時已處于擦除狀態(tài)(即所有存儲單元的內(nèi)容均為 FFH) ,用戶隨時可對其進(jìn)行編程。然而,定時器 2 的標(biāo)志位 TF2 在定時器溢出的那個機器周期的 S2P2 狀態(tài)置位,并在同一個機器周期內(nèi)查詢到該標(biāo)志。在訪問定時器 2 或 RCAP2 寄存器之前,應(yīng)將定時器關(guān)閉(清除 TR2) 。當(dāng)定時/計數(shù)器 2 向上溢出或向下溢出時,置位 EXF2 位。不應(yīng)將數(shù)據(jù)“1”寫入未定義的單元,由于這些單元在將來的產(chǎn)品中可能賦予新的功能,在這種情況下,復(fù)位后這些單元數(shù)值總是“0” 。關(guān)鍵詞單片機,DAC,信號發(fā)生器 ,單片機,頻率調(diào)節(jié),界面提示.2 Abstract In recent years, with the puter in the social sector peration and MCU application is continuously, while driving to the deepening traditional function signal generator on new PE updates. SCM can produce high precision, fast transform the frequency, the output waveform distortion of preferred selection technology. Function signal generator is all sorts of test and experiment process the essential tool, in munication, measuring, radar, control, teaching fields used widely. Both in production and scientific research or teaching, signal generator are electronic engineer signal simulation experiment, and the best tool, signal generator design method, design technology is being more and more advanced. Research function signal generator design methods, overe shortings of traditional methods, in order to better designed plex FM, attenuation function signal generator. This thesis introduces a AT89C2 singlechip waveform generator, can produce squarewave, triangle wave, sine wave, sawtooth wave etc. Various waveform, waveform cycle available program change, and can choose according to need single polarity output or dual polarity output, has the line is simple, pact structure, superior performance characteristics. The article presented the source code, through the simulation test, the performance indexes meet the design requirements. : singlechip processor system is responsible for the user interaction and system control, the keyboard for frequency of input and waveform choice. LCD display the current selected the signal frequency adjustment. Has the interface hint function, and final amplifier circuit is generated signal proper amplifier, in order to improve the signal amplitude and strength.Keywordsmicrocontroller, DAC, signal generator, microcontroller, frequency adjustment, interface hints. 3目 錄 1 概述 .....................................................................................................................................1 單片機概述 ......................................................................................................................2 特殊功能寄存器.......................................................................................................3 數(shù)據(jù)存儲器...............................................................................................................4 自動重裝載方式.......................................................................................................5 波特率發(fā)生器...........................................................................................................6 可編程時鐘輸出.......................................................................................................7 時鐘振蕩器...............................................................................................................7 FLASH 存儲器的編程 ..............................................................................................8 信號發(fā)生器的分類 ..........................................................................................................9 正弦信號發(fā)生器 ........................................................................................................9 低頻信號發(fā)生器 ......................................................................................................10 頻率合成式信號發(fā)生器 ..........................................................................................10 函數(shù)發(fā)生器 ..............................................................................................................11 脈沖信號發(fā)生器 ......................................................................................................11 噪聲信號發(fā)生器 ......................................................................................................11 信號發(fā)生器的應(yīng)用 ...........................................................................................................12 研究內(nèi)容 ...........................................................................................................................122 方案的設(shè)計與選擇 ...............................................................................................................13 方案的比較 ....................................................................................................................13 設(shè)計原理 ........................................................................................................................13 設(shè)計思想 ........................................................................................................................14 設(shè)計功能 ........................................................................................................................153 硬件設(shè)計 ..............................................................................................................................16 硬件原理框圖 ................................................................................................................16 主控電路 ..............................................................................