|Online Development Notebook > Index > U4x1 Application Notes > App0: Cmd Test|
App0: Command Test Application
Provide a program that tests the communication of command messages to the U401⁄U421⁄U451. This application will transfer the "raw" command to⁄from the U4x1. The raw commands are typically used for OS support other than Windows. This Windows application shows how a raw command is used, similar things can be done for other operating systems. The raw commands are used for this type of programming, or for alternate OS programming. Since the USBm.dll encapsulates these commands and gives commands that are easier to read⁄understand, it is better to use the commands in USBm.dll.
This is a debug application that will send a command to the U401⁄U421⁄U451 and display the response. The command is entered in the eight data boxes. When the "command" button is clicked, the message is sent to the U401⁄U421⁄U451, and displayed in the status box along with the response from the U401⁄U421⁄U451. App0 can also be used to display the U4x1 serial number and other device information.
Below is a screen shot of this application after sending the command to initialize ports. The line with the ">" is the raw command sent to the U4x1, below that, the reply. The first byte, the command byte, is set to all 00h. The remaining bytes for this command are not used by the U4x1 and reflect the values in the entry boxes.
Below two additional raw commands have been sent to the U4x1. The "09" command sets the lines of port A to all outputs. The "01" command sends a byte value (55h) to port A.
This application can send messages to an attached U4x1 for testing. No additional hardware is necessary for Application 0. Specific hardware for testing different commands depend on that command.
|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