Protocol for VM140/VM167?

Is there documentation available for the VM140 and VM167 protocols on the serial bus?

Sorry, no such document.

I have documented the VM167 protocol, it is not serial but bulk USB transfers

Check my SourceForge project for more info, I’m currently uploading what I have done the last month.
VM Drivers

Thanks. Hopefully this will help me skip some time with the USB sniffer :slight_smile:

Its really disappointing this information isn’t readily available - its delayed several projects by months so far, and canned a couple of products.

Here is the protocol based on your code. I suspect there are errors in it, and I may have added more in transcription, as some of the commands (as documented), aren’t working on my board. Now that I have a framework, I’ll go through the USB Sniffer logs, and try to correct anything I find, and repost.

Byte 0 ([0]) of the output is a command, one of

0 - Read Analog Channel
1 - Read all Analog Channels
2 - Set PWM
3 - Set both PWM
4 - Read all digitial channels
5 - Write all 8 digital channels
6 - Clear digital channel
7 - Set digital channel
8 - Set I or O on digitial channels
9 - Read counter
10 - Reset Counters
11 - Get Firmware revision
12 - Read back PWM output
13 - Read Back I/O mode
14 - Unknown function

Byte 1…n is parameters… and the particular command returns bytes 1…n where applicable

Command Parameters Returns
0 [1] Channel - 1 (zero based ch) [1] Low Order Byte
[2] High Order Byte ([1] + [2] * 256)

1 None [1] Low Order Byte, Channel 1
[2] High Order Byte, Channel 1
[3] Low Order Byte, Channel 2
[4] High Order Byte, Channel 2
[5] Low Order Byte, Channel 3
[6] High Order Byte, Channel 3
[7] Low Order Byte, Channel 4
[8] High Order Byte, Channel 4
[9] Low Order Byte, Channel 5
[10] High Order Byte, Channel 5

2 [1] Channel - 1 (zero based ch) N/A
[2] Data
[3] Frequency

3 [1] Data1 N/A
[2] Data2

4 None [1] Contains status of digitial
channels

5 [1] Data N/A

6 [1] All 1s, except target ch N/A

7 [1] All 0s, except target ch N/A

8 [1] Low Nibble N/A
[2] High Nibble

9 [1] Counter # (0 used) [1] low order byte
[2]
[3]
[4] high order byte

10 [1] Counter # (0 used) N/A

11 N/A [1] low order byte
[2]
[3]
[4] high order byte
12 N/A [1] First PWM value
[2] Second PWM Value

13 N/A [1] I/O mode

14 [1] Parameter [1] Card exists?