SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By reklipz
#15670
Hello everyone.

I'm trying to use the 18F2550 along with its USB module.

I would like to use it with Full Speed (12Mb/s) which requires a 48MHz clock to drive the USB Module.

My question is, is it possible to run both of these, the PIC CPU and the USB module off of the same internal clock?

If not, I also have a 4MHz resonator at my disposal, and would like some input as to how I should set this up for optimal use.

Also, if someone is using this same PIC with teh USB module, if you could post your setup, that would help also.

Thanks in advance!
By EmbeddedMan
#15673
reklipz,
It is not possible to use the USB of these PIC chips from only an interal RC oscillator. You can run the processor core from the internal oscillator, but I don't believe it has enough accuracy for USB operations. You can use many different speeds of external oscillators or crystals and the on-board PLL to get the 96MHz internal speed (divided down to 48MHz) needed for the USB engine.
4MHz resonator will work fine - just make sure to set your clock config bits properly. For complete schematics and source code for exactly this configuration, see http://greta.dhs.org/UBW and check out the UBW board that SparkFun now sells. (They use a 20MHz resonator, but I use 4MHz on my boards - doesn't really matter as long as the config bits are set right.)

*Brian
By reklipz
#15681
awesome, this is exactly what I wanted to know.

The datasheet gets so confusing when it spans information ove about 6 or 7 pages, and then references something you've read in the beginning. I either forget what it's referencing, or assume it's something its not.

The schematic helped lots.

Thanks again!
By reklipz
#15698
Just thought I would post that I got things to work.

Also, I read about the UBW, really neat device with lots of applications, props for the sweet contribution.