Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Clock Speed — Parallax Forums

Propeller Clock Speed

hippyhippy Posts: 1,981
edited 2015-05-20 11:46 in Propeller 1
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.

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-09-08 18:37
    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?
  • AribaAriba Posts: 2,690
    edited 2007-09-08 20:51
    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 ... [noparse];)[/noparse]

    Andy
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-08 22:26
    @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...
  • hippyhippy Posts: 1,981
    edited 2007-09-09 00:43
    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.
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-09 00:58
    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!
  • SkogsgurraSkogsgurra Posts: 231
    edited 2007-09-09 05:11
    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 BakerPaul Baker Posts: 6,351
    edited 2007-09-11 17:27
    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
    Propeller Applications Engineer

    Parallax, Inc.
  • redheadedrodredheadedrod Posts: 78
    edited 2015-05-17 22:21
    Waking an old thread because I have a question related to this...

    I am looking at potentially using an RF receiver for a project that uses a 10Mhz Crystal.
    The RF receiver I am looking at is this one:
    http://www.hoperf.co.uk/shop/info-RFM01-433-S1-Receiver-Module-433MHz.html

    It is designed to be used with a micro processor so should work well with a propeller. If you look at the documentation it is setup to allow the 10Mhz crystal onboard to be used to "power" a microprocessor. Can the Propeller handle this? Would it be as simple as using 8 x PLL?

    Just curious at this point if it is even possible or if I would be better to use a different approach. Seems like if I use just one crystal then I might save some power.
    This receiver can be used to read Tire Pressure Monitors and potentially other things as well so I might use them for inter vehicle communications as well as reading tire pressure sensors.

    Rodney
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-05-17 23:05
    Waking an old thread because I have a question related to this...

    I am looking at potentially using an RF receiver for a project that uses a 10Mhz Crystal.
    The RF receiver I am looking at is this one:
    http://www.hoperf.co.uk/shop/info-RFM01-433-S1-Receiver-Module-433MHz.html

    It is designed to be used with a micro processor so should work well with a propeller. If you look at the documentation it is setup to allow the 10Mhz crystal onboard to be used to "power" a microprocessor. Can the Propeller handle this? Would it be as simple as using 8 x PLL?

    Just curious at this point if it is even possible or if I would be better to use a different approach. Seems like if I use just one crystal then I might save some power.
    This receiver can be used to read Tire Pressure Monitors and potentially other things as well so I might use them for inter vehicle communications as well as reading tire pressure sensors.

    Rodney

    No problem with that, you can even leave the Prop setup as if it were a 10MHz crystal. If you use those huge HC49/4 monsters then you certainly would want to get away from having an extra crystal but there are many very small and inexpensive SMD crystals available in 10MHz.
  • redheadedrodredheadedrod Posts: 78
    edited 2015-05-17 23:19
    Ok thanks for the feedback.. Just figure since it is part of the board and is available maybe I should use it assuming I go after that project. Just wasn't sure if there was a good reason why we use a 5mhz crystal over a much faster one. Is it solely for energy consumption? Which from your comment I am guessing probably if I replaced theirs with a small SMD version it would take less power?

    Rodney
  • jmgjmg Posts: 15,173
    edited 2015-05-18 00:00
    ... Just wasn't sure if there was a good reason why we use a 5mhz crystal over a much faster one. Is it solely for energy consumption?

    Comes down to how important operating within specs is ?
    The data sheet has the Crystal limits, to be within spec.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-05-18 00:23
    hippy wrote: »
    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.

    Well, the desire for a serial diagnostic interface indicates that using an RCFAST won't work. You get too much unpredictable drift in timing as temperatures change. (something like 10%)

    A resonator or crystal will work. I believe you want something that has 3% drift or less.

    The 5MHz crystal tends to be preferred as it can be used at 16x PLL to get 80Mhz -- a conservative top speed.

    If you desire to go at 1x PLL, a faster crystal should work within reasonable limits. The 5MHz xtal does conserve energy, but that reduced energy on the oscillator circuit also reduces the potential for RFI and EMI being generated therein. The faster you clock an oscillator, the higher the power drain, and the more noise you may have to deal with.
  • PublisonPublison Posts: 12,366
    edited 2015-05-18 08:49
    Well, the desire for a serial diagnostic interface indicates that using an RCFAST won't work. You get too much unpredictable drift in timing as temperatures change. (something like 10%)

    A resonator or crystal will work. I believe you want something that has 3% drift or less.

    The 5MHz crystal tends to be preferred as it can be used at 16x PLL to get 80Mhz -- a conservative top speed.

    If you desire to go at 1x PLL, a faster crystal should work within reasonable limits. The 5MHz xtal does conserve energy, but that reduced energy on the oscillator circuit also reduces the potential for RFI and EMI being generated therein. The faster you clock an oscillator, the higher the power drain, and the more noise you may have to deal with.

    Loopy,

    Did you notice the original posting date?

    There has been much discussion over the last 8 years.
  • redheadedrodredheadedrod Posts: 78
    edited 2015-05-18 19:58
    The original poster of this thread might not benefit from it but it does make sense to me.. And since the board that has the 10mhz crystal on it is a radio receiver I am thinking it is probably another good reason to use that crystal. Although it sounds like if I replace it with an SMD chip maybe the power consumption will go down a little more and maybe a little less RF since the module IS an RF receiver that I would be using.

    Rodney
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-05-18 20:34
    This is an old thread with a brand-new on-topic query, so posts here are in fair territory.

    The main reason for using a 10 MHz crystal vs. 5 MHz is physical size. That said, despite the crystal frequency being outside the 4-8 MHz range spec'd for use with the PLLs, I know of no reported case where a 10 MHz input frequency has been a problem. As you surmised, the correct setting for the PLL is PLLx8, which gives you the same 80 MHz clock as 5 MHz in and PLLx16 does. I seriously doubt that the current consumption between using a 5 MHz crystal and a 10 MHz crystal will be noticeable, since the clock frequencies actually driving the microcontroller hardware are the same in both cases. The only increment might occur in the VCO, which would be running at 160 MHz vs. 80 MHz, but that comprises but a small fraction of the overall current budget.

    -Phil
  • JohnR2010JohnR2010 Posts: 431
    edited 2015-05-20 11:46
    This is an old thread with a brand-new on-topic query, so posts here are in fair territory.

    The main reason for using a 10 MHz crystal vs. 5 MHz is physical size. That said, despite the crystal frequency being outside the 4-8 MHz range spec'd for use with the PLLs, I know of no reported case where a 10 MHz input frequency has been a problem. As you surmised, the correct setting for the PLL is PLLx8, which gives you the same 80 MHz clock as 5 MHz in and PLLx16 does. I seriously doubt that the current consumption between using a 5 MHz crystal and a 10 MHz crystal will be noticeable, since the clock frequencies actually driving the microcontroller hardware are the same in both cases. The only increment might occur in the VCO, which would be running at 160 MHz vs. 80 MHz, but that comprises but a small fraction of the overall current budget.

    -Phil

    I asked this exact question on current usage with a 10 MHz crystal vs 5 MHz about 6 weeks ago. Peter had recommended I switch over to a 10 MHz SMT crystal to save space on my PCB. The only reason I didn't is I couldn't get a definite answer on the additional power usage. I have used the 5 MHz crystal with the PLLx8 setting to save 10 to 15mA over the PLLx16 setting so that is why I was wondering about the power usage with at 10 MHz? Its good to know there wouldn't be much of a difference I just wonder what "much" is. Are you talking 10 to 50uA difference or would it be more in the milliamp range?
Sign In or Register to comment.