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 CCS Technical Support

ex_usb_kbmouse : waiting for enumaration...

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







ex_usb_kbmouse : waiting for enumaration...
PostPosted: Mon Sep 11, 2006 3:50 pm     Reply with quote

CCS HID Mouse/Keyboard Multiple Interface Demo
Press button to make mouse move in a circle and send an A over the keyboard
PCH: v3.249

USB connected, waiting for enumaration...
USB disconnected, waiting for connection...
USB connected, waiting for enumaration...
USB disconnected, waiting for connection...
USB connected, waiting for enumaration...
...
...

Any hint on what may be wrong ?
I'm using my own hardware with a 20MHz crystal.

Regards
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Mon Sep 11, 2006 6:28 pm     Reply with quote

1) Check you have a capacitor connected to the PIC's VUSB pin.
2) If you are using a USB sense pin check you have it wired right.
Guest








PostPosted: Mon Sep 11, 2006 11:31 pm     Reply with quote

Thanks for your help

1) I have a 470 nF capacitor connected to the PIC's VUSB pin. May be I dhould change this to a 220nF.

2) I'm using a 18F2550, bus powered only. no sense pin.

Regards
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Tue Sep 12, 2006 9:22 am     Reply with quote

470nf should be fine. I assume you tried rebooting your PC or have tried plugging into a different port. Start troubleshooting with a port directly connnected to your mobo before trying a remote hub. Probably your D+ and D- connections are ok and assuming you don't have the usb power bus overloaded..I think the CCS descriptor (bus power is in 2ma units) is defaulted to 50 for 100ma; it is going to be software. I use snoopypro (free download from the web) as a usb sniffer. Now if you are using a Softee OS things will be quirky. They will abort the enumeration after getting a few bytes of a perfectly good descriptor then immediately ask for it again this time accepting it. Once you are enumerated and out of the Softee woods things are very logical as far as the data flowing in the pipes.With the usb sniffer you'll see the exchange and can troubleshoot from there. Oh check the registry under HKey_LOCAL_MACHINE> SYSTEM>ControlSet001>Enum>USB to see if the VID PID you are using is
registered. If it is not it should ask you for the driver but this is a Softee OS so it may exhibit free undocumented features.
Another thing the usb section of your PIC must run at 48 Mhz so double check the divisor selection. The rest of the PIC can run at another speed entirely. I used the CCS ICDU 40 but mine is unstable at 40mhz , with my pic divisor set to give 32 Mhz and the USB section at 48Mhz it worked well.
NicolasC
Guest







PostPosted: Tue Sep 12, 2006 2:29 pm     Reply with quote

In descriptor bus power is set to 50 for 100mA. The code comes from the examples directory and is almost unchanged.

When I plug USB connector, WinXP shows the unknown device message popup.

As my serial link for debug msg runs fine, I guess the divisor selection is not so bad :
20MHz crytal,
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN
#use delay(clock=48000000)

In the source, as I don't use sens pin,I added comment out for the following line:
// #define USB_CON_SENSE_PIN PIN_B2

Now I'm "looping" anymore, I just hang waiting for enumeration :

CCS HID Mouse/Keyboard Multiple Interface Demo
Press button to make mouse move in a circle and send an A over the keyboard
PCH: v3.249

USB connected, waiting for enumaration...
NicolasC
Guest







PostPosted: Tue Sep 12, 2006 3:49 pm     Reply with quote

Arg !!!!!
I'm so STUPID. After checking for the xxx times I found it !!! D+ D- signal crossed in my schematic so also on the PCB.
Now it's running fine.

Thanks a lot for your help.
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