How to use Internal Oscillator?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Posts
    48

    Default How to use Internal Oscillator?

    This is my config now

    Code:
    @   device  pic16F648A, hs_osc, wdt_off, mclr_on, lvp_off, protect_off

    Is it only to change "hs_osc" to "xt_osc" to use the Internal Oscillator?
    Or how should I do?

    Code:
    @   device  pic16F648A, xt_osc, wdt_off, mclr_on, lvp_off, protect_off

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    which assembler are you using? MPASM?

    I know how to do it for MPASM, which is to change ur config to:

    __config _INTOSC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF

    u could try this if you dont use MPASM (but i'm not 100%):

    @ device pic16F648A, intosc_osc_noclkout, wdt_off, mclr_on, lvp_off, protect_off
    Last edited by Kamikaze47; - 18th September 2007 at 20:38.

  3. #3
    Join Date
    Jul 2007
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    MPSAM..?




    ???

    .

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi xobx,
    Microcode studio uses an assembler called PM by default. Mpasm is the assembler used by Microchip. The config listed below is for PM.

    @ DEVICE pic16F648, INTRC_OSC_NOCLKOUT, wdt_off, mclr_on, lvp_off, protect_off

    <p>
    See the link listed below for some fine samples, courtesy of Melanie.
    http://www.picbasic.co.uk/forum/showthread.php?t=543.

    To use MAPSM as the assembler you have to tell Microcode Studio, to use it.
    Last edited by Archangel; - 18th September 2007 at 20:53.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Microcode Studio is an editor - To write your code
    Picbasic Pro is a compiler - To compile your PBP code into assembly code
    MPASM is an assember - To assemble the assembly code into machine code the PIC will understand.

    You can check to see if you are using MPASM by going to the View menu in MicroCode Studio, choosing Comple and Program Options, and then clicking the Assembler tab. If Use MPASM is ticked, you are using MPASM.

    If that is the case, go to the 16F648A.INC file in your PBP directory, and change "__config _XT_OSC" to "__config _INTOSC_OSC_NOCLKOUT"

Similar Threads

  1. Pic16f882 internal oscillator
    By offlander in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2009, 21:15
  2. Internal oscillator please help
    By timbash in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th February 2009, 15:11
  3. PIC18F4620 Using the Internal Oscillator
    By kiwipiper in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd October 2007, 09:07
  4. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 23:41
  5. PIC12F629 w/ Internal Oscillator
    By RossW in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th June 2004, 20:12

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