OSCON setting for 18F4520


Results 1 to 9 of 9

Threaded View

  1. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dennis View Post
    I have read through the datasheet and undertstand how the internal clock works and the various clock settings and so forth...BUT ... what I can't make sense of or remember is why my OSCON value is $70 ..is this REVERSED HEX 70 as per the required register setting ?
    So binary would be 1110000 ?
    And if I wanted 4 MHz the setting would be $60 or 0110000 not so ?

    In the datasheet there is a bit to set internal clock as stable or not, ie 0 or 1 ..does anyone have a recommendation for that one ?
    Hello Dennis,

    $70 hex is 01110000 binary, and $60 hex is 01100000 binary, so yes I think you have got it. That would be 8mhz and 4mhz respectively.

    The stability bit is a read only bit. It tells you when the oscillator is stable again, as you could change your oscillator frequency in software.

    The PLL does work for internal oscillator. See section 2.6.4 of the data sheet.
    Last edited by ScaleRobotics; - 29th November 2009 at 05:14.

Similar Threads

  1. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 14:01
  2. PWM setting PIC16F887
    By Gevo in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th June 2008, 07:24
  3. code size VS speed optimization setting?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2008, 14:38
  4. Setting up the oscillator
    By J_norrie in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd October 2007, 14:53
  5. Help with setting adcon1 for 16f877
    By jessey in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th August 2005, 11:13

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