Shop OBEX P1 Docs P2 Docs Learn Events
Measure RC fast and RC slow — Parallax Forums

Measure RC fast and RC slow

hinvhinv Posts: 1,255
edited 2009-05-24 12:15 in Propeller 1
Hi,

I just thought of something. With 1 pin and a resister and a capacitor, and a crystal, one should be able to measure the frequency of the RCSlow and RCFast clock modes by switching back and forth between the external and internal clocks.
My questions are:
Has anybody done this yet?
Do the RC clocks vary much with voltage?
Do the RC clocks vary much with temperature?

Thanks,
Doug

Comments

  • BradCBradC Posts: 2,601
    edited 2009-05-24 08:31
    hinv said...
    Hi,

    I just thought of something. With 1 pin and a resister and a capacitor, and a crystal, one should be able to measure the frequency of the RCSlow and RCFast clock modes by switching back and forth between the external and internal clocks.

    This has me a little baffled. How are you intending to do this?
    hinv said...

    Do the RC clocks vary much with temperature?

    I know when I was testing my high speed downloader the RCHIGH clock speed dropped when the Propeller was warmed up. When it reached in excess of about 40 Degrees C it slowed to a point I had to vary the algorithm to allow the chip time to catch up after each long at 230,400 BAUD, so yes I'd suggest it does vary significantly with temperature. I did not have a CRO back then.

    When I get a chance I'll hook it up to a CRO and see how much I can get it to vary here.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • kwinnkwinn Posts: 8,697
    edited 2009-05-24 12:13
    hinv, that's very clever.

    Brad, if you put a resistor/capacitor on a pin and count the number of clock cycles it takes to charge/discharge for each of the clock modes you will be able to compare the rcfast and rcslow counts to the crystal frequency counts. That will allow you to calculate the rcfast/slow frequencies.
  • BradCBradC Posts: 2,601
    edited 2009-05-24 12:15
    kwinn said...
    hinv, that's very clever.

    Brad, if you put a resistor/capacitor on a pin and count the number of clock cycles it takes to charge/discharge for each of the clock modes you will be able to compare the rcfast and rcslow counts to the crystal frequency counts. That will allow you to calculate the rcfast/slow frequencies.

    Ahh, so rather than use a sigma/delta method you are using something like RCTIME? I can see how that might work, thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
Sign In or Register to comment.