|Online Development Notebook > Index > Programming Overview|
The U4xx was developed to operate with the Windows operating system. The U4xx works with Windows Vista, Windows XP, Windows 98se, Windows 98me, and Windows 2000. Windows NT, Windows 95, the first release of Windows 98, and any earlier versions of Windows do not work completely or at all with the U4xx (or any similar USB device).
The U4xx has been tested with OSX, Linux Red Hat 8.0, and current Ubuntu Linux.
An application program for the U4xx can be written in several different languages (VB, VC, Delphi, BCB) by accessing Windows API directly or through a DLL. The application languages include more than just the languages that are sampled in this document. Any language that can produce a Windows program and call either the Windows API or a DLL would be candidates for interfacing this USB hardware.
USBm Dynamic Link Library Programming (VB, C, C++, Delphi, .NET, RobotBASIC, REALbasic, Java, etc.)
A dynamic link library hides most of the messy interface commands. The DLL (USBm.dll) provides a function for EACH device operation. Visual Basic can access the DLL by including an interface file (USBmAPI.bas). Visual C can access the DLL by including the DLL in the project.
For example, to write E7h to port A use this command:
USBm_WritePortA( device, 0xE7 )
The DLL API is described in the USBm DLL Programming section of this document. Using the DLL is the better choice for interfacing to the USB device on windows.
Raw Device Programming (Linux, Mac OSX, VB Example)
You can directly communicate with the Windows API to program the USB interface boards. For VB, the support files (those with a .bas extension) separate the bulk of the interface details from the main VB application.
The operations that control the USB device are commands that write data to the device and read data from the device. These two function calls provide a way for commands to be sent to the device, and replies read. The "payload" of the functions is the "raw" device command.
To write E7h to port A use the command 01-E7-00-00-00-00-00-00. Details of sending these bytes are covered where Linux and Mac are discussed.
The raw commands are described in each device command as Raw Device Programming. Use this method of interfacing to the USB device only if your programming language has no support for using the DLL.
|Hardware: U401 USB Interface U421 USB Interface U451 USB Interface|
Programming: USBm DLL Programming Download Files
Application Notes: U4x1 Application Notes Misc Applications and Information FAQ
While every effort has been made to make sure that the information posted on this site is correct, the author can not be held liable for any damages whatsoever for losses as a result of the application of this information. Use this information at your own risk.
USBmicro can design your custom and semi-custom USB product. Email about USB design can be directed to " Robert " at usbmicro.com.
Copyright © USBmicro, L.L.C., 2002-2010