Read 8-bit bytes from a port and strobe a control line
VERSION 1.34+ of the firmware, VERSION 42+ of the DLL
Description:
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:
Part | Description |
device | A zero-based index to address the appropriate USB device. |
countarray | And array of the 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 |
Remarks:
Control this command’s port for the byte, polarity and strobe line by using the StrobeWrite or StrobeRead call.
VB Declaration
Public Declare Function USBm_StrobeReads _ Lib “USBm.dll” _ (ByVal device As Byte, _ ByRef countarray As Byte, _ ByRef dataarray As Byte) _ As Integer |
VB Example
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.
C Prototype
int USBm_StrobeReads( unsigned char device, unsigned char *count, unsigned char *data ); |
C Example
RobotBASIC
usbm_StrobeReads(ne_DeviceNumber,se_ByteData)
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:
Byte Number | Description |
0 | 0Eh: StrobeReadCmd |
1 | Number of Bytes (1-6) |
2 | <not used> |
3 | <not used> |
4 | <not used> |
5 | <not used> |
6 | <not used> |
7 | <not used> |
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:
Byte Number | Description |
0 | 0Eh: StrobeReadCmd |
1 | <not used> |
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.