How to use internal oscilator of PIC16F628A?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    cape town, south africa
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: How to use internal oscilator of PIC16F628A?

    Quote Originally Posted by fratello View Post
    I used something like this :
    Code:
    @ DEVICE pic16F628A, INTRC_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON, LVP_OFF
    
    DEFINE  OSC 4
    I'm stuck on a very similar (i think!) problem;

    Using a PIC16F777 for the first time, which has an internal Osc. I'd like to get it running at 4MHz, but using fratello's DEFINE code modified to:
    Code:
     @ DEVICE pic16F777, INTRC_OSC
    
    DEFINE  OSC 4
    ....as does not work. the 4MHz, seems much more like 4Hz.

    Any help?! thanx!

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: How to use internal oscilator of PIC16F628A?

    Open the datasheet under OSCCON register, and see the default setting., from there change it.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Mar 2011
    Location
    cape town, south africa
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: How to use internal oscilator of PIC16F628A?

    Thank you Steve - got it working... but i do not understand all the bits in that register;

    IOFS: INTOSC Frequency Stable bit ?
    SCS<1:0>: Oscillator Mode Select bits ?

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