On 2010-02-11 00:40, Lee Mulvogue wrote: > G'day all > A couple of (theoretically) simple questions, which I haven't found > definitive answers to elsewhere; > - Normally, the instruction speed is 1/4 that of the crystal (ie. > 5MHz with a 20MHz crystal), correct?; Yes, but you normaly doesn't measure the first in "Hz". The datasheet uses instruction cycles, not ? > with PLL enabled, does that then > mean that the instructions run at the same speed as the crystal? > If so, any disadvantages? Yes and no. It's a non-issue, more or less. Just use the PLL if you want and need it. > - Seems there are limits to the above; for the chip I am currently > playing with (PIC18F2620) > (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010284), > [1] > it seems to say that you can only use PLL for " frequencies up to 10 > MHz. A PLL then multiplies the oscillator output frequency by 4 to > produce an internal clock frequency up to 40 MHz"; 40 MHz is the max speed of many PIC18's, correct. And a 20 MHz crystal is the fastest crystal supported. > so does that mean > if a 10MHz crystal is used with PLL, the internal clock runs at 40MHz, Yes. > but the 1/4 instruction cycle means the instructions run @ 10MHz? Not "but". There is always 4 clock cycles in each instruction cycle, no matter PLL or not. > So > a 10MHz crystal with PLL gives an instruction speed of 10MHz, as > opposed to the 2.5MHz without PLL? If you want. > - MIPS. A newer, cheaper chip that I am looking at with similarish > specs, the PIC24FJ64GA104 > (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en536114), > [2] > says it can run @ "Up to 16 MIPS Operation @ 32 MHz"; how are these > figures figured out? > With the 18F2620 it says up to 10MIPS, which I can relate to 10MHz Again, do not use Hz for those things, it's confusing. Everyone will think you talk about the main oscillator. > crystal with PLL (4x 10 = 40, 40/4 = 10), are the 24F chips running at > one instruction every _2_ cycles instead of every 4 maybe? I would expect the datasheet to be very clear on that point, not ? > As per my previous posts, I'm attempting to play basic sound from > internal memory, it's working OK but I think I need to squeeze some > more speed out for room to breath, especially if I'm going to be doing > any other calculations at the same time (sound is 8bit 16kHz mono, so > interrupting and processing every 62.5us; actually interrupting every > 31.2us and doing the routine every second interrupt, closest method I > could find to get the right speed). > So instead of using a 20MHz straight crystal, am I better off with a > 10MHz combined with PLL? On most of the older PIC18, 20 MHz is the fastest crystal supported. 10 Mhz crystal with PLL enable is the fastest speed of the processor supported. Many newer PIC18's runs at higher speeds. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist