No announcement yet.

PIC Configuration and Assembler

  • Filter
  • Time
  • Show
Clear All
new posts

  • PIC Configuration and Assembler

    1) Can you code the configuration lines manually in PicBasic Pro?

    Basically use the editor in it like XC8 or ASM.

    2) Can you write a program from start to finish in Assembler using PicBasic Pro?


  • #2
    2) Can you write a program from start to finish in Assembler using PicBasic Pro?
    And the point of that would be?


    • #3
      Yes you can. I Configure every chip I program manually. You use the #CONFIG & #ENDCONFIG commands with your configuration listings in the middle (covered in the PBP3 Manual). As for what to put between these 2 commands, in your PBP3 file in your C:/ drive is a folder called Documentation. All possible configurations are contained in these documents for each & every PIC processor covered by your version of PBP. The top of the Document lists the default Configuration settings as well as how it needs to be structured in your code. Newer chips list each CONFIG item on its own separate line, while older versions typically list CONFIG1 on a single line separated by a comma, CONFIG2 on the next line, and so forth.

      As for writing an entire program in ASM, yes you can, and I've done it just for the challenge. To write groups of ASM code, start with ASM (no tabs or spaces) on its own line, CR, then write your code. Only labels are allowed to be listed with no tabs or spaces from the left. If you don't put space before each line of code you'll get an error when you compile. When at the end, use the ENDASM command.

      As a personal challenge I decided I would write a Hello World using only ASM, BUT DO IT IN MPLAB8! Tried to do it in the new MPLABX, but still haven't figured that out.
      We can crack this cotton PIC'n thang!


      • #4
        Thank you MPGMike

        See Gooligum tutorials. You have to spend some time getting used to the style but they do teach assembler.

        Darrel Taylor has great tip.

        Program in PBP. Look at tow generated assembler files.

        Sounds very interesting!