EZ-USB FX2芯片CY7C68013A入门教程

需积分: 9 3 下载量 91 浏览量 更新于2024-09-15 1 收藏 360KB PDF 举报
"这篇文档是关于CY7C68013A-56,即EZ-USB FX2芯片的入门教程,旨在帮助读者熟悉该芯片的管脚定义、Slave FIFO模式及其配置,并介绍了必要的硬件和软件环境。" CY7C68013A-56是 Cypress Semiconductor 公司生产的一款USB接口控制器,常用于需要高速USB通信的嵌入式系统设计中。这款芯片拥有16位数据总线和多种控制信号,能够方便地与各种外部设备交互。在 Slave FIFO 模式下,它作为一个USB FIFO,简化了USB数据传输的复杂性。 1. **FX2 芯片管脚定义** - **FD[15:0]**:FIFO的数据总线,用于传输16位的数据。 - **SLRD**:读取信号,当该信号有效时,表明从FX2读取数据。 - **SLWR**:写入信号,当该信号有效时,表明向FX2写入数据。 - **SLOE**:总线输出三态使能信号,控制数据总线是否有效输出。 - **FIFOADDR[1:0]**:FIFO端点地址选择信号,用于选择不同的FIFO区域。 - **IFCLK**:内部时钟信号,用于同步数据传输。 2. **Slave FIFO 同步模式配置** - **Slave FIFO模式**:FX2的一种常用工作模式,使得芯片像一个USB FIFO,简化了USB协议处理,直接在USB主机和FIFO之间传输数据。 - **内部结构**:FX2包含4个可寻址的FIFO,对应USB的4个独立物理端点(EP0, EP1, EP2, EP3)。 - **选择端点**:通过FIFOADDR[1:0]信号来激活所需端点进行数据传输。 - **同步模式**:在与FPGA等高速设备连接时,通常采用同步模式,此时IFCLK信号参与数据传输,确保时钟同步。 3. **硬件环境** - **艾曼工作室USBCPLD开发板**:用于实验和开发的平台,集成CY7C68013A-56芯片。 - **USBBlaster或ByteBlasterII下载电缆**:用于下载和调试FPGA/CPLD程序。 4. **软件环境** - **QuartusII 8.0**:Altera的FPGA/CPLD开发工具,用于逻辑设计和仿真。 - **EZ-USB Control Panel**:Cypress提供的工具,用于监控和配置EZ-USB芯片。 - **Keil C51编译器**:8051微控制器的C语言编译器,可能用于编写FX2的固件。 为了更深入地理解和使用CY7C68013A-56,需要参考的数据手册包括: - **CY7C68013.pdf**:芯片的数据手册,详细介绍了所有管脚、功能和操作模式。 - **FX2TechRefManual.pdf**:技术参考手册,提供了FX2系列芯片的高级特性和配置方法。 通过上述资源和实践,开发者能够熟练掌握CY7C68013A-56的使用,实现高效、稳定的USB通信。
2018-07-05 上传
CyAPI原版资料, CyAPI.lib provides a simple, powerful C++ programming interface to USB devices. More specifically, it is a C++ class library that provides a high-level programming interface to the CyUsb3.sys device driver. The library is only able to communicate with USB devices that are served by (i.e. bound to) this driver. Rather than communicate with the driver via Windows API calls such as SetupDiXxxx and DeviceIoControl, applications can call simpler CyAPI methods such as Open, Close, and XferData to communicate with these USB devices. To use the library, you need to include the header file, CyAPI.h, in files that access the CCyUSBDevice class. In addition, the statically linked CyAPI.lib file must be linked to your project. Versions of the .lib files are available for use with Microsoft Visual Studio 2008. The library employs a Device and EndPoints use model. To use the library you must create an instance of the CCyUSBDevice class using the new keyword. A CCyUSBDevice object knows how many USB devices are attached to the CyUsb3.sys driver and can be made to abstract any one of those devices at a time by using the Open method. An instance of CCyUSBDevice exposes several methods and data members that are device-specific, such as DeviceName, DevClass, VendorID, ProductID, and SetAltIntfc. When a CCyUSBDevice object is open to an attached USB device, its endpoint members provide an interface for performing data transfers to and from the device's endpoints. Endpoint-specific data members and methods such as MaxPktSize, TimeOut, bIn, Reset and XferData are only accessible through endpoint members of a CCyUSBDevice object. In addition to its simplicity, the class library facilitates creation of sophisticated applications as well. The CCyUSBDevice constructor automatically registers the application for Windows USB Plug and Play event notification. This allows your application to support "hot plugging" of devices. Also, the asynchronous BeginDataXfer/WaitForXfer/FinishDataXfer methods allow queuing of multiple data transfer requests on a single endpoint, thus enabling high performance data streaming from the application level