MPLAB IDE - Compilation (.hex to be used with FPP + NOPPP programmer)
Compilation and Device Programming
- Setup Project Directory
- Create directory C:\tut
- Copy main.c
into project directory.
- Start MPLAB IDE
- Start a new project
- Project -> New
- Fill in project name and directory, press OK
- Project -> Add Files to Project...
- Select the main.c file you downloaded. You should
now see main.c added to your project.
- Set Configuration Bits
- Configure->Configuration Bits...
- Set Oscillator to INTRC I/O and set everything else to
Off or Disabled by clicking on each row, your window
should look like below
- Close the Configuration Bits window by clicking on
the "X" in the upper right corner
- Set Project Options
- Project->Build Options...->Project
- Select the HI-TECH Linker Tab, you should see the
- Check the Alternate Setting box and set it to
-O"$(TARGETBASE).cod", click OK
- Select PIC device
- Click on Configure->Select Device...
- You should see the Select Device box shown below
- In the drop down menu select PIC16F627, click OK.
Although we are programming a PIC16F628, we chose
the PIC16F627 since this is what is supported by the
compiler currently used.
You should now have a .hex file which can be downloaded to
- Project -> Build All
- You should see the below output window, since there
are no error you are now ready to download the