Here is my template for USB and VB6
http://www.picbasic.co.uk/forum/show...812#post106812
I think that value stored in buffer(1) in vb, is value in buffer(0) in PBP...
Values are shifted one place when you compare array on pc and pic.
I'm forget why this is happen, so I'm not sure 100%...
Here is comment from code
PORTA=USBRXBuffer[0]'PC BufferOut(1)
And here is why:
BufferOut(0) = 0 ' first by is always the report ID
' write the data (don't forget, pass the whole array)...
When you send data from PIC to PC, I think that values are on same place...
Hope that this will clear what is going on...
EDIT:
And as you can see from Darrel's post USB buffer are at least 8 byte's
DEFINE USB_INSIZE 64 ; IN report is PIC to PC (8,16,32,64)
Bookmarks