基于USB和CPLD的新型光栅尺接口卡的设计与实现-检测技术与自动化装置专业论文.docx
文本预览下载声明
摘要摘要
摘要
摘要
随着数控设备的发展和技术的进步,对数控设备的精度和速度都提出了更高 的要求,而光栅传感器接口电路的设计水平从一定程度上决定了测量系统的精度 和可靠性。
随着USB(Universal Serial Bus)技术的发展,USB接1:I已经成为PC机的标准 配置。在传输距离允许的情况下,USB接口以其优越的性能得到了广泛的应用。
CPLD(Complex Programmable Lo#c Device)是--种具有丰富的可编程FO引
脚的可编程逻辑器件,具有在系统可编程、设计灵活和保密性强等特点。 本文研制了基于USB接口的光栅尺接口卡,采用CPLD对光栅尺输出信号
进行处理,并通过USB接口实现光栅尺接口卡与计算机之间的通讯。文章详细
介绍了光栅尺接口卡的硬件、软件设计方法。
本设计的工作主要集中在以下方面:
硬件部分以Cypress公司的EZ-USB FX2作为控制核心,以Altera公司的CPLD
芯片EPM7128SLC84.10实现光栅信号的细分、辨向和计数等。 软件部分主要包括三部分:一是USB芯片正常工作所需的固件程序;二是
接口卡的驱动程序,它为USB设备与PC机进行通讯提供保证;三是用来测试
系统功能的基于C++Builder的应用程序。
系统采用了基于8051内核的EZ.USB FX2为接口芯片,避免了以往设计所 使用的“USB接口芯片+MCU模式,使得系统更加稳定,另外对光栅信号的处 理都在CPLD中进行,使得电路板更Dnd,巧,工作更稳定、可靠。实验表明,接 口卡满足设计要求。
关键词:光栅尺;USBI CPLD
AbstractAbstract
Abstract
Abstract
With the development of CNC,the precision and the speed is more and more important to the CNC.At the same time the grating’S high precision is also more important to the CMM.
To same extent,the interface circuit of the grating influences the precision and stability of the measurement system.
Along with the development of USB,USB is used on many external devices. USB has been a standard configuration on PC.1f the transmission distance allows. USB iS used widely because of its good characteristic.
The CPLD has characteristics such as ISP and conveniently programmable as
well as high flexibility and confidentiality.
A grating sensor interface card based on USB is developed in this paper,CPLD is used to process the output signal of the grating,and USB is used to realize the communication between the processing circuit of the grating signal and PC.
,nle paper introduces the design of the hardware and software about the grating
interface card in details.
ne hardware of the system is made up 0f EZ—USB FX2 as the main processor, which is used to process signal.
The software of the system has three portions:the first portion is firmware, including USB communication control;the second is USB driver,which is the channel between the firmware and PC application;the th
显示全部