PICcoder.co.uk Forum  


::post new topic::
USB Data exchange stops
Date: 2008/04/21 13:58 By: David Status: Visitor  
 
Hello, I`m having a big problem with my setup:
Description: PIC DEMOP Board with 20 Mhz Resonator, PIC 18f4550
Using the c# PC Programm code the system is only sending once a telegramm to the PIC Board. After receiving the correct data from the Pic Board the PC Program is not sending any message anymore until i restart the PIC program with a reset.
I logged the usb bus communication to fiind a solution.
Did anybody hadve a simmilar problem or an idea what could be the reason for that ?

Thanks a lot for Your help !!
reply | quote

Re:USB Data exchange stops Additional Info
Date: 2008/04/21 14:59 By: David Status: Visitor  
 
Additional Information:
The reason why my c# application stops sending is, the following function in the class "usb_interface.cs":

open_pipes();
if(_MPUSBWrite(myOutPipe,(void*)SendData,SendLength,&SentDataLength,SendDelay)==1)
>> returns false; and this is handeld in the dll.

If i take a look to the logging file of the data which was sent and received before i can`t find an error:

This is the USB log file of the first and last correct communication

1. Windows sends Data
000029: Bulk or Interrupt Transfer (DOWN)
Pipe Handle: 0x86a0c024 (Endpoint Address: 0x1)
Send 0x1 bytes to the device

000030: Bulk or Interrupt Transfer (UP),
Status: 0x00000000
Pipe Handle: 0x86a0c024 (Endpoint Address: 0x1)
Send 0x1 bytes to the device

2. Device responds:
000031: Bulk or Interrupt Transfer (DOWN),
Pipe Handle: 0x86a0c044 (Endpoint Address: 0x81)
Get 0xa bytes from the device

000032: Bulk or Interrupt Transfer (UP)
Status: 0x00000000
Pipe Handle: 0x86a0c044 (Endpoint Address: 0x81)
Get 0xa bytes from the device
reply | quote

::post new topic::