different clock speeds - why?
RobertW
Posts: 66
Hello,
It seems like for as long as I have read this forum, there have been questions related to clock speed.· Some want to give their chips an eletronic heart attack by speeding things up·and some are looking for the slowest they can run and still have their application run.· My·basic question·is why?· I see that by using pll_ _ x an external clock can be sped up to 80MHz for example, but then why are there options for 1x, 2x, 4x, 8x, etc.?· Is this to conserve power?· I can understand that a faster clock speed can handle more 'calculations / processes' per second, etc., so faster is better...· Also, if the internal clock of 20kHz and 12MHz are only approximate speeds, then why were they included in the design of the chip?· Or, is something required for the internal workings of the chip?· Not trying to sound negative, just curious.
Lastly, how do you know how fast the clock speed should be for an application?· I know that many (if not all)·of the files in the OBEX have this defined but what about new objects?· I would think there is a better way then trial and error.
Thank you.
It seems like for as long as I have read this forum, there have been questions related to clock speed.· Some want to give their chips an eletronic heart attack by speeding things up·and some are looking for the slowest they can run and still have their application run.· My·basic question·is why?· I see that by using pll_ _ x an external clock can be sped up to 80MHz for example, but then why are there options for 1x, 2x, 4x, 8x, etc.?· Is this to conserve power?· I can understand that a faster clock speed can handle more 'calculations / processes' per second, etc., so faster is better...· Also, if the internal clock of 20kHz and 12MHz are only approximate speeds, then why were they included in the design of the chip?· Or, is something required for the internal workings of the chip?· Not trying to sound negative, just curious.
Lastly, how do you know how fast the clock speed should be for an application?· I know that many (if not all)·of the files in the OBEX have this defined but what about new objects?· I would think there is a better way then trial and error.
Thank you.
Comments
As for the speed you should be running at, it depends. If you need to conserve power, than lower clock speeds are good. If you need high performance, then faster clock speeds are good. If you don't care, than 80MHz is the best.
Ken
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I have not failed. I've just found 10,000 ways that won't work. "
- Thomas A. Edison
Usually the comments at the beginning of the source code for an object give some information about the requirements for the object. Most objects are described for an 80MHz system clock. Some will work with a slower clock, most (but not all) will work with a faster one. The FullDuplexSerial driver for example will support Bauds over 115KBps at 80MHz and will adjust for lower clock speeds. At 40MHz, it should support Bauds over 56KBps. The Simple_Serial driver will do 19.2KBps at 80MHz, but probably no better than 9600 Baud at 40MHz. The TV driver will work with system clocks above 16MHz, but is limited in the number of characters in a line below 80MHz. There's just not enough time to produce the pixels needed.
The internal clocks are provided for situations where exact timing is not important. In particular, the RCFAST clock is used for the bootstrap process (downloading from PC or EEPROM). The communication between the Propeller and PC is done in a self-clocking manner so the exact system clock speed is not important. The EEPROM is not sensitive to clock speeds, you just want to do the download relatively quickly. The RCSLOW clock is intended for very low power applications where the Propeller has to monitor some inputs periodically. It's very simple for the Propeller to switch clocks, to turn the crystal oscillator on and off so an application can sit using the RCSLOW clock most of the time then, in response to an input, turn on the crystal oscillator, allow it to stabilize, then switch to a crystal-controlled 80MHz clock for a short period of time to send (and maybe receive) some high speed serial information. When the transaction is done, it can switch back to the RCSLOW clock and turn off the crystal oscillator, then wait for the next input while drawing only microAmps.
Unless you have a reason to do otherwise, you should use an 80MHz system clock. That's the highest system clock supported for the full temperature and supply voltage range. You should allow for other system clock values if possible, probably at least 40MHz to 100MHz. Over a narrower temperature range (0C to 70C), the Propeller can use a 6.00MHz or 6.25MHz crystal for a system clock of 96MHz or 100MHz and many people are using these because of the higher throughput, particularly for emulators (like Zicog for the Z80).
Thanks again for the replies. I have always appreciated the helpfulness of this forum.
-Rob W.
Flexibility is nice.·
I have some pico-power AVR projects that can run years
on a single tiny battery. Mostly they sleep with just a slow clock
running but when called to duty they jump to 20mips for a second or two.
You can do much the same with the prop by changing clocks
while the application runs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Where am I? Where am I going? Why am I in a handbasket?"