简易数字示波器的设计摘要示波器是用量最多、用途最广的测量仪器之一,是观察和测量电子波形不可缺少的工具。
传统的模拟示波器在观测周期性重复频率较高的波形方面仍然得到普遍使用,但对于不能重复出现的单次信号、持续的非周期信号以及重复频率较低的周期信号则显得无能为力。
数字存储示波器正是基于上述要求而出现的。
数字示波器是新型智能化示波器,其技术基础是数据的采集,该技术可以应用于更广泛的数据采集产品中,具有深远意义。
本论文对示波器的工作原理进行了介绍,提出了一种基于STC12C5A60S2单片机和12864点阵液晶屏的数字示波器设计方案,实现对被测信号的采样、存储以及显示;扫描频率可调,幅度可调;设置10ms/div、2ms/div、1ms/div、500μs/div、400μs/div五档扫描速度,仪器的频率范围为DC~3kHz。
其依据是利用STC12C5A60S2芯片的AD转换器对输入的模拟信号进行采样,将采样值存入缓冲区经程序处理后在LCD液晶屏上显示出对应的波形。
实验结果表明本设计电路结构简单,运算速度高,频率显示准确,可以实现快速读取,波形显示刷新速度较快。
设计中采用的模块化设计方法,提高了设计效率。
整个系统成本廉价,并且实现了数字示波器的所有功能要求,达到了较高的性能指标。
关键词:单片机,液晶显示,数字示波器,AD采样THE DESIGN OF SIMPLE DIGITAL OSCILLOSCOPEABSTRACTThe oscilloscope is one of the most widely used measuring instruments, is an indispensable tool of observation and measurement of electronic waveform. Traditional analog oscilloscope observation cyclical high repetition frequency waveform is still widely used, but for a single signal that can not be repeated, sustained non-periodic signal, and low repetition frequency of periodic signals look powerless. Digital storage oscilloscope is based on the above requirements emerge. The digital oscilloscope is a new intelligent oscilloscope, its technology is based on the data acquisition, and the technology can be applied to a wider range of data acquisition products and has far-reaching significance.The paper describes the working principle of the oscilloscope, it puts forward a solution that based microcontroller STC12C5A60S2 and 12864 dot matrix LCD screen, digital oscilloscope design to achieve the measured signal, sampling, storage and display; scanning frequency is adjustable, amplitude adjustable; set 10ms/div、2ms/div、1ms/div、500μs/div、400μs/div fifth gear scanning speed, the frequency range of the instrument for DC ~ 3kHz. It is based on the AD converter in STC12C5A60S2 chip sample the input analog signal, the sampled values are stored in the buffer, then shows the corresponding waveform on the LCD screen after procedures.Experimental results show that this design is a simple circuit structure, high-speed operation, accurate frequency display, can be quickly read, waveform display refresh rate faster. Equivalent sampling techniques used in the design, can be a good high-speed periodic signal measurements require high-speed sampling, to reduce the requirements for the A / D conversion rate, reduce thehardware cost of the oscilloscope. The modular design approach adopted in the design, improves design efficiency highly. The whole system is very cheap, and fulfills all the functional requirements of the digital oscilloscope to achieve a higher performance.KEY WORDS:Single-chip Microcomputer, LCD, Digital Oscilloscope, AD Sample目录第1章绪论 (1)§1.1 课题背景 (1)§1.2 课题研究的目的和意义 (2)§1.3 课题的主要研究工作 (2)第2章系统设计方案的研究 (3)§2.1 系统设计的总体思路 (3)§2.2 系统设计任务 (3)§2.3系统设计的原理 (4)§2.4总体方案的选定 (5)§2.4.1 方案论证 (5)§2.4.2 系统框图 (5)第3章硬件电路设计 (7)§3.1 单片机的选型 (7)§3.1.1 STC12C5A60S2的内部结构 (7)§3.1.2 STC12C5A60S2的管脚说明 (8)§3.1.3 STC12C5A60S2的时钟 (9)§3.1.4 STC12C5A60S2的复位 (10)§3.2 A/D采样 (11)§3.2.1 A/D采样的基本原理 (11)§3.2.2 STC12C5A60S2的A/D结构和操作方法 (12)§3.3 12864液晶显示模块 (14)§3.3.1液晶显示模块概述 (14)§3.3.2显示RAM (14)§3.3.3点阵LCD的显示原理 (15)§3.4信号保持电路 (16)§3.5串口通信电路 (18)§3.6键盘控制电路 (19)第4章系统软件设计 (21)§4.1 软件架构 (21)§4.2 主程序的设计 (22)§4.3 波形显示程序的设计 (23)§4.4 按键检测程序的设计 (25)§4.5 软硬联调结果 (26)结论 (28)参考文献 (29)致谢 (30)附录 (31)第1章绪论§1.1课题背景本世纪70年代起,数字集成电路和微处理机技术获得了迅速发展,示波器也开始应用这些新技术来适应各种需要。