LibUSB can be utilized to control the FX2 through user-mode routines in the Linux, BSD's and Mac OS X Operating Systems. LibUSB is a open-source software suite and may already be installed in your Unix distribution. Download the latest LibUSB distribution from SourceForge.net and many examples are provided to control your FX2 USB board. Use the VID/PID pair as 0x04B4/0x8613 which is the default for the FX2 microcontroller. OpenUSB also provides an alternative to using LibUSB.
An open source project under the GPL called the SDCC (Small Device C Compiler) is perfect for many USB projects, and the SDCC is ported to most popular Operating Systems. Because at the heart of EZ-USB FX2 is an 8051 microcontroller, any compatible 8051 compiler will suffice to develop applications for the EZ-USB FX2. We highly recommend referencing the C code examples provided by the CY3684 EZ-USB FX2 Development Kit before starting to write firmware for the 8051 from scratch. This is because implementation of the standard device requests is complex.
For those who prefer assembly language W.W. Heinz has written a powerful assembler perfect for 8051 microcontroller firmware development called ASEM-51. The assembler is also ported to Windows. Header files are provided for the special registers, and bit masks implemented for the EZ-USB FX2's 8051 microcontroller.
The EZ-USB does not have a hardware SPI controller however, Cypress provides two application notes on software implementation of SPI for the EZ-USB. Both application notes give examples interfacing with a 25LC320 EEPROM via SPI. All C and 8051 Assembly code is provided.
Cypress offers the CY3684 EZ-USB FX2 Development Kit which provides complete software solutions for accelerating the firmware and device driver development for the EZ-USB FX2 microcontroller. This development kit includes an evaluation version of the 8051 Keil Software Tools in the USB 2.0 development kit. Included in the CY3684 Development Kit is the Keil PK51, a complete software development environment for classic and extended 8051 microcontrollers, and is ideal to developm firmware for the EZ-USB FX2. The Cypress Development kit offers many examples that will get you started in hours. Even if you don't like to be tied to an IDE in Windows, the source code is an excellent place to reference. The evaluation version of the C Compiler lets the designer write 8051 microcontroller applications in C and still get the efficiency and speed of assembly language. The development kit is an excellent way to get started developing applications quickly, especially if the EZ-USB FX2 is configured in GPIF mode. An application note and software example is provided for GPIF by Cypress (see AN1197). Many individual contributors also offer firmware for the EZ-USB FX2 which can easily be found by searching the web.
SuiteUSB by Cypress is offered for application development in Windows XP/2000/Vista and Windows 7. This software offers examples and a generic driver to interface with your EZ-USB in Windows. To program applications using the generic device driver (cyusb.sys) and library code provided by Cypress (cyusb.dll) the Microsoft Visual Studio 2005 Standard Edition is required. SuiteUSB is the best way to create USB applications for Windows. The examples are provided in C#, however, the Library API can also be called from Visual Basic, Visual C++, and Visual J#.
Many different projects exist for EZ-USB FX2 development. Cypress Semiconductor Examples are provided by Jan Axleson from Lake View Research. In order to download the firmware to the EZ-USB FX2 in Linux the ever popular fx2_programmer written by Vladimir Dergachev can be used. Any project you can find on the WWW for the FX2 can be used for our development boards.
Cypress Semiconductor provides many EZ-USB FX2 examples for the 8051 microcontroller. USB is defined to be host-centric, therefore, an In transfer is from the peripheral to the PC, and an Out transfer is from the PC to the peripheral. These examples provided by Cypress include:
All of these examples are free and provided with the Cypress EZ-USB FX2 Development Kit. The Cypress CyConsole is to be used with these examples.
Please see our USB FAQ Page for the frequently asked questions for the FX2 Development boards. We are currently trying to respond to everyone's questions so don't be hesitant to contact us so we make sure to post the answer to your question.