PDA

View Full Version : Propeller Clock Speed



hippy
09-09-2007, 01:24 AM
First the easy one, to check I'm not missing or misunderstanding something obvious - 5MHz XTAL, 16 x PLL = 80MHz, 4 cycles per instructions = 20MIPS, a NOP in a Cog takes 50nS to execute ?

Secondly, what's the drift on the RCFAST clock while it's running / between power cycles ?

And finally, assuming the drift is relatively low for RCFAST, what is the easiest/cheapest way for a Propeller to work out its actual RCFAST frequency ? With a 64KB Eeprom, I was thinking fit an RC and calibrate the RC decay time using a XTAL, store that in the top of Eeprom then have the RCFAST 'production version' determine its frequency by comparing with the reference value.

If drift is low enough it would be easier to just calibrate and note its RCFAST frequency and use that, and for minimal cost and an easy life, fitting an XTAL may be easier than any RC. I'm open to other suggestions.

deSilva
09-09-2007, 01:37 AM
hippy said...
First the easy one, to check I'm not missing or misunderstanding something obvious - 5MHz XTAL, 16 x PLL = 80MHz, 4 cycles per instructions = 20MIPS, a NOP in a Cog takes 50nS to execute ?

Yes. Most other instructions as well...

said...
Secondly, what's the drift on the RCFAST clock while it's running / between power cycles ?

It is considered to be relativly low, but I made no measurements of my own...


said...
If drift is low enough it would be easier to just calibrate and note its RCFAST frequency and use that, and for minimal cost and an easy life

I expect that temperature effects will have the worst influence. 5°C will considerably differ from 50°C (10% ?)

Why don't you want a crystal, which adds only 4% to the Prop prize?

Ariba
09-09-2007, 03:51 AM
hippy
You can also measure the Frequency of the RC Fast with a connected serial Interface. The Baudrate of the sending device is mostly generated from a Crystal and is therfore very exact. So you only have to send the value $00 and measure the Low time, then you can calculate the frequency from 9 Bittimes and the Baudrate.

But I think there are only a few applications where a crystal can be omitted, with th RCfast you have only 12 MHz clockspeed, and thats not enaugh for Video, VGA, fast FullDuplexSerial etc.
I have also made some experiments with a 5 MHz Resonator (a little bit cheaper than a Crystal), but for color generation on video out, this is not practical. Also if you set only one color for the whole screen, you always get psychedelic color pictures - as in the hippy era ... ;)

Andy

deSilva
09-09-2007, 05:26 AM
@Ariba
(1) The datasheet says RCfast can be between 8 and 20 MHz
(2) Ceramic resonantors are not very precise, certainly not for generating synchronisable colorbursts...
(3) When you disable "baseband chroma" in the VCFG register, disconnect the fourth video resistor, and use the six grayscale colours with chroma-bit=0 only you should get a very clear grayscale image...

hippy
09-09-2007, 07:43 AM
Thanks both. The proposed application was primarily bit-banged in-process-output where even 8MHz would be fast enough, but it would be nice to have some low-speed serial diagnostic output ( ~4800 baud ). No need for video or anything which would need ultra-tight tolerances on timing. I now think a cheap 4MHz resonator is the easiest approach.

deSilva
09-09-2007, 07:58 AM
RS232 will work within 3%. So if you have a chance to basicaly calibrate it (e.g. using Aribas most clever idea) - and store it into the EEPROM, my only concern would be temperature... Maybe Paul has some data ?

It would be best if you could make the PC send something first, again using Aribas trick!

Skogsgurra
09-09-2007, 12:11 PM
I once had an RC clock only available in a bitbanging application and all of a sudden, there was a need for tight timing. I used the mains to calibrate the clock. Mains frequency stays reasonable constant, there is not more than +/-0.1 Hz variation (except for "National Situations" like heavy storms or sabotage) usually less. That translates into a 0.2 % accuracy, which often is good enough. But, of course, you need to have the mains voltage available. Doesn't work for battery powered applications.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Paul Baker
09-12-2007, 12:27 AM
I posted a normalized·f vs·t graph a while ago: http://forums.parallax.com/showthread.php?p=663827
While that graph is only from a sample of one, My preliminary results from an expanded sample set shows little variation in the curve.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)