USB windows 10 problems

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Post Reply
richardb
Posts: 306
Joined: Tue Oct 03, 2006 8:54 pm

USB windows 10 problems

Post by richardb » Mon Oct 30, 2017 8:31 am

We have recently started having occasional windows 10 connection problems saying "usb device not recognised" apparently unplugging and re plugging can fix the problem. When it does connect it works flawlessly.

we are using a pic18f2553 in hid mode.

has anyone else seen this and fixed the problem?

one of the things I was going to try was to reset the pic if I could tell the connection haddent been made.

Is there a simple way for a pic to reset itself in code?


Richard

PS I'm not convinced this is only a problem on windows 10 but the feedback quality isn't great.

Jerry Messina
Swordfish Developer
Posts: 1469
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: USB windows 10 problems

Post by Jerry Messina » Mon Oct 30, 2017 9:21 am

Here's what I use to do a software reset. It has the same effect on all the registers/peripherals as all the other resets (pon, wdt, etc)

Code: Select all

public sub reset()
   asm
      reset
   end asm
end sub

richardb
Posts: 306
Joined: Tue Oct 03, 2006 8:54 pm

Re: USB windows 10 problems

Post by richardb » Mon Oct 30, 2017 3:31 pm

thanks Jerry,
Hmmm..

Jerry Messina
Swordfish Developer
Posts: 1469
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: USB windows 10 problems

Post by Jerry Messina » Mon Oct 30, 2017 5:03 pm

I don't have windows 10, but usually "device not recognized" problems end up being startup/enumeration issues.

Once the USB peripheral is setup and enabled you have very little time to do anything but respond to the enumeration sequence.
After that things settle down some and are a bit more forgiving.

Are you running via USB power? If not then you don't want to enable the peripheral until you sense it attached and you're ready to enumerate.

richardb
Posts: 306
Joined: Tue Oct 03, 2006 8:54 pm

Re: USB windows 10 problems

Post by richardb » Thu Nov 02, 2017 7:45 am

I should add that I'm using HID.

I am not running from usb power, but I'm told the order in which its attached doesn't matter.

I don't have the part with me at the moment but I wanted to see if anyone has seen connection problems.

I might try resetting the pic if no connection is made within a certain period of time.

Thanks again Jerry


Richard

Post Reply