Difference between revisions of "Pic18f4520 MPLABx Setup"
(Created page with "Category:Starter PIC18F4520 In this tutorial we will see how to setup a Mplabx project to generate .hex file for Pic16f877a<br><br> File:Pic16F877A_MplabX_Setup0.png<b...") |
|||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Starter PIC18F4520]] | [[Category:Starter PIC18F4520]] | ||
| − | In this tutorial we will see how to setup a Mplabx project to generate .hex file for | + | In this tutorial we will see how to setup a Mplabx project to generate .hex file for Pic18f4520<br><br> |
[[File:Pic16F877A_MplabX_Setup0.png]]<br><br> | [[File:Pic16F877A_MplabX_Setup0.png]]<br><br> | ||
| Line 12: | Line 12: | ||
| − | <b>Step3:</b> Choose the Controller( | + | <b>Step3:</b> Choose the Controller(Pic18f4520) from the device drop down. |
| − | [[File: | + | [[File:Pic18f4520 MplabX Setup03.png]]<br><br> |
| Line 43: | Line 43: | ||
<br> | <br> | ||
| + | <b>Step10:</b> Flash setup : Board comes with bootloader, we need to make the following setup otherwise | ||
| + | generated hex file may overwrite the bootloader. <br> | ||
| + | [[File:Flash setup.PNG]]<br><br> | ||
| − | <b> | + | <b>Step11:</b> Build the project and fix the compiler errors/warnings if any.<br> |
[[File:Pic16F877A_MplabX_Setup10.png]]<br><br> | [[File:Pic16F877A_MplabX_Setup10.png]]<br><br> | ||
| − | <b> | + | <b>Step12:</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> | + | <b>Step13:</b> Check the project folder for generated <b>.hex</b> file.<br> |
[[File:Pic16F877A_MplabX_Setup12.png]]<br><br> | [[File:Pic16F877A_MplabX_Setup12.png]]<br><br> | ||
| Line 61: | Line 64: | ||
# [[Uploading Hex File Using Ds30 Bootloader|Uploading Hex File Using Ds30 Bootloader.]] | # [[Uploading Hex File Using Ds30 Bootloader|Uploading Hex File Using Ds30 Bootloader.]] | ||
<br><br> | <br><br> | ||
| + | |||
| + | Have a opinion, suggestion , question or feedback about the article let it out here! | ||
| + | {{DISQUS}} | ||
Latest revision as of 17:59, 14 March 2017
In this tutorial we will see how to setup a Mplabx project to generate .hex file for Pic18f4520

MPLABx Setup Steps
Step1: Open the MPLABx software and select the New project from File Menu as shown below.

Step2: Select the Standalone option for the project.

Step3: Choose the Controller(Pic18f4520) from the device drop down.

Step4: Select the required programmer. In this case it is Pickit2.

Step5: Choose the xC8/Hitech compiler which ever is installed.

Step6: Provide the project name and project location.

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

Step8: Save the file with C extension.

Step9: Type the code or Copy paste the below code snippet and save it
Step10: Flash setup : Board comes with bootloader, we need to make the following setup otherwise
generated hex file may overwrite the bootloader.
Step11: Build the project and fix the compiler errors/warnings if any.

Step12: Code is compiled with no errors. The .hex file is generated.

Step13: Check the project folder for generated .hex file.

Uploading the Hex file
After generating the .hex file check the below tutorials for uploading it using Pickit2 or Ds30 Software.
Have a opinion, suggestion , question or feedback about the article let it out here!
