No announcement yet.

To compile or not to compile

  • Time
  • Show
Clear All
new posts

  • To compile or not to compile

    I've thought many ways to say this and not look too duhhhh but here goes. Must I compile my PBP program before I do the simulation for any changes to take effect? I assumed, you know what is said about that, once I told Protues where the program was located, named it, wrote the program and ran the sim that Proteus would compile it, grab the hex file(I think that's the file it uses) and execute my newly modified program. Maybe it's another one of those nuances or checkboxes I'm missing but if there's a way to do that I'd like to know.

    OBTW thanks for the tip on having two copies of PBP going when I use it as my source editor. I almost got into trouble with that happening.

  • #2
    Proteus uses the .COF file.
    When it sees that the Source code is newer than the .COF file, it will automatically compile it before running the simulation.

    If you compiled it with MicroCode Studio, it won't compile it again from proteus since the .COF is newer than the Source code.

    If you don't compile it in MicroCode, you have to remember to save it, so Proteus can see the changes.
    Otherwise, you're still running an older version.

    And you're Welcome!
    PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
    Never download a PIC datasheet from anywhere but


    • #3

      When you compile something such as a report , book, ... it could not produce figures because it would take too long to compile a list.

      Dollar General Survey
      Last edited by Edwards15; 12-02-2021, 07:51 PM.


      • #4
        Thanks for sharing this i was having same question in my mind and find out this thread keep it up.
        Last edited by Wisoky; 01-20-2022, 08:18 PM.


        • #5
          It sounds like you are using the Proteus software to simulate a program that you wrote using PBP (Prescaler Basic Compiler).

          To answer your question, yes, you need to compile your PBP program before you simulate it in Proteus. When you compile your program, the PBP compiler generates a hex file that contains the machine code for your program. This hex file is what Proteus uses to simulate the behavior of your program.

          So, to update your program in Proteus, you need to make changes to your PBP source code, compile it again to generate a new hex file, and then update the hex file in Proteus. You can do this by selecting the "Edit Component" option for the microcontroller component in your Proteus schematic, and then navigating to the "Program File" option to select the updated hex file.
          TigerIsHome Login

          I hope this helps clarify the process for updating your PBP program in Proteus. Good luck with your simulations!
          Last edited by sarafoster; 02-27-2023, 07:49 PM.


          • #6
            Your article content is extremely fascinating. I'm extremely intrigued with your post. I desire to get more incredible posts. CheckMyRota
            Last edited by behrens052; 04-05-2023, 09:43 PM.


            • #7
              Some lenders, investors, or banks may require that your compilation be performed by a certified public accountant who has complete knowledge of presenting the data in an industry-compliant format.


              • #8

                Yes, you typically need to compile your PBP program to generate a new HEX file before running the simulation in Proteus. Proteus uses the HEX file for the simulation, and it doesn't automatically recompile your source code. After making changes to your PBP program, compile it first to get an updated HEX file, then simulate in Proteus using the new HEX file.