The datasheet says 20MHz is okay to go into HSPLL. You just use a /5 prescaler and the resulting 4MHz is then used to produce a fixed 96MHz PLL reference clock.
What I can't configure however is the 4x slower operation (I want 'pause 1' to actually pause for 4ms!).
I just wanted to see if i could pull this timing thing off without having to use a different xtal. I started everything with 20MHz HS but now that I'm forced to use HSPLL, which is new to me, I know 20 won't work so I'm done with it. The reason I'm moving to HSPLL is because my circuit only enumerates consistently on PC's but not Mac's, unless I use HSPLL instead of HS.
I'm sure both 12 and 24 will work but is there any preference?...unless there is some other way to get the timing I want and still use the 20MHz xtal!
Actually, it doesn't seem possible no matter what value I choose. Using HSPLL and also somehow getting the program to run 4 times slower is tougher than I thought. Now I will probably start experimenting with changing my ADC_SAMPLEUS value as well as all my PAUSE and PAUSEUS statements...
Why do you want PAUSE 1 to pause for 4mS? Can't you just use PAUSE 4?
Note you do not have to use HSPLL. With a 20MHz osc you can set the PLL divisor to
/5, USBDIV /2, and the USB core will run at 48MHz. You can set FOSC = HS and set the
CPU divisor to CPUDIV = OSC1_PLL2 and use DEFINE OSC 20.
The PAUSE was just an example. I need every instruction and every aspect of the program to run 4 times slower than normal.
I already was using HS as you suggested and everything was fine, except enumeration would not carry out through a USB hub into a Mac. It worked in every other condition, PC and Mac. When I use HSPLL it enumerates every time in any situation. Unfortunately, my program works best 4 times slower than it does at normal speed, which was very possible using HS in the scenario I outlined above, but not possible so far using HSPLL.
So what did you have the CPU divisor set to when it worked with HSPLL set on the MAC?
I know zero about the MAC, but it could be that your main-line program code is too slow
to meet the MAC USB tming. I.E. it could be that a USB device needs to check in more
often than on a PC platform to maintain the connection.
More details would really help.
Here's a simplified question about something I just noticed:
on an 18F2550 with a 20MHz xtal programmed HS with no postscaler and a DEFINE OSC 20...
Pause 2000 pauses for exactly 2 seconds
but with the same setup...
For cnt=1 to 2000
Usbservice
Pause 1
Next cnt
pauses just for 258ms
Why? First off, I thought I wasn't supposed to be able to Pause 2000 and maintain my USB connection but I am. Secondly, what's with the timing discrepancy?
Bookmarks