Oscillator problems


Closed Thread
Results 1 to 4 of 4
  1. #1
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest

    Default Oscillator problems

    I'm using an 18F252 with a 10 MHz external resonator and I can't figure out the code needed to tell the pic to run in what the datasheet called "HS" mode. I'm new to the PIC and PicBasic, but I think that I have my PIC set up correctly (pin 1 tied high w/ 4.7K resistor) and I have a good downloader. Here is the code that I have been trying:

    DEFINE OSC 10
    loop:
    high PORTB.0
    low PORTB.1
    pause 500
    high PORTB.1
    low PORTB.0
    goto loop
    end

    but I cant get any sign of life out of my PIC

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Presetting Configuration Fuses (PIC Defines) into your Program

    http://www.picbasic.co.uk/forum/showthread.php?t=543

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Maybe it's alive and you just can't see it.

    You outputs will only change for a fraction of a uSec every half second.

    Try adding another "pause 500" before the "goto loop".

    Darrel

  4. #4
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest


    Did you find this post helpful? Yes | No

    Default

    I just added the PIC defines into my program, and eliminated the "Overwriting previous adress" error by commenting out the __CONFIG commands (not the INCLUDE command though) in the 18F252.inc file, but I still have 4 errors remaining that I dont understand.
    Duplicate label ("DDRA")
    Duplicate label ("DDRB")
    Duplicate label ("DDRC")
    Superseeding current maximum RAM and RAM map.

    EDIT:

    If I comment out the INCLUDE line of 18F252.inc then I get different errors:
    Duplicate Label ("_PORTL")
    Duplicate Label ("_PORTH")
    Duplicate Label ("_TRISL")
    Duplicate Label ("_TRISH")
    Last edited by RUBiksCUbe; - 28th June 2005 at 20:03.

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