Dual clock speeds on a PIC


Results 1 to 8 of 8

Threaded View

  1. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by BrianT View Post
    Can I have a PIC running on a 100 KHz crystal while in data gathering mode and just force an external 20 MHz clock into CLKI/OSC1 for the data dump phase. I want to leave the 100 KHz crystal in place between OSC1 and OSC2 and just force a 1 volt peak to peak 20 MHz signal in for the data unload phase.

    Has anyone tried this dual clock speed approach before? Any problems I should look out for?

    BrianT
    I don't think you can use the dual crystal idea because a low speed crystal uses XT config setting (low drive current), whereas a 20Mhz crystal would use HS. High drive current which low speed crystals don't like, might work, but might drift a bit. Conversely, you might get lucky and be able to get a 20Mhz crystal to run off the XT setting.

    Now, if you used 2 separate external DIP oscillators...that's a different story...
    A couple of 2 input AND gates...a 7408 or a couple of those SOT-23 package single gate logic chips, I think Fairchild calls them 'Tiny Logic'.
    One AND gate uses input A as an enable along with input B from 100khz clock
    2nd AND gate uses input A as the enable for the other clock (as well as power for the oscillator maybe?) along with input B from the 20Mhz clock.
    If you're using a PIC with a built-in clock fail oscillator (usually runs at 37-40khz), you could switch to that while switching main clock speeds, which would basically solve the problem of start up.
    Or maybe skip the AND gates all together and just power on a 20Mhz DIP oscillator and force it over the top of the 100khz clock. Might look a bit ugly on a 'scope though.

    I do that on my '4620. External 10Mhz, using 4xPLL, internal @ 40Mhz. When I don't need the processing power, I go to the internal 8Mhz. When I really don't need the power, I go to the internal ~37Khz.

    Don't know what kind of PIC you're going to use, so we don't know what kind of options are available...
    Last edited by skimask; - 23rd January 2008 at 02:41.

Similar Threads

  1. Talking Clock (Pic Based)
    By Art in forum General
    Replies: 2
    Last Post: - 20th January 2012, 14:45
  2. Digital clock thermometer Calendar PIC 16F628
    By valdirdf in forum Code Examples
    Replies: 0
    Last Post: - 31st May 2009, 01:52
  3. Can a PIC PIC a PIC?
    By afbecker in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd January 2008, 19:55
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts