Online Development Notebook > IndexProgramming Overview > USBm DLL Programming

USBm Dynamic Link Library Programming

A dynamic link library for the U4x1 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).

For example, to write E7h to port A use this command:

USBm_WritePortA( device, 0xE7 )

Encapsulation of USB Commands

The USBm.dll Dynamic Link Library for the USB interface devices captures many of the messier USB programming details. The DLL can be used with VB, C, Delphi, .NET or any appropriate Windows programming language. It is much easier and faster to use the USBmicro dynamic link library to control the USB devices, than to use direct Windows API commands.

For Visual Basic the file USBmAPI.bas should be included in the project. This file has all of the declarations that support the functions in the DLL.

Use of DLL

The USBm.dll Dynamic Link Library can be used by any owner of a U401⁄U421⁄U451 without a license charge.

Use of MS VC++

Please see the VC++ interface section for using the USBm.dll Dynamic Link Library with Visual C++.

Current DLL version

The USBm.dll Dynamic Link Library current numerical version is 61.

Version 65 - support for firmware 3.35 (2-wire and latching)
Version 61 - support for U451.
Version 60 - stepper count.
Version 56 - strobe byte delay, servo.
Version 52 - library clean up.
Version 42 - support for strobe byte changes.
Version 40 - corrections for MSVC++.
Version 36 - support for 1-wire commands.
Version 34 - support for the stepper command.
Version 30 - support for the U421.
Version 28 - initial public release.

The DLL is included with the application samples and is also located here (all application files).

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-2010

Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 20 of 126)

This page is created with TreePad