Tracing code in MPLAB Sim


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Thumbs up

    Nice tip Bruce!

  2. #2
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    While it is true you cannot compile with PBP from within MPLAB, you CAN use PBPW, which is the windows version of the PIC Basic Pro compiler. This means you can write, compile, simulate, and program your device all from the same IDE (and for those of us moving from MPLAB assembly, this is an environment we're quite familiar with).

    Make sure you've installed the MPLAB plug-in. When you're starting a new PBP project in MPLAB using the Project Wizard, just pick the "microEngineering PicBasic Toolsuite" ("microEngineering PicBasic Pro Toolsuite" if you have it) and browse for PBPW.EXE (not PBP.EXE).

    You will also get full text highlighting of your basic code.

    One thing I like is using MPLAB to help set configuration bits. Use the MPLAB configure bits menu to make the settings as you wish. The configuration word will be displayed under "Value." Then copy this number into your program like so:

    @ __config 0x3FC4 ; configuration bits

    No messy lookups for what function sets what bit. You will need to comment out the standard __config statement in the PBP .INC file or azn error will result. I've also added a message reminding me I've changed the .INC file in case later I assume I've set it.

    Including the COD file is a help, gives a bit more info to the Program Memory window. Still, I'll keep it and the Disassembly Listing window open for code walking. It helps to see which Basic line is being executed.

Similar Threads

  1. Replies: 1
    Last Post: - 19th February 2009, 13:35
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. MPLab SIM question
    By presario1425 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2007, 21:22
  5. Linker/COFF debugging in MPLAB SIM
    By RichardBowser in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th January 2007, 18:28

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