Write 8-bit bytes to a port and strobe a control line
VERSION 1.34+ of the firmware, VERSION 42+ of the DLL
Description:
Strobe write of a 1 to 6 byte value to a port. This command uses port A or B for the written byte, 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_StrobeWrites( device, countarray, dataarray )
The USBm_StrobeWrites function syntax has these parts:
Part | Description |
device | A zero-based index to address the appropriate USB device. |
countarray | Byte array with the number of bytes (1-6) to send, and where the returned number of bytes will be stored. Minimum size of the array must be 1 byte |
dataarray | Data to send. A byte array where the transmitted⁄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_StrobeWrites _ 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(0) = &H03 dataarray(0) = &H55 USBm_StrobeWrites 6, countarray(0), dataarray(0) |
Control this command’s port for the written 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 write three bytes from dataarray to device number six.
C Prototype
int USBm_StrobeWrites( unsigned char device, unsigned char *count, unsigned char *data ); |
C Example
RobotBASIC
usbm_StrobeWrites(ne_DeviceNumber,se_ByteData)
Returns true if successful, false otherwise. Writes multiple bytes (1 to 6) to a port based on a strobing line and timing. the byte data string specifies the setup and the data to be written.
Raw Command Format:
Byte Number | Description |
0 | 0Dh: StrobeWritesCmd |
1 | Number of Bytes (1-6) |
2 | Byte 1 |
3 | Byte 2 |
4 | Byte 3 |
5 | Byte 4 |
6 | Byte 5 |
7 | Byte 6 |
Raw Command Format Details:
Byte 0 contains the command. Byte 1 is the number of data bytes to write.
Byte 2 through byte 7 are the data bytes.
Raw Command Response Format:
Byte Number | Description |
0 | 0Dh: StrobeWriteCmd |
1 | <not used> |
2 | <not used> |
3 | <not used> |
4 | <not used> |
5 | <not used> |
6 | <not used> |
7 | <not used> |
Raw Command Response Format Details:
Byte 0 contains the command. Byte 1 through byte 7 are unused.
Raw Command Example Usage:
Control this command’s port for the written 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 write up to 6 bytes.