【正文】
攀枝花學(xué)院本科畢業(yè)設(shè)計(論文) 基于 DDS 和單片機的信號發(fā)生器設(shè)計 學(xué) 生 姓 名: 王 龍 學(xué) 生 學(xué) 號: 202020502061 院 (系): 電氣信息工程學(xué)院 年 級 專 業(yè): 2020 級電氣工程與自動化 指 導(dǎo) 教 師: 鄭 會 軍 副教授 助理指導(dǎo)教師: 二〇一一年六月 摘 要 I 摘 要 頻率合成器是電子系統(tǒng)的心臟,是決 定電子系統(tǒng)性能的關(guān)鍵設(shè)備,隨著現(xiàn)代無線電通信事業(yè)的發(fā)展,移動通信、雷達、制導(dǎo)武器和電子對抗等系統(tǒng)對頻率合成器提出越來越高的要求,低相噪、高純頻譜和高速的頻率合成器一直是頻率合成技術(shù)發(fā)展的主要目標(biāo)。 本設(shè)計是 以 STC89C52 單片機為 控制 核心 的 DDS 頻率合成 信號發(fā)生器。該信號發(fā)生器 由頻率合成模塊、控制模塊 、 按鍵模塊 、 液晶顯示模塊等組成,它 采用數(shù)字波形合成技術(shù) , 通過硬件電路和軟件程序相結(jié)合 , 可輸出 一定范圍的 自定義頻率的 正弦波。 文中 詳細介紹了硬件電路設(shè)計 的原理和 DDS 芯片 AD9835 的使用方法。該信號發(fā)生器輸出的 波形頻率和幅值在一定范圍內(nèi)可任意改變 , 與傳統(tǒng)信號發(fā)生器只有固定的幾種輸出波形相比 ,具有輸出波形的任意化和低頻精度高的特點 。 關(guān)鍵詞 DDS, AD9835, STC89C52,信號發(fā)生器 攀枝花學(xué)院本科畢業(yè)設(shè)計(論文) II ABSTRACT Frequency synthesizer is the heart of electronic system. It is the key equipment of determining electronic system performance. With the development of modern radio munication, mobile munications, radar, guided weapons and electronic confrontation system have higher and higher demands of frequency synthesizer. Low phase noise, high purity frequency spectrum and high frequency synthesizer frequency have been the main target of synthesizer frequency technique39。s development. This paper mainly introduces frequency synthesized signal generator, taking STC89C52 microcontroller as control core .It consists of frequency synthesizer module, control module, key modules, LCD modules and other ponents .It uses digital waveform synthesis techniques, through the hardware circuits and software program bined, then can output a range of frequency of custom sinusoidal waves .The paper particularly describes the hardware circuit39。s t design principles and AD9835 DDS chips using method. Output frequency and amplitude of the waveform by the signal generator within a certain range can be arbitrarily changed. Compared with the traditional signal generator with several kinds of output waveform, It has the characteristics of arbitrary waveforms output and high precision and low frequency. Key words DDS, AD9835, STC89C52, Signal Generator 目錄 I 目 錄 摘 要 ............................................................................................................................... I ABSTRACT .................................................................................................................... II 1 緒論 ............................................................................................................................... 1 設(shè)計背景 .................................................................................................................... 1 信號發(fā)生器概述 ......................................................................................................... 1 本設(shè)計概述 ................................................................................................................ 2 2 硬件電路設(shè)計 ...............................................................................................................3 主控 芯片和電路設(shè)計 .................................................................................................. 3 單片機介紹 .......................................................................................................... 3 STC89C52 單片機 ................................................................................................. 3 DDS原理和電路設(shè)計 .................................................................................................. 8 DDS原理與特點 ................................................................................................... 8 AD9835 原理與結(jié)構(gòu) .............................................................................................. 9 AD9835 應(yīng)用電路 ................................................................................................ 14 RS232模塊 ............................................................................................................... 15 RS232 通信協(xié)議介紹 ........................................................................................... 15 RS232 串口硬件電路設(shè)計 .................................................................................... 16 4 4矩陣鍵盤 .......................................................................................................... 17 4 4矩陣鍵盤 的工作原理 ................................................................................... 17 LCD液晶顯示模塊 ................................................................................................... 17 液晶顯示介紹 .................................................................................................... 18 LCD1602字符型液晶顯示模塊介紹 ..................................................................... 18 LCD1602參數(shù)及引腳功能 ................................................................................... 19 信號發(fā)生器 .............................................................................................................. 20 系統(tǒng)總電路圖 .................................................................................................... 20 實物制作說明 .................................................................................................... 20 系統(tǒng)實際功能介紹 ............................................................................................. 21 3 軟件程序設(shè)計 ............................................................................................................. 23 ...................................................................................................... 23 內(nèi)部寄存器、控制字和編程 .................................................................... 23 攀枝花學(xué)院本科畢業(yè)設(shè)計(論文) II 4 4矩陣鍵盤程序設(shè)計 ............................................................................................. 29 4 4矩陣鍵盤識別處理 ...................................................................................... 29 LCD1602編程