05-03-2008 05:48 AM
05-10-2008 03:54 PM
Hi Hary,
currently I try to communicate with a PIC18F4550 just like you do. But I have problems with the "read" function. In fact I am the "CVI-person" Philipp talked about 😉
Your microcontroller firmware seems to be very similar to my own. I also use the MCHPFSUSB framework. But perhaps the error is located in my microcontroller-program.
What parts of the MCHPFSUSB Framework have you changed? For my part, I just modified user.c, user.h and io_cfg.h. Do you have changed something else (descriptor files?). Perhaps you could show me the parts you changed or just give me some hints!
Thank you very much!
Best regards
Angela
05-16-2008 08:58 AM
05-17-2008 09:08 AM
Hi Hary,
thanks for your tip with the SENSE_IO, I changed that in my program.
I finally was able to solve the problem. My problem was, that the read function in LabWindows always collapsed (but write function worked...). Look at this threat for more details: http://forums.ni.com/ni/board/message?board.id=180&thread.id=35267
I solved the problem by changing the endpoint descriptors in the microchip framework (file: usbdsc.c). They now look like this:
/* Endpoint Descriptors *
sizeof(USB_EP_DSC),DSC_EP,_EP01_OUT,_BULK,64,0x00,
sizeof(USB_EP_DSC),DSC_EP,_EP01_IN,_BULK,64,0x00
Finally I created 3 different ports on my PIC and I am able to control them with CVI.
PORT A -> analog input,
PORT B -> digital input
PORT D -> digital output.
Best regards and thanks for your help!
Angela