View Single Post
Old Dec 03, 2012, 09:40 PM
Nav_Aids is offline
Find More Posts by Nav_Aids
Registered User
Nav_Aids's Avatar
Canada, MB, Winnipeg
Joined Nov 2011
348 Posts
Install Microchip's IDE, 8-Bit Compiler, and Getting Started

Getting Started with Modifying the Code.

It’s not necessary to install JAVA and NetBeans for Microchips IDE’s to work but, take it from an experienced computer programmer, if you want fewer problems do yourself a favour and install them first. Why? Well because Microchips IDE’s are written with NetBeans and NetBeans is written in JAVA. Besides most of the time when people have problems, Microchips recommends installing them so I just install them and avoid the problems.

There are 2 parts to the Microchips software, the IDE for coding and the COMPILER for changing your code into something your processor can read (HEX Code). Just some FYI, I have compilers that are specific to the CPU and operating system that makes an executable program (*.exe), most are for Windows (Intel).

You have 2 install choices for the Microchips IDE “Minimum Required” or “Preferred Install” but, Jake and I both use MPLAB X IDE so if you want to use our code or want us to help you with your code it would make things easier to just use the Preferred Install : MPLAB X IDE. NOTE: the hex code will still be the same. Besides the MPLAB X IDE in my opinion is more intuitive and better laid out.


Required When Installing Microchips IDE and XC8 compiler:

1. Install JAVA if you haven’t by now. www.java.com
2. Install NetBeans - NetBeans 7.3.1 CC++ Installer Download: https://netbeans.org/downloads/start...=en&option=cpp
3. Open NetBeans to make sure it works.


Minimum Required: MPLAB IDE

1. Install MPLAB IDE - MPLAB IDE v8.92 or newer - Near bottom of page. MPLAB IDE v8.92
2. Install: Run the installer, click next, accept, next, if the install directory is ok select next or change the directory and then click next, next, finish.
3. Restart computer. The IDE will finish installing and may give an error message but, just ignore it. It should open a dialog box for different plug-in's that are included.
4. Install the MPLAB-XC8 compiler, you can also install MPLAB-XC16 and XC32 but I recommend MPLAB-XC8 for now - Download is on the left side, half way down: http://www.microchip.com/pagehandler...abxc/home.html . Install: Click next, next, next, if the install directory is ok select next or change the directory and then click next, select all the boxes, next, next, after install click next, and then finish.
5. Your ready to go coding.

Note: For instructions and guides for MPLAB IDE go to the bottom of this web page: http://www.microchip.com/stellent/id...&part=SW007002


Preferred Install : MPLAB X IDE

1. Download MPLAB X IDE v1.85 or newer. http://www.microchip.com/pagehandler...abx/#downloads Click on DOWNLOADS and then download MPLAB® X IDE v1.90.
2. Install: Run the installer, click next, accept, next, if the install directory is ok select next or change the directory and then click next, next, finish.
3. Reboot
4. Download MPLAB XC8 compiler v1.20 or newer. If you want you can also download and install XC16 and XC32.
5. Install: Click next, next, next, if the install directory is ok select next or change the directory and then click next, select all the boxes, next, next, after install click next, and then finish.
6. Reboot

Note: For instructions and guides for MPLAB-X IDE go to the bottom of this web page: http://www.microchip.com/stellent/id...&part=SW007002


From Jakes old web site and is for the MPLAB X IDE:

Getting Started with compiling for the PIC...

I've tried to make things as easy as possible, but it still takes a little doing to get your own custom CDI firmware up and running.

Open the IDE and...

-Select File->New Project
-Choose "Standalone Project", click next.
-Select Family -> Mid-Range 8-bit MCUs (PIC12/16/MCP)
-Select Device -> PIC12F683 Click next.
-Debug header does not matter, I usually select the one you can choose, now click next.
-Select "Simulator" under hardware tools, or choose the programming device you use. Click next.
-Select "XC8" under XC8, click next.
-Choose a project name and location. I usually use a more convenient location than the default. You might use "12F683_v0.9b" for the name.
-Check "Set as main project" and click next.
-Copy the source file "12F683_v0.9b.c" into your project directory.
-On the left hand side of the MPLAB X IDE screen right-click on "Source Files" under your project name and select "Add Existing Item".
-Select the source file "12F683_v0.9b.c" and hit OK.
-Double click the 12F683_v0.9b.c source file that now shows up. This should bring up the source code.
-Select Run -> Build Main Project, from the menu. Source should compile with no errors.
-Congrats! You just compiled the code! You know things are working, so any new errors are your own doing.

-Now edit the source file, adding your custom table and the settings you want.
-Use the included spreadsheet to make your advance table and help figure out the settings.
-Build the project again and the .hex file should be in [Project Directory]\dist\default\production
-Now you can program the .hex file into your processor via whatever method you prefer.

NOTE: If you get an error like "JVM creation failed" when you try to launch MPLAB try the following steps...
1. Open "C:\Program Files\Microchip\MPLABX\mplab_ide\etc\mplab_ide.con f" in a text editor.
2. Change "-J-XX:MaxPermSize=384m" in that file to "-J-XX:MaxPermSize=128m", or delete that option alltogether.

Let me know if I made a mistake some where.

Ray
Nav_Aids is offline Find More Posts by Nav_Aids
Last edited by Nav_Aids; Sep 16, 2013 at 09:48 AM.
Reply With Quote