• PicŪ Basic


  • Using Notepad++ with Proton+ Compiler

    Notepad++ has a few advantages over the PDS IDE, primarily the ability to fold code. Here are the steps to make it Proton friendly.

    Download, rename, and save the userDefineLang.xml file in the C:\Documents and Settings\YourUserName\Application Data\Notepad++ folder. (I'm using XP.) You will need to add it to the existing file if you have modified it. You can probably replace the original if you have a fresh install.

    userDefineLang.xml.txt

    This file sets parameters for PDS:
    • Sets bas pbp ppi files to automatically be shown as PicBasic type. You may add other extensions if needed. (You can rename the type if you are picky.)
    • Adds Keywords for highlighting
    • Defines Comment
    • Adds ;region ;endregion ;sub and ;endsub keywords for code folding. To use, place the keyword (including the semicolon) on a line. I like to use the ;sub keywords on a Label: line, with ;endsub at the Return. I use ;region keywords where I declare variables, and in code blocks (for instance, wrapped around all of the serial subroutines, or the interrupts). Feel free to add new keywords for While or IF statements. (View-->UserDefined Languages)
    • etc.

    Here are the primary differences between using Notepad++ and PDS' IDE:
    • ++ UNDO actually WORKS with Block Comments!!! Hooray!!!
    • -No tooltips for basic commands
    • +highighting a word with double-click highlights all instances of that whole word.
    • +Code Folding is now available if you insert the appropriate key words into the text.
    • -hitting F3 with a word highlighted searches the LAST search, but hitting ctrl-F DOES place the highlighted word in the search text.
    • -AutoHotKey required for one-key compiling; otherwise save the file then switch to PDS. (See below.)

    Notepad++ & Proton F10 Hotkey & File Combining Script
    Notepad++ hotkey + combiner.zip
    Here is an AutoHotKey script that works with Notepad++ and Proton's IDE. To use, you will need to install AutoHotKey on your PC, and run the script. You can view the script in NP++ to see that it is not harmful.

    Press F10 to activate.

    It does two things. First, it will parse a ".bas" file for the "Include" statement, and create a single file that contains the contents of all files. This is because some commands and/or features (i.e. the preprocessor) behave differently if they are Included rather than part of the original file.

    Second, it compiles the "Combo" file if you have it open in PDS.
  • Recent Activity

    towlerg-21522

    Mysterious PORTB problem

    Thread Starter: xldaedalus

    I'm using Proton+ to develop firmware for a product with switches. The MCU is an 18F26K22. Most of the switches reside on PORTB. I am NOT using a...

    towlerg Yesterday, 15:45 Go to last post
    See_Mos-247

    PIC18F1330 PLL problem

    Thread Starter: rcurl

    I'm just starting out on a new project that uses a PIC18F1330. I haven't used this specific chip before, so I began by trying to blink an LED just...

    See_Mos Today, 11:23 Go to last post
    kuhrig-602

    Pic16f18877 oread

    Thread Starter: evoortman

    Hi, On a PIC16F18877 the OREAD command doesn't seem to work. The code is working on a PIC16F1939. Both controllers use 32MHz int osc. If i...

    kuhrig Today, 10:33 Go to last post
    palamont-28794

    MID$ Problem with a PIC18F25K22

    Thread Starter: palamont

    Hi everybody, I encounter a strange problem : I have a string of 230 characters. This string is divided into 10 segments of 23 characters, with a...

    palamont Today, 10:08 Go to last post