HI;

To send data from PIC to PC, you must do something like this ( Allready posted in the code of the post #1 )

Code:
ARRAYWRITE USBTXBuffer, [Value0, Value1, PORTA.2,PORTA.3, PORTA.4, PORTA.5,0,0]
You don't have to worry about the first byte be equal to 0, only ont the PC to PIC side.

If you want to send from PC to PIC, you must do something like this ( Allready posted in the code of the post #1 )

Code:
PublicSub WriteSomeData()
' Use to send data to the USB bus.
' data must be store in BufferOut array
'
' Actual structure:
' -----------------
BufferOut(0) = 0    ' first by is always the report ID
BufferOut(1) = 127 ' value from 1º slider
BufferOut(2) = 255 ' value from 2º slider
BufferOut(3) = 10
BufferOut(4) = 100
BufferOut(5) = 178
BufferOut(6) = 0
BufferOut(7) = 0
BufferOut(8) = 0
hidWriteEx(VendorID, ProductID, BufferOut(0)) ' send it
EndSub