OPTION_REG = $7f syntax error


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Posts
    17

    Default OPTION_REG = $7f syntax error

    As the title suggest, I started to get a compile error with this line of code.

    Any suggestions? It did work a day or so ago.

    thanks

    t

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Strange. Works here, compiles for a 16F877 with no problem.

    /Henrik Olsson.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ttease View Post
    As the title suggest, I started to get a compile error with this line of code.

    Any suggestions? It did work a day or so ago.

    thanks

    t
    And yet again, how about showing us some code. Maybe some more specifics on what you are using as far as the MCU, PBP version, MPASM version, Windows version, update history...etc...

  4. #4
    Join Date
    Mar 2007
    Posts
    17


    Did you find this post helpful? Yes | No

    Default More data

    Hi,

    ver 2.46, MPASM 5.1

    I think it is an problem with the 18F4431. I can compile code for the 16F877a with both MPASM and the default compiler and it works just fine. I have tried to compile a simple program with OPTION_REG = 1 and it gives me a syntax error.

    thanks

    t

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ttease View Post
    Hi,

    ver 2.46, MPASM 5.1

    I think it is an problem with the 18F4431. I can compile code for the 16F877a with both MPASM and the default compiler and it works just fine. I have tried to compile a simple program with OPTION_REG = 1 and it gives me a syntax error.

    thanks

    t

    Download the datasheet for the 18F4431 and do a search for the phrase 'OPTION_REG', then do a search for the word OPTION.
    Get back to me on what you find...
    Last edited by skimask; - 10th April 2007 at 19:45. Reason: Did some searching at the Microchip website...go figure...

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I think it is an problem with the 18F4431.
    OK, that explains it.... The 18F4431 doesn't have an OPTION_REG. What is it you are trying to do by setting it? You said that the it did work a day or so ago but never that you changed target device....

    /Henrik Olsson.

  7. #7
    Join Date
    Mar 2007
    Posts
    17


    Did you find this post helpful? Yes | No

    Default What I figured was...

    Hi,

    Thanks and I finally get it. It did work on the 16f877a but I have to remember, each PIC device has its own little kingdom of parameter and register. I mistakenly figured this was a common, like TRIS and PORT, parameter among all PIC devices (PortB pull-ups sounds common).

    I started with the 16f877a and that has become my 'normalized register' set.

    I'll try to pay more attention to the datasheets in the future.

    thanks

    t

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 07:14
  2. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 08:31
  3. Delayed output 10 secs
    By lilimike in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 14th October 2011, 07:28
  4. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 14:35
  5. Working with indivividual bytes of an array
    By J_norrie in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd January 2007, 20:16

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