(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
  
<b>Step2:</b> Selcet the Standalone option for the project.
+
<b>Step2:</b> Select the Standalone option for the project.
 
[[File:Pic16F877A_MplabX_Setup02.png]]<br><br>
 
[[File:Pic16F877A_MplabX_Setup02.png]]<br><br>
  
Line 16: Line 16:
  
  
<b>Step4:</b> Select the required programmer. In this case it is Pickit2 the IC(PIC16f877A) from the drop down.
+
<b>Step4:</b> Select the required programmer. In this case it is Pickit2.
 
[[File:Pic16F877A_MplabX_Setup04.png]]<br><br>
 
[[File:Pic16F877A_MplabX_Setup04.png]]<br><br>
  
Line 24: Line 24:
  
  
<b>Step6:</b> Provide the project name and select the project project folder.
+
<b>Step6:</b> Provide the project name and project location.
 
[[File:Pic16F877A_MplabX_Setup06.png]]<br><br>
 
[[File:Pic16F877A_MplabX_Setup06.png]]<br><br>
  
Line 39: Line 39:
 
[[File:Pic16F877A_MplabX_Setup09.png]]
 
[[File:Pic16F877A_MplabX_Setup09.png]]
 
<html>
 
<html>
<script src="https://gist.github.com/SaheblalBagwan/cb2cf78aadc724737d79.js"></script>
+
<script src="https://gist.github.com/SaheblalBagwan/de54372474c563ebac014cd718aaa1d1.js"></script>
 
</html>
 
</html>
 
<br>
 
<br>
Line 51: Line 51:
 
<b>Step11:</b> Code is compiled with no errors. The <b>.hex</b> file is generated.<br>
 
<b>Step11:</b> Code is compiled with no errors. The <b>.hex</b> file is generated.<br>
 
[[File:Pic16F877A_MplabX_Setup11.png]]<br><br>
 
[[File:Pic16F877A_MplabX_Setup11.png]]<br><br>
 +
 +
 +
<b>Step11:</b> Check the project folder for generated <b>.hex</b> file.<br>
 +
[[File:Pic16F877A_MplabX_Setup12.png]]<br><br>
  
 
=Uploading the Hex file=
 
=Uploading the Hex file=
After generating the .hex file check this tutorial for [[LPC1768: Uploading Hex and Bin files|uploading Hex and Bin files.]]
+
After generating the .hex file check the below tutorials for uploading it using Pickit2 or Ds30 Software.
 +
# [[Uploading Hex File Using Pickit2|Uploading Hex File Using Pickit2.]]
 +
# [[Uploading Hex File Using Ds30 Bootloader|Uploading Hex File Using Ds30 Bootloader.]]
 
<br><br>
 
<br><br>

Latest revision as of 16:28, 22 April 2016

In this tutorial we will see how to setup a Mplabx project to generate .hex file for Pic16f877a

Pic16F877A MplabX Setup0.png

MPLABx Setup Steps

Step1: Open the MPLABx software and select the New project from File Menu as shown below.
Pic16F877A MplabX Setup01.png


Step2: Select the Standalone option for the project. Pic16F877A MplabX Setup02.png


Step3: Choose the Controller(PIC16f877A) from the device drop down. Pic16F877A MplabX Setup03.png


Step4: Select the required programmer. In this case it is Pickit2. Pic16F877A MplabX Setup04.png


Step5: Choose the xC8/Hitech compiler which ever is installed. Pic16F877A MplabX Setup05.png


Step6: Provide the project name and project location. Pic16F877A MplabX Setup06.png


Step7: Now the required project is created. Create a new .c/main.c to write the code. Pic16F877A MplabX Setup07.png


Step8: Save the file with C extension. Pic16F877A MplabX Setup08.png


Step9: Type the code or Copy paste the below code snippet and save it
Pic16F877A MplabX Setup09.png


Step10: Build the project and fix the compiler errors/warnings if any.
Pic16F877A MplabX Setup10.png


Step11: Code is compiled with no errors. The .hex file is generated.
Pic16F877A MplabX Setup11.png


Step11: Check the project folder for generated .hex file.
Pic16F877A MplabX Setup12.png

Uploading the Hex file

After generating the .hex file check the below tutorials for uploading it using Pickit2 or Ds30 Software.

  1. Uploading Hex File Using Pickit2.
  2. Uploading Hex File Using Ds30 Bootloader.