Converting to MPASM


Closed Thread
Results 1 to 12 of 12

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hi Brian,

    In the CONFIG line for MPASM, there must be 2 underscores before the word CONFIG, and a space after it. And some of the options should be different
    Code:
    @ __CONFIG _HS_OSC &_BODEN_OFF &_PWRTE_ON &_WDT_ON &_CP_OFF
    And keep in mind that MPASM is CASE Sensitive (unless you use the command line option to disable case sensitivity).

    HTH,
       Darrel
    Last edited by Darrel Taylor; - 4th November 2005 at 00:36.

  2. #2
    Join Date
    Mar 2003
    Posts
    41


    Did you find this post helpful? Yes | No

    Default MPASM - still not quite there

    Thanks Darrel,

    I copied your line into my code. It tellls me I now have 2 errors but only one error gets shown with three messages on the bottom of the MCSP screen.

    Error [118].....Overwriting previous address contents (2007)
    Message [306] Crossing page boundary..ensure page bits are set.
    Message [306] Crossing page boundary..ensure page bits are set.
    Message [306] Crossing page boundary..ensure page bits are set.

    Do the page bits get set autometically?

    What does error 118 mean and how do I fix it?

    Brian

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


    Did you find this post helpful? Yes | No

    Default

    2007 is the address of the CONFIG word in the PIC. The "error [118] Overwriting previous address contents" means that it's already been set.

    In the 16F877.inc file in your PBP folder, comment out the __CONFIG line with a semicolon ";" Then try again.

    Just remember, that once commented, every time you write a program for a 16F877, you''l need to have a CONFIG line at the top of your program, since the defaults aren't there anymore.

    You may also want to add _LVP_OFF to the CONFIG in your program to turn off the Low Voltage Programming input.

    And <b>@ errorlevel -306</b> will turn off the Crossing page boundary warnings
    <br>
    Last edited by Darrel Taylor; - 4th November 2005 at 03:45.
    DT

Similar Threads

  1. Help setting up MPASM with MicroCode studio
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 23rd November 2008, 05:12
  2. 12F675 MCLR directive MPASM
    By OLDSCHOOL in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th May 2008, 01:29
  3. MPASM vs PM
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th October 2007, 01:29
  4. MPASM 18F4550 getting started
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th September 2007, 23:59
  5. 18F8722 and MPASM confusion!
    By Jackson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd April 2006, 01:24

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