Problem with clock


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2013
    Posts
    8

    Default Problem with clock

    Which is the instruction to set on a PIC16F628 or PIC16F628A to use the internal 4MHz oscillator?

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    This was in the similar threads listed below:

    http://www.picbasic.co.uk/forum/showthread.php?t=8901

    Robert

  3. #3
    Join Date
    May 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    No, I'n Sorry but I can't understand what to do.
    I just want to set internal clock to 4Mhz

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    Use the configuration word _INTRC_OSC_NOCLKOUT (or _INTRC_OSC_CLKOUT if you want the clock signal on the PIC pins).

    Ioannis

  5. #5
    Join Date
    May 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    But how I set it at 4 Mhz?

  6. #6
    Join Date
    May 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    For example in Pic16f819 I have to set
    @ DEVICE INTRC_OSC
    DEFINE OSC 4
    OSCCON = $60
    to use the internal 4Mhz clock
    How can I do this on Pic16f628 or Pic16F628A?

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    If you check the data sheet regarding the internal oscillator, you will confirm that there is no option for other frequencies than 4MHz.

    So set what I posted above and also DEFINE OSC 4 if you want (PBP considers this as default) and you are OK.

    Ioannis

  8. #8
    Join Date
    May 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    Ok thank you and Sorry for my misunderstanding

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: Problem with clock

    No problem. Thats what this forum is about.

    Ioannis

Similar Threads

  1. External clock on 16f819 problem.
    By tasmod in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 27th January 2012, 17:09
  2. DEBUG and 64 Mhz clock problem
    By boban in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th November 2011, 12:47
  3. clock question
    By andrewwaack in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st September 2009, 17:05
  4. external clock / internal clock
    By grounded in forum General
    Replies: 4
    Last Post: - 31st May 2008, 17:44
  5. Clock
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st February 2008, 02:23

Members who have read this thread : 2

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