What am I doing wrong ?


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Try these settings instead of yours especially for "RC_OSC_NOCLKOUT" ;

    Code:
    @ DEVICE PIC12F675, INTRC_OSC, WDT_OFF, MCLR_OFF,PROTECT_ON
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sayzer
    Try these settings instead of yours especially for "RC_OSC_NOCLKOUT" ;

    Code:
    @ DEVICE PIC12F675, INTRC_OSC, WDT_OFF, MCLR_OFF,PROTECT_ON
    Thanks for the suggestion, but I now get a warning when I try to compile (using MPSAM) - it states "Found lable [DEVICE]" and "Illegal Opcode [12F675]"

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c
    Thanks for the suggestion, but I now get a warning when I try to compile (using MPSAM) - it states "Found lable [DEVICE]" and "Illegal Opcode [12F675]"

    In your code, put a space between '@' and "DEVICE"


    --------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sayzer
    In your code, put a space between '@' and "DEVICE"


    --------------
    Yup, have done (I copied and pasted the line in your post) and still fails to compile.

    Malc

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


    Did you find this post helpful? Yes | No

    Default

    if you use MPASM, DEVICE is not the right command, the the FAQ thread about the config fuse.
    Code:
        @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON
             ' Internal Oscillator
             ' Enable watch dog timer
             ' Enable power up timer
             ' Disable MCLR pin
             ' Enable brown out detect
    Or you may set them manually in your device programmer software.

    HTH
    Steve

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

  6. #6
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Steve,

    Looks like I might have to set them manually or use the 16F628 as I still get an error when I copy and past the line of code from your mail.

    This time I get:

    Error 118: overwriting previous address contents 2007

    What the hell that means I have no idea ?

    I think I need to go back to basics and get a LED flashing on a PIN and then impliment my code for the PWM

    Thanks guys for your continuing help, its this support that makes PBP my preferred programming language

    Malc

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


    Did you find this post helpful? Yes | No

    Default

    so it seems you didn't read the FAQ
    pay attention to post #5 of the link bellow
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Steve

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

Similar Threads

  1. LCD Showes Some Wrong Letters
    By sbobowski in forum General
    Replies: 2
    Last Post: - 23rd September 2008, 20:15
  2. Anyone know whats wrong with this code
    By Bonxy in forum Serial
    Replies: 10
    Last Post: - 9th March 2007, 17:29
  3. ADCIN - AD settings are wrong
    By teverett in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th December 2006, 17:32
  4. What am I doing wrong?
    By mankan in forum General
    Replies: 1
    Last Post: - 23rd June 2006, 20:03
  5. HDD IDE ATA 2 interface problems. code wrong?
    By rastan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th March 2005, 17:01

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