基于CPLD和单片机的李萨如图形演示装置(附原理图,CPLD移相电路图)
来源:wenku7.com 资料编号:WK717246 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9AWK717246
以下是资料介绍,如需要完整的请充值下载。
1.无需注册登录,支付后按照提示操作即可获取该资料.
2.资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用. 密 保 惠 帮助
资料介绍
基于CPLD和单片机的李萨如图形演示装置(附原理图,CPLD移相电路图)(中文11000字)
摘要:李萨如图形是由互相垂直的方向上的两个频率成简单整数比的简谐震动所合成的规则的、稳定的闭合曲线,借助李萨如图形可以测量出两个信号的频率比与相位差。本文设计了一个简单的李萨如图形产生装置。系统主要由MSP430F169单片机,CPLD,低通滤波器,相位补偿电路以及衰减电路构成。以MSP430F169单片机作为主控制器,40M有源晶振作为信号源产生原始信号,经过CPLD进行稳定的分频产生500HZ的方波。方波通过低通滤波器得到正弦信号,但由于经过滤波器的波形相位发生了一些变化,通过全通滤波器组成的移相电路进行相位补偿,最后经过由分压电路和跟随器组成的衰减电路得到最终需要的波形。主控制器选择不同频率的信号输入到示波器的XY通道产生李萨茹图形。整机使用MSP430F169单片机实现人机交互、对电路的控制、自动循环移相及对相应状态量的显示以达成最终需要的效果。测试表明,系统能产生不同频率比的正弦信号,并在示波器上形成标准的李萨如图形。所设计的系统具有成本低、程控的特点。
关键字:CPLD分频;移相;MSP430F169 ;李萨如;滤波器
Lissajous figure demonstration device based on CPLD and single chip microcomputer
Abstract:Lissajous figure is by two mutually perpendicular direction frequency into simple integer ratio of simple harmonic motion synthesis rules, stable closed curve, can measure the two signal frequency ratio and phase difference with the aid of a Lissajous figure.In this paper, we design a simple Li Saru graphics generation device.The system is mainly composed of MSP430F169 MCU, CPLD, low pass filter, phase compensation circuit and attenuation circuit.With the msp430f169 microcontroller as the main controller, 40m active crystal as a signal source produced the original signal, through CPLD for stable frequency 500Hz square wave.Square wave through the low pass filter to get the sinusoidal signal, but because after filter wave phase changes, by all pass filter composed of phase-shift circuit were phase compensation, finally is composed of a voltage dividing circuit and follower composition attenuation circuit to get a final waveform.The main controller chooses different frequencies of signal input to the XY channel of the oscilloscope to generate the Li Saru pattern.The whole machine uses MSP430F169 MCU to achieve human-computer interaction, control of the circuit, automatic cycle phase shift and the corresponding status of the display in order to achieve the final effect.Tests show that the system can produce sinusoidal signals with different frequencies, and the standard Li Saru pattern is formed on the oscilloscope. The designed system has the characteristics of low cost and program control.
Key word: CPLD frequency-division;hase-shifting;MSP430F169 ;Lissajous figure ;wave filter
目 录
1. 绪论 5
1.1. 研究背景及意义以及国内外研究现状 5
2. 系统方案设计 6
2.1. 系统设计的任务与要求 6
2.2. 基本要求 6
3. 系统硬件及PCB设计 6
3.1. 低通滤波电路 7
3.2. 相位补偿电路 10
3.3. 衰减电路 11
3.4. 单片机最小系统 12
3.5. CPLD模块 14
4. 系统软件设计 17
4.1. 基于CPLD的软件编程 17
4.1.1. 软件开发环境 17
4.1.2. 软件开发流程 17
4.2. 基于MSP430单片机的软件编程 19
4.2.1. 开发环境 19
4.2.2. 主程序流程 19
5. 测试及检验 22
6. 结论 28
参考文献 29
致谢 30
|