timing questions with different oscillators


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    16

    Exclamation timing questions with different oscillators

    I was wondering if anyone could maybe explain to me how the micro determines a specific time with different oscillator speeds. Right now I can determine that if im using a 4Mhz internal oscillator and I want to use the PAUSE command, to get a one second delay I simply say PAUSE 1000. But I would like to use the 125Khz internal oscillator of the PIC12F683 and I can't figure out the math to get specific delays using the pause command. Does anyone know the math, it will be very helpful for future projects.

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile ratio

    Unless redefined, the default OSC speed is 4MHz. If you use a 125kHz Xtal instead of 4MHz, then you can adjust by the ratio

    4,000,000/125,000=32

    For example:
    With a 4MHz Xtal a one second pause would be

    Code:
    PAUSE 1000
    With a 125kHz Xtal, a one second pause (approx) would be

    Code:
    PAUSE 31	' =1000/32
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

Similar Threads

  1. 12F683 serout timing
    By Hobie Cat in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st December 2009, 16:57
  2. General USB questions
    By BobEdge in forum USB
    Replies: 2
    Last Post: - 21st April 2009, 04:19
  3. 18F2550 timing
    By sstt1976 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 22nd August 2008, 00:30
  4. Hi Everyone! Some newbie questions :-)
    By guest_05 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th October 2006, 22:24
  5. Questions on timing
    By malc-c in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2006, 22:38

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