How To Compile Program in MPLAB: After Installation Completed, Execute MPLAB IDE
How To Compile Program in MPLAB: After Installation Completed, Execute MPLAB IDE
To compile the program using MP LAB software follow the below steps, figures will guide you.
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
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
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.
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.