Page 1 of 1

USB Device Not Recognized

Posted: Wed Sep 29, 2010 4:32 am
by mb02155
I am trying to get a simple USB environment up and running with a PIC18F4550 and the Olimex PIC-USB-4550 (http://www.olimex.com/dev/pic-usb-4550.html). My flowchart is as follows:

1) USBSerial(0) Initialize_Serial
2) while (1)
3) USBSerial(0) ReadByte
4) USBSerial(0) SendByte
5) end of loop

When I plug the Olimex board into the USB port on my computer I get the error "USB Device Not Recognized". I am never prompted for a driver.

What am I doing wrong?

Thanks,
Marty

Re: USB Device Not Recognized

Posted: Wed Sep 29, 2010 5:25 am
by medelec35
Hello mb02155
I would guess it's down to configuration settings? Even if you have not got the drivers installed, the USB has to be correctly configured within your flowchart, before the drivers are asked to be installed.
Take a look here:
http://www.matrixmultimedia.com/mmforum ... =29&t=7675

If you don't mind posing your flowchart, that can be checked for you.
If you want to keep your flowchart private, you could save as a different name, an delete a load of icons, then post it.

Re: USB Device Not Recognized

Posted: Wed Sep 29, 2010 5:35 am
by mb02155
Thanks for the reply. My code is attached....

Re: USB Device Not Recognized

Posted: Wed Sep 29, 2010 7:28 am
by Gypo
Marty

I have changed a few things and this one works
I have used a 4550 with a 20Mhz crystal, if you use a different crystal you will have to change things

Things to look for is;
(View/Project Options) the clock speed I have put it up to 48000000
(Chip/Configure/Switch To Expert Config Screen) I may have made changes there too, I can't remember so check.
I have added a check to see it the USB port is ready to use (error free) if not jumps past all code
As the USB seems to get 0xFF in when there is no activity I have added a check to see if the input is garbage and if so jumps past your code

I have attached the changed program and the driver file it will ask for

I hope this helps
Changed Project.zip
Your changed program
(2.64 KiB) Downloaded 291 times

Regards

Re: USB Device Not Recognized

Posted: Fri Oct 01, 2010 4:39 am
by mb02155
Gypo,

That worked perfectly! Thank you very much!!

Marty

Re: USB Device Not Recognized

Posted: Fri Oct 01, 2010 8:02 am
by Gypo
Marty, Great,

It's good to know I can help someone else for a change.

:P