0% found this document useful (0 votes)
29 views

How To Compile Program in MPLAB: After Installation Completed, Execute MPLAB IDE

To compile a program in MPLAB: 1. Open MPLAB IDE and select the Project Wizard to choose a device and language toolset like the HI-TECH ANSI C Compiler. 2. Create a new project, add existing source files, and build the project by clicking Project and then Build. 3. Connect the PIC development board to the programmer and program the hex file by selecting Programmer and then Program.

Uploaded by

rpocas
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

How To Compile Program in MPLAB: After Installation Completed, Execute MPLAB IDE

To compile a program in MPLAB: 1. Open MPLAB IDE and select the Project Wizard to choose a device and language toolset like the HI-TECH ANSI C Compiler. 2. Create a new project, add existing source files, and build the project by clicking Project and then Build. 3. Connect the PIC development board to the programmer and program the hex file by selecting Programmer and then Program.

Uploaded by

rpocas
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

How to Compile program in MPLAB

To compile the program using MP LAB software follow the below steps, figures will guide you.

After installation completed,


1. Execute MPLAB IDE.

2. Select Project Wizard...

from Project menu.

3. Select device and click on next.

4. Select a language tool set menu appears and set the following parameters (as shown in the figure) and click on NEXT. Active Toolsuite: HI-TECH Universal Toolsuite. Toolsuite contents: HI-TECH ANSI C Compiler. Location: C:\Program Files\HI-TECH Software\PICC\PRO\9.65\bin\picc.exe

5. Save the project in appropriate location and click on next.

6. Add existing files to project, if not click on next then finish the

Wizard.

7. To write New program click on File menu then new. Type the program and Save it with extension .c

8. Right click on the folder named Source file in project window

and select options Add Files. Add the c file.

9. To compile the File. Click on Project, then Build or press

F10. If there are on syntax error, the file is successfully built as shown in the figure.

10. Connect your target board (PIC Development board) to PIC programmer through ICSP cable and then connect PIC board 2 programmer to PC through USB cable. The OS recognizes as Human Interface device, so no divers are required. Click on programmer menu, then select programmer, the PICboard2.

11. PICboard 2 is Initialized and it is ready to program.

12. To change the configuration bits, Select configure menu and the configuration bits. Deselect configuration bits set in code.

13. To program the Hex file to microcontroller: select Programmer menu then Program.

14. To execute the program : select Programmer menu then release from reset.

Configuring PIC board 2 Programming microcontroller by PIC board 2. Connect your target board ( PIC Development board) to PIC programmer through ICSP cable and then connect PIC board 2 programmer to PC through USB cable. The OS recognizes as Human Interface device, so no divers are required. Execute PIC board 2 software. The following message is displayed on the software. PICboard 2 found and connected. PIC device found.

The hex file to be programmed into microcontroller is selected by importing from File menu. Once the Write command button, the hex file is programmed into controller.

Note: If errors are encountered during installation, this document will not cover those errors.

You might also like