Hi rocky

When you call hidWriteEx(VendorID, ProductID, BufferOut(0)), what you are doing is sending a packet as such out to the USB port.
So you can define the length of that buffer in your VB vode at the top of the code:
Private Const BufferInSize = 64
Private Const BufferOutSize = 64

and in your PBP code:

USBBufferSizeMax con 64 ' maximum buffer size
USBBufferSizeTX con 64 ' input
USBBufferSizeRX con 64 ' output

I think min is 8 bytes and max 64.

So just change these variables to cut down the amount of bytes you want to send.

BufferOut(0) is a report ID and data starts at BufferOut(1)

Regards

Sean.




Quote Originally Posted by rocky79
Hi Sean,

If i want to write a byte to the microncontroller can i say BufferOut(2)=%10011111 (" for example)
In your code above:
BufferOut(1) = 68 'Ascii Value for D
BufferOut(2) = 65 'Ascii Value for A
BufferOut(3) = 84 'Ascii Value for T
BufferOut(4) = 65 'Ascii Value for A
hidWriteEx VendorID, ProductID, BufferOut(0)
and to send the info,
are you sending BufferOut(2), BufferOut(3)....and so on?
if i wanna send the values in bufferout(2) would the code look like this below?
hidWriteEx(VendorID, ProductID, BufferOut(0),BufferOut(2) )


Thanks much