12C671 & Osccal register - I am confused


Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Nov 2009
    Location
    London
    Posts
    251

    Exclamation 12C671 & Osccal register - I am confused

    Merry Christmas to everyone
    I am having a small problem which I would like to ask.
    I am using 12C671 & my fuse settings are the following ones:
    Code:
    DEFINE NO_CLRWDT
    DEFINE OSC 4
    @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF
    I just want to run the PIC at 4MHz. I do not understand how to implement bits of the OSCCAL register. Mainly bits 4 to 7.
    I read the PBP manual and it advises to put one of the two defines in the program: Define OSCCAL_1K 1 & Define OSCCAL_2K 1

    I am confused as to if I put Define OSCCAL_1K 1 on top of the code, do I need any other supporting statement in the fuse setting section like may be setting bits 4-7 of OSCCAL register? OR Will my PIC will run at 4MHz just by adding this define statement only?
    Can someone guide me please?
    Thanks
    Last edited by Megahertz; - 25th December 2009 at 23:22.

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  2. Can anyone help a newcomer?
    By scopit in forum Schematics
    Replies: 18
    Last Post: - 20th October 2009, 09:23
  3. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 18:51
  4. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07
  5. MX7705 or AD7705 experience
    By FM11 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th January 2006, 21:54

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