mplab c18 c compiler getting started - Computer & Information Science
mplab c18 c compiler getting started - Computer & Information Science
mplab c18 c compiler getting started - Computer & Information Science
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
MPLAB ® C18 C Compiler Getting Started<br />
4.2.4 Test Program 1<br />
Use Project>Build All or the equivalent icon to build the project.<br />
After a successful build, the Run icon becomes blue, indicating that the program is<br />
halted and ready to run. Select the Run icon and it turns gray, indicating it is running.<br />
The Halt icon turns blue, indicating the program is running and can be halted. In addition,<br />
on the status bar at the bottom is a “Running...” indicator. Select the Halt icon and<br />
open the Output window if it is not already open (Figure 4-3).<br />
FIGURE 4-3: OUTPUT WINDOW: “HELLO, WORLD!”<br />
The text, “Hello, world!”, should appear in the SIM Uart1 tab of the Output window.<br />
Select the Reset icon to reset the program, and then select the Run icon again to print<br />
the message a second time in the Output window.<br />
Note: After “Hello, world!” prints out, the program continues executing, running in<br />
an endless while (1) loop until it is halted. If Run is executed immediately<br />
after halting, the endless loop resumes running. In order to re-execute<br />
the program from the beginning, select the Reset icon after the program is<br />
halted.<br />
DS51295F-page 42 © 2005 Microchip Technology Inc.