摘 要
在现代电子技术的设计与开发过程中,特别是在通信、雷达、航空、航天以及仪器仪表等领域,都需要进一步提高一系列高精度、高稳定度的频率源的频率精度。这样,一般的振荡器已经无法满足各种应用的发展要求,而晶体振荡器的性能虽然比较好,但其频率单一,或只能在极小的范围内进行微调。
锁相环是一个相位误差控制系统。它比较输入信号和振荡器输出信号之间的相位差,从而产生误差控制信号来调整振荡器的频率,以达到与输入信号同频同相。本设计主要针对特定场合的安检任务设计,采用基于线圈感应来实现对金属的探测。本设计选用的是51系列单片机,在硬件电路设计中,完成单片机选型及外部电路元件的选用,设计了硬件接线图,提出了接线要求,使之具有控制和保护的功能;在软件设计中,给出了程序流程图,编程语言采用了C语言,将硬件和软件有机的结合在一起,使系统运行可靠,达到预期的设计目的。
关键词:频率合成器;锁相环;51单片机;C语言
ABSTRACT
In modern electronics design and development process, particularly in communications, radar, aviation, aerospace and instrumentation, and other fields, we need to further improve the range of high-precision, high-precision frequency stability frequency source. Thus, the general oscillator has been unable to meet the development requirements of various applications, and the crystal oscillator performance although better, but the single frequency or fine tune only in a very small range.
Phase-locked loop is a phase error control system. It compares the input signal and the phase difference between the oscillator output signal to produce a frequency error control signal to adjust the oscillator to achieve with the input signal with the same frequency. This design is mainly designed for security tasks specific occasions, based on the induction coil to achieve metal detection. The design choices are 51 series, the hardware circuit design, selection and external microcontroller to complete the selection of circuit elements, the design of the hardware wiring diagram, proposed wiring requirements, so that it has control and protection functions; in software design given the program flow chart, using the programming language C language, the organic combination of hardware and software, the system is reliable, is designed to achieve the desired.
Keywords:frequency synthesizer; phase-locked loop; 51 microcontroller; C language
目 录
摘 要 1
ABSTRACT 2
第1章 绪论 4
1.1课题研究目的及意义 4
1.2 研究现状及发展趋势 4
1.3 DDS的系统简介 5
1.3.1 DDS的基本原理 5
1.3.2 DDS的性能特点 6
第2章 单片机80C51的简介 8
2.1 主芯片80C51的硬件资源 8
2.1.1单片机的概念 8
2.1.2 80C51的芯片引脚 9
2.1.3使用I/O口的注意事项 11
2.2 80C51中断系统 12
2.2.1中断源 12
2.2.2中断的控制 13
2.2.3中断响应 14
2.3 单片机定时/计数器的使用 15
2.3.1与T/C有关的特殊功能寄存器 15
2.3.2 定时器/计数器的初始化 16
第3章 AD9850简介 18
3.1 AD9850功能概述 18
3.2AD9850工作原理 20
3.2.1控制字格式及写入时序 20
3.2.2频率输出原理 20
3.3.1 AD9850的应用 21
3.3.2 AD9850的硬件设计 21
第4章 DDS信号源系统设计 22
4.1方案论证与比较 22
4.1.1三角波生成方案 22
4.1.2 输出电压幅度控制方案 24
4.1.3 模拟幅度调制 24
4.1.4 数字PSK/ASK载波调制 25
4.2 单元电路设计 27
4.2.1 三角波的生成 27
4.2.2 输出电压幅度控制 28
4.2.3 模拟信号的产生 29
4.2.4 数字PSK/ASK载波调制 29
4.2.5 键盘与显示控制的设计 30
第5章 软件设计 31
5.1 软件功能的实现 31
5.2 软件流程图 31
5.2.1 总设计流程图 31
5.2.2 外设流程图 32
5.2.3 AD9850流程图 33
总 结 34
参考文献 35
附 录 37
致 谢 45