I see you've figured it all out now :) Jinx wrote: >>From what I can gather then - > > If you want to use USB, you'd have to use a, for example, 4MHz > crystal to get the 96MHz so that the USB module is running at > a compliant speed Yep - USB wants a precise clock of course. In full-speed mode it needs 48Mhz, which comes from an internal /2 divider of the 96Mhz PLL out, which is 24*input, so the PLL input has to be 4Mhz. You can of course use any multiple of that that can be divided down using PLLDIV (I use 8Mhz usually). In low-speed mode things change, and USB wants a 6Mhz clock. This comes from the CPU primary clock divided by 4, so the primary clock must be 24Mhz as obtained using either the PLL or just using CPUDIV with a non-PLL oscillator mode (with an external 24Mhz clock, for example). Of course, in either case, you can use the alternate clocks (T1OSC or INTOSC) to clock the CPU at other speeds. > If you also wanted a 'non-decimal' clock for comms etc, then a > separate crystal should be used on the secondary oscillator to > run the core and peripherals Yep. If it's RS232 comms, I usually just deal with the 1% error or so that results from an imperfect baudrate multiple. If you need precise timing that you can't derive from the USB clock though, you'll have to use T1OSC. -- Hector Martin (hector@marcansoft.com) Public Key: http://www.marcansoft.com/marcan.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist