Online Development Notebook > Index > Installation > Programming Overview

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.

Raw Device Programming (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

The raw commands are described in Raw Device Programming. Use this method of interfacing to the USB device only if your programming language has no support for using the DLL.

USBm Dynamic Link Library Programming (VB, C, C++, Delphi, 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:

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.

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

Copyright © USBmicro, L.L.C., 2002-2009