|Online Development Notebook > Index > Programming Overview > Device Commands > StrobeReads|
StrobeReads - Read 8 bit bytes from a port and strobe a control line
VERSION 1.34+ of the firmware, VERSION 42+ of the DLL
Strobe read of a 1 to 6 byte value from a port. This command uses port A or B for the byte read, as well as a polarity (negative or positive) and a line (A.0 - B.7) to toggle based on the previously executed StrobeWrite or StrobeRead call.
Command Syntax: (USBm.dll)
USBm_StrobeReads( device, countarray, dataarray )
The USBm_StrobeReads function syntax has these parts:
|device||A zero-based index to address the appropriate USB device.|
|countarray||And array of number of bytes (1-6) to receive. Minimum size of the array must be 1 byte|
|dataarray||A byte array where the received data will be stored. Minimum size of the array must be 6 byte|
Control this command's port for the byte, polarity and strobe line by using the StrobeWrite or StrobeRead call.
|Public Declare Function USBm_StrobeReads _|
Lib "USBm.dll" _
(ByVal device As Byte, _
ByRef countarray As Byte, _
ByRef dataarray As Byte) _
| Dim countarray(1) As Byte|
Dim dataarray(6) As Byte
countarray(1) = &H04
dataarray(0) = &H55
USBm_SPIMaster 6, countarray(0), dataarray(0)
Control this command's port for the byte, polarity and strobe line by using the StrobeWrite or StrobeRead call. This command will then use the same selected port, polarity, and strobe line to read four bytes from device number six and store in dataarray.
|int USBm_StrobeReads( unsigned char device, unsigned char *count, unsigned char *data );|
Returns a string of byte data read from a port based on a strobing line and timing. the byte data string specifies the setup and so forth.
Raw Command Format:
|1||Number of Bytes (1-6)|
Raw Command Format Details:
Byte 0 contains the command. Byte 1 is the number of data bytes to read.
Byte 2 through byte 7 are unused.
Raw Command Response Format:
|2||Byte value read|
|3||Byte value read|
|4||Byte value read|
|5||Byte value read|
|6||Byte value read|
|7||Byte value read|
Raw Command Response Format Details:
Byte 0 contains the command. Byte 1 is unused. Byte 2 through byte 7 contain the data read.
Raw Command Example Usage:
Control this command's port for the byte, polarity and strobe line by using the StrobeWriteCmd or StrobeReadCmd. This command will then use the same selected port, polarity, and strobe line to read up to 6 bytes.
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