|
|
View previous topic :: View next topic |
Author |
Message |
spom
Joined: 12 Jul 2007 Posts: 32
|
Win XP can't install driver for USB HID |
Posted: Fri Aug 01, 2008 2:05 am |
|
|
Hi everybody,
I have a little problem with using HID USB.
I use the PIC 18F4550 with a 4MHz crystal and the example code "ex_usb_hid.c". I changed the clock to 4000000 an comment out #if and #elif parts so that I have
Code: | #define __USB_PIC_PERIF__ 1
#DEFINE LED1 PIN_A5
#include <18F4550.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7) |
Now I want to use it. Win XP find that there is a new hardware but it can't install it as there isn't the right driver.
Can me help somebody?
Thanks. |
|
|
Ttelmah Guest
|
|
Posted: Fri Aug 01, 2008 4:22 am |
|
|
It won't, because your system is not running a legitimate frequency.
The USB circuitry, _must_ run at 48MHz.
With 4MHz in, you need to select 'PLL1', so the incoming clock is not divided before being fed to the USBPLL circuit. Then the 4MHz, is multiplied by 24, to give the 96Mhz master clock for the USB stages. This is then divided by 2, to feed the USB clock. Currently, you are trying to run the USB at 9.6MHz...
Now, do you really want to run the main CPU at 4Mhz?. This is low, and _may_ give timing problems with handling some of the USB transactions fast enough. Your choices are:
XT (not HSPLL) and CPUDIV1 - gives 4MHz for the CPU (clock=4000000)
XTPLL and CPUDIV1 gives 48MHz for the CPU (clock=48000000)
XTPLL and CPUDIV2 gives 32MHz for the CPU (clock=32000000)
XTPLL and CPUDIV3 gives 24MHz for the CPU (clock=24000000)
XTPLL and CPUDIV4 gives 16MHz fo the CPU (clock=16000000)
Or you can use the internal RC oscillator to run the CPU (but _not_ the USB).
Personally, I'd suggest you will find operation more likely to work properly, using XTPLL, CPUDIV4, and the 16Mhz operation. 4MHz, is 'pushing it',for USB. If you are not doing anything 'timing critical' in the main processor, then selecting INTRC, and running the CPU at 8Mhz is another good option (you will still need PLL1, and the 4Mhz crystal, to run the USB circuitry).
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
|