Internal Oscillator and pull-up statements for 16f887


Results 1 to 13 of 13

Threaded View

  1. #2
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    Quote Originally Posted by Dennis View Post
    Hi all

    I am copying and modifying my code to work on a 16F887 PIC (and some others later on.

    Would somebody please explain how to or what to alter the following settings to.
    With you help I can start doing a comparison and see how it's done so I can safely do it myself in future

    [code]
    'Ocsillator selections here
    OSCCON = $70 'Int CLK 8MHz
    OSCTUNE.6 = 1 'PLL 4x
    ADCON1= %00001111 '$0F = disable A/D converter
    cmcon = 7
    INTCON2.7 = 0 'switch pull-ups ON
    'END of oscillator selections
    'timer/oscillator defines
    DEFINE OSC 32 '4x 8MHz
    'END of timer/oscillator defines
    [code]

    Any tips as always would be much appreciated

    Kind regards

    Dennis
    First, download manual!

    This PIC support max. 8MHz internal oscillator, so you can forget 4x PLL.

    OSCCON, check "4.2 Oscillator Control"
    Digital IO, check ANSEL "3.2.1 ANSEL REGISTER"
    Pull-ups, check OPTION_REG "2.2.2.2 OPTION Register"
    Comparators, check "8.0 COMPARATOR MODULE"
    DEFINE OSC 8

    This is best way to learn

    BR,
    -Gusse-
    Last edited by Gusse; - 22nd November 2009 at 19:14.

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