Recent Posts

Pages: [1] 2 3 ... 10
1
USB / Re: Unplug and then plug in USB device quits responding
« Last post by Jan Axelson on August 22, 2019, 06:30:36 pm »
I suggest using using breakpoints, single stepping, etc to find out where it is failing.
2
USB / Unplug and then plug in USB device quits responding
« Last post by andyu on August 15, 2019, 09:57:37 pm »
I'm using the usbhidio.vbp sample project in Windows XP and Visual Basic 6.  I've incorporated the FindTheHID, read and write functions with some success to communicate to a USB device.  However, when I unplug the USB cable and then plug it back in the interface stops responding to write and read commands.  I used the recommendations to close the HIDHandle, ReadHandle and set MyDeviceDetected to False found in the ReadReport subroutine of the utility with no luck.  This issue also occurs when using the usbhidio.vbp project with no modifications except for setting the MyVendorID and MyProductID to match the values of my HID.  Has anyone else experienced this and can share a solution?  Thank you.
3
USB / Re: How to start the USB bulk transfer with VS C#?
« Last post by Jan Axelson on August 06, 2019, 09:46:26 am »
See

https://www.microchip.com/forums/m728325.aspx

The Microship forums are likely the best place for Microchip-specific advice.
4
USB / Re: How to start the USB bulk transfer with VS C#?
« Last post by EddieSW on August 06, 2019, 08:19:29 am »
Hi, Jan,
   When I use MPLAB X to compile device-winusb_lvr.zip. There are error messages as below,

../main.c:135:10: fatal error: 'USB/usb.h' file not found
#include "USB/usb.h"
         ^~~~~~~~~~~
1 error generated.
../usb_descriptors.c:160:10: fatal error: './USB/usb.h' file not found

I think usb.h and usb library are offered from Microchip, so we need to set the include and library path in the project, is it?
After I search the usb.h in the MPLAB X environment,  there are many folders include usb.h
May I learn how do you solve this compile error? Thanks a lot.

5
USB / Re: How to start the USB bulk transfer with VS C#?
« Last post by Jan Axelson on August 05, 2019, 12:46:18 pm »
Microchip and others have development kits and example firmware for WinUSB.

http://www.janaxelson.com/winusb.htm
6
USB / Re: How to start the USB bulk transfer with VS C#?
« Last post by EddieSW on August 05, 2019, 07:26:01 am »
Hi Jan,
  Yes, I found the USB flash uses the different driver (usb storage), not winusb. If I want to test and trace the behavior of winusb_cs_31, which development kit could I use? Thanks for your advice.
7
USB / Re: How to start the USB bulk transfer with VS C#?
« Last post by Jan Axelson on August 02, 2019, 08:38:13 am »
If your device is a flash drive, it uses the mass storage class. Use the C# File class.
8
USB / Re: How to start the USB bulk transfer with VS C#?
« Last post by EddieSW on August 02, 2019, 05:29:02 am »
Hi Jan,
  Really thank for your reply. I am starting to trace code (winusb_cs_31) and try to understand it.
Currently, my USB flash is able to be detected by program when program is launched or USB flash is plug-in.
But I still have some problems to test bulk transfer with winusb_cs_31.
I will check it first and learn some knowledge from you later. Thanks a lot.
9
USB / Re: How to start the USB bulk transfer with VS C#?
« Last post by Jan Axelson on August 01, 2019, 12:10:45 pm »
For bulk transfers for an application that doesn't fit another defined class, I suggest using WinUSB:

http://www.janaxelson.com/winusb.htm

or virtual COM port:

http://www.janaxelson.com/serport.htm#usb_virtual_com_ports

Microchip and other chip providers have example firmware for these.

If you are using an existing device, start by learning what driver the host is using (Windows Device Manager).
10
USB / How to start the USB bulk transfer with VS C#?
« Last post by EddieSW on July 31, 2019, 11:40:55 pm »
Dear All,
  I am a new user of C# and USB. I want to design a window tool which to transfer the data between the PC and uC.
Currently, I am studying the visual studio C# and USB complete books, but I don't know how to start it.
Is anyone able to give me the suggestions? or where could i find the simple example code? Thanks for your help.  :)
Pages: [1] 2 3 ... 10