|
|
View previous topic :: View next topic |
Author |
Message |
quocloc.pham
Joined: 16 Sep 2008 Posts: 6 Location: Vietnam
|
problem with USB firmware!! |
Posted: Mon Dec 29, 2008 1:57 am |
|
|
hi everybody!
i used USB firmware (driver of CCS) for 18F4550, but when attached to PC is PC display "USB Device Not Recognized".
who can talk for me know this problem?
i wait you help!
thanks! |
|
|
Ttelmah Guest
|
|
Posted: Mon Dec 29, 2008 3:56 am |
|
|
USB device not recognised, means what it says. It doesn't really tell you anything about 'what' is actually wrong, but says that the PC, is seeing a device attached, which it is not able to talk to or recognise during the enumeration phase.
The CCS USB examples, _do_ work.
You don't say which one you are trying to use (cdc, HID etc..).
Things that would cause this error include:
1) Not including the whole example. If you just load the USB driver, without a device descriptor.
2) Having the clock settings for your chip wrong.
3) Having the D+/D- connections reversed.
etc. etc..
Start by loading one example, 'as is'. EX_USB_SERIAL.C, is a simple one to start with. Triple check your connections. Then double check the oscillator setup for your hardware.
Best Wishes |
|
|
quocloc.pham
Joined: 16 Sep 2008 Posts: 6 Location: Vietnam
|
Re: firmware for PIC18F4550 |
Posted: Mon Dec 29, 2008 9:34 pm |
|
|
Thank you reply!
i used HID and setup all descriptor (attached file)
connected D+/D- not wrong (attached schematic)
I don't know this problem, i hope you can help me!!
thanks!
file: usb_demo_bulk.c
Copyrighted CCS code removed.
-- Forum Moderator
because i don't know how post a file, i describe schematic
PIN 23 (D-) connected to PIN 2 of socket USB
PIN 24 (D+) connected to PIN 3 of socket USB
PIN 18 (VUSB) not use |
|
|
Markdem
Joined: 24 Jun 2005 Posts: 206
|
|
Posted: Tue Dec 30, 2008 7:50 am |
|
|
Hello, In your last post, you say the VUSB pin is not in use. Do you mean you have nothing connected to that PIN? If so, you should check the datasheet for the PIC, and have a look what should be connected.
Also, you should have a bypass cap across the PIC power line, as close to the PIC as you can. I know last of other people, including me , have had problems with that.
Also, you do not need to post standard driver code here if you don't change them. We all have them.
Have Fun
Mark |
|
|
MicroManiac
Joined: 21 Aug 2008 Posts: 34
|
|
Posted: Tue Dec 30, 2008 8:45 am |
|
|
The usb connections are very sensitive ones
definitely you should put cap across the power lines.
Another thing, i didn't read the code but from the previous code, i noticed that you left the Vusb pin not connected. this is not what is should be.
the Vusb should be connected to ground through a 470nF capacitor.
i should repeat that the usb connection are very critical and should be connected differentially to avoid problems like "Usb device not recognized". _________________ "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Albert Einstein |
|
|
Ttelmah Guest
|
|
Posted: Tue Dec 30, 2008 10:16 am |
|
|
If you read the notes at the head of the forum, and at the top of the file you have posted, you will find you are in breach of both copyright, and of forum etiquette, by posting the CCS files.
Remove them.
The only stuff needed is _your_ code.
Not having a capacitor on Vusb, _will_ stop it working.
Other comments:
I don't see any reference to the connection sense pin. Your code should disable this, if you are not connecting it.
The question about the oscillator, is what crystal are you using. The 18F4550, can use about a dozen or more different oscillator configurations, and these need to be _right_ for USB to work.
You have both 'HS' (external crystal), _and_ 'EC_IO' (external oscillator module) selected. You can't have both.
You have 'PLL3', which would imply as external 12MHz source. Is it an oscillator module or a crystal. Work out which, and correct the fuses.
Best Wishes |
|
|
quocloc.pham
Joined: 16 Sep 2008 Posts: 6 Location: Vietnam
|
|
Posted: Wed Dec 31, 2008 12:41 am |
|
|
thanks you!
truth, it is problem with PIN Vusb. i surmount this problem
now, the enumeration of usb is ok.
i prepare to write interface on widows for test
Happy new year!!
best wishes! |
|
|
|
|
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
|