CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

USB HID communications problems with some PC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
skaman



Joined: 09 May 2008
Posts: 2

View user's profile Send private message

USB HID communications problems with some PC
PostPosted: Fri May 09, 2008 4:06 am     Reply with quote

Hi all,
i've realized a little board with pic 18f4550 and an usb connector.
I've used the ccs library for hid support and i've developed my windows application.

All seem to work but, on few computers, i've experienced some problems with communication.

I can send data from PC to PIC correctly but I lose all data sended from PIC to PC.

I saw the problem only over 3 PC with Windows XP (2 desktop and 1 notebook). The notebook show the problem only if it work with battery. With AC adapter it work correctly.

I don't think is an hardware problem, because i can use the USB bootloader correctly on ALL computers (with original microchip usb bootloader example with C18)

Someone have experienced this problem? Some ideas?

Thank you
Bcox



Joined: 09 Oct 2007
Posts: 17
Location: Windsor, CT

View user's profile Send private message Visit poster's website

PostPosted: Fri May 09, 2008 6:24 am     Reply with quote

Hello,
To me this is an interesting problem. I am developing an HID device with the same chip and am making my own application using LabView for the GUI. I have yet to try the system on other computers than my desktop.

When running on battery for the laptop, would the V+ voltage from the computer out to the PIC change to say 3.3V or something else than 5V to conserve power? Are you sensing a connection to the laptop in the PIC? Would the laptop try and slow down communication to USB1 speeds if on battery and the PIC is trying to run at full speed? Do you know if you are connecting to a USB1 or USB2 port? I don't if any of this really matters. I am new to this myself and am learning as I go.

Personally, I don't have any idea what is going on. I am new to USB and am just throwing out some ideas. I don't know if any of them matter or not. Good luck! If anyone has other ideas, I would also like to know as I might be in the same boat as I develop my system.
Ttelmah
Guest







PostPosted: Fri May 09, 2008 7:58 am     Reply with quote

Check what chipsets a used by the machines with problems.
Historically, there have been problems with Via chipsets, but these seem to have been fixed with recent releases and drivers. However recently, I have had problems with machines using Intel chipsets. Since about December last year, these have been showing really 'odd' behaviour with some devices. Working fine with many units, but giving intermittent failures with others. I have switched 'back' to a December dated chipset driver, and with this the units work fine....
Failures have ranged from a loss of data, to complete loss of communication.

Best Wishes
skaman



Joined: 09 May 2008
Posts: 2

View user's profile Send private message

PostPosted: Mon May 12, 2008 2:57 am     Reply with quote

I've checked voltage and it's all ok. I've tryed also all usb port on this computer. Windows see correctly the PIC and automatically install the default HID driver. It see correctly my usb descriptor and in windows i can see my VID, PID and RELEASE.
All seem to work correctly... but my application can't communicate with PIC.
I did other test. I've connected oscilloscope to D+ and D- and i've see that:
- on working computer i've a clear wave shape
- on NOT working computer i've a distorced wave shape
Now, i suppose it's an hardware problem. But i don't understand:
- why original microchip bootloader example work correctly?
- why windows recognize the device and read correctly my descriptor?

Ttelmah, i've checked the mainboard chipset. We have all INTEL chipsets on all our computers. On problematic computers we have an old 8xx intel chipset. On working computer we have a newer 9xx intel chipset. So I suppose you're right. There's some problems with intel chipset.

I checked the files in c:\program files\PICC\Drivers and i can see the date for pic18_usb.h is 5 february 2008. What file are you using? Where I can find and older version?

Thank you
Ttelmah
Guest







PostPosted: Mon May 12, 2008 4:01 am     Reply with quote

It is not the PIC driver, but the chipset driver for the actual Intel part. They 'tweaked' something to supposedly improve USB performance, and it seems to give problems with some devices. The driver comes from Microsoft, routinely as part of the Windows updates. However it is available from Intel (or in most cases the motherboard manufacturer) as a separate download. Normally called "Motherboard_driver_chipset_Intel". I found this a couple of months ago, and there have been quite a few reports about it on the web. It has been reported to MS, and Intel, and a new driver appeared a few days ago, for Vista (where the problem was even worse...), which seems to work. I'm sure a proper fix will be coming in the next couple of weeks for the older OS's.
If you have the motherboard manufacturers CD, try installing the motherboard driver set from this. It'll probably complain that the driver is older than the one installed, but it then all starts working again (but with slightly lower performance on some USB transfers).

Best Wishes
tugrul
Guest







PostPosted: Tue Jun 02, 2009 5:51 am     Reply with quote

I have some problems like that I can connect the device on my own PC or notebook. But when I want to connect from another PC or Laptop I cannot connect. I send data but cannot receive.

What should the problem be?
Guest








PostPosted: Tue Jun 02, 2009 8:13 pm     Reply with quote

I really dislike these problems! RS232 used to run so well... But alas that's progress.

As another check - do the problem PC;s have problems with other USB devices too or just your hardware - that will tell you if it is a chipset issue or something with your hardware.

The 'Distorted waveforms' does not sound good - does your device draw excessive current when operating on a 'bad' PC? This might tell you something. Sometimes putting 22 or 47 pf from D+ and D- (both pins at once) to ground can help.

I have had cheap cable issues that won't allow the device to enumerate properly and old USB connector issues on PC's that have been used a lot.

This might be something to check.

As an aside - I have been using FTDI devices for some time now and I have never had an issue with them on any PC. This is interesting - I'm not being a 'fanboy' but there is probably something to be gleaned from this.

Boy - these USB driver issues are a mess when stuff does not work.

Hope these ideas are worth something...

Steve H.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group