Showing results for 
Search instead for 
Did you mean: 

help!! USB by mpusbapi.dll Library

Go to solution

I'm having some problems trying to manage the USB BULK communication. 
i'm not trying it by VISA but by library (precisely mpusbapi.dll). i have everything done correctly (you will tell me if i am wrong) and i can run the program and it ends without any problem report, but i'm not getting the communication.


something that results me strange is that when it is getting the return for the MPUSBOPEN library function, it gets the same number for the input and the output, something like '4294967295'. so I suppose that the problem may be in the pipe opening.


punctually i am sending the number '5' in a 8bit integer from a PIC18F4550 according to the CCS code: 

usb_put_packet (1, a, 8, USB_DTS_TOGGLE);

the CCS header configuration of the USB is:

#define USB_HID_DEVICE FALSE // deshabilitamos el uso de las directivas HID
#define USB_EP1_TX_ENABLE USB_ENABLE_BULK // turn on EP1(EndPoint1) FOR IN bulk/interrupt transfers
#define USB_EP1_RX_ENABLE USB_ENABLE_BULK // turn on EP1(EndPoint1) FOR OUT bulk/interrupt transfers
#define USB_EP1_TX_SIZE 32 // size to allocate FOR the tx endpoint 1 buffer
#define USB_EP1_RX_SIZE 32 // size to allocate FOR the rx endpoint 1 buffer

if it is necessary i can upload also the descriptor C definer; you tell me; and obviously i'm uploading the VI.

0 Kudos
Message 1 of 2
Accepted by topic author opium

after some work, i have solve the problem. i have developed a vi, thata throw the microchip usb library sends and writes data in a pic18f4550 (it doesn't matters witch uc it is,, just that it have to be a microchip one). 


bye, and hopes that it help anyone. 

Message 2 of 2