Internal oscillator please help


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    4

    Default Internal oscillator please help

    I've been trying for a day and a half now to get my PIC to do something I finally have it running but it is running slow. If I put pause 1000 in the code it basically stops. When I do pause 1 it runs at about 4Hz but speeds up if I put my finger near the pic. Whatever changes I make to Internal oscillator speeds it stays at the same speed. It even runs if I set it for external oscillator. I don't understand. Here's the code I have.


    @ Device PWRT_OFF
    @ Device MCLR_OFF
    @ Device INTRC_OSC
    @ Device BOR = 0
    @ Device Debug_Off

    OSCCON = %01110000
    OPTION_REG = %11111111
    TRISB = %00101010



    Any help would be appreciated.

    Thanks,

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Which Pic, please ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Dec 2006
    Location
    WADSWORTH OHIO USA
    Posts
    37


    Did you find this post helpful? Yes | No

    Smile

    RTDS is the answer...

    Refer To Data Sheets
    Last edited by SOMRU; - 25th February 2009 at 19:48. Reason: more
    Thanks !
    SOMRU
    TWE/TFP/EE

  4. #4
    Join Date
    Feb 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Sorry, 16F819

    I've been over the datasheets time and time again and cannot figure this out.

    Thanks

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    It even runs if I set it for external oscillator
    That's a big red flag there. Are you 100% sure you're even programming it?

    If you set config options for an external crystal or resonator, program the part,
    and it's still running, you really do have a problem.

    Post all your code & let us know which programmer you're using. That would really
    help.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    Join Date
    Feb 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    This is all I have, at this point I was just trying to get the thing to do something in this case the leds on the different ports do switch on and off.

    @ Device PWRT_OFF
    @ Device MCLR_OFF
    @ Device INTRC_OSC
    @ Device BOR = 0
    @ Device Debug_Off

    OSCCON = %01110000
    OPTION_REG = %11111111
    TRISB = %00101010


    loop:

    TRISB = %00101010
    Pause 1
    PortB = 1
    TRISB = %11010101
    Pause 1
    PortB = 1
    TRISB = %00101010
    Pause 1
    goto loop

    End

Similar Threads

  1. Internal vs. external osc for comms
    By mtripoli in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th January 2010, 14:58
  2. 12F683 internal pull up
    By hvacrtech in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th July 2008, 02:35
  3. PIC18F4620 Using the Internal Oscillator
    By kiwipiper in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd October 2007, 08:07
  4. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 18:38
  5. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 22:41

Members who have read this thread : 1

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