External resonator help


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2008
    Posts
    8

    Default External resonator help

    I'm trying to use a 25MHz osc but it runs like 4 times slower. (1 sec = 4 sec) . I know I need to set the config1h but not sure how to do this. I tried a few samples from what ppl posted but its not compiling. Here are the stats:

    18F2620 / 18F4620
    PBP Pro 2.50b

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Are you setting the fuses in the .inc or code space?
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    In he MPASM directory under program files you will find more .inc files for your chip. Near the bottom of the file all of the options will be listed.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    I am trying to set it up in the code space
    I am new to settings other than defaults. I know that i need it to be in HS mode but everything that I have tried will not compile without errors.

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rlmack35 View Post
    I'm trying to use a 25MHz osc but it runs like 4 times slower. (1 sec = 4 sec) . I know I need to set the config1h but not sure how to do this. I tried a few samples from what ppl posted but its not compiling. Here are the stats:

    18F2620 / 18F4620
    PBP Pro 2.50b
    rlmack35,

    What kind of tests are you making to determine that your chip runs four times slower? Remember that for Microchip PICs one instruction takes four cycles of the oscillator.

    Robert

  5. #5
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    simple test program

    TEST:
    HIGH PORTB.1
    PAUSE 1000
    LOW PORTB.1
    PAUSE 1000
    GOTO TEST

    The light should turn on and off in 1 sec intervals.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Please post your complete code with the configs so we can see what you got.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    May 2010
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rlmack35 View Post
    simple test program

    TEST:
    HIGH PORTB.1
    PAUSE 1000
    LOW PORTB.1
    PAUSE 1000
    GOTO TEST

    The light should turn on and off in 1 sec intervals.
    That works but personally I like to increase the time if you are doing a visual on/off led measurement, if you measure on/off cycles over a period of say one or two minutes you can average a more precise result. That is just me though.

  8. #8
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    ok but that is not what i'm looking for. mine wasn't off by milliseconds it was off by seconds like 3 or 4 seconds on and 3 or 4 seconds off. but once i installed a 4MHz resonator in it worked just fine.

    Now back on track, can someone help/explain the config of chips to me? I dont mean what they do that much i understand. I mean how to get them into my program or setting them someplace else.

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Now back on track, can someone help/explain the config of chips to me? I dont mean what they do that much i understand. I mean how to get them into my program or setting them someplace else.
    See the link in post #2 of this thread.
    Dave
    Always wear safety glasses while programming.

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