If you are not familiar with advanced software development tools, you may find MPLAB somewhat perplexing. These are some brief notes to help you get started. Please note that MPLAB is not my product and any further questions about it should be addressed to its manufacturer.
Please note also that you need to know PIC assembly language; you can learn it from many excellent books such as Easy PIC'n, available from Square One Press, and the online resources available from places such as DonTronics.
If you type
C:\MPASM> mpasm
you'll be prompted to fill in lots of information. If you type
C:\MPASM> mpasm myprog
then MPASM will look for MYPROG.ASM and generate from it two files: MPASM.HEX, which contains your assembled code ready to put into the PIC, and MPASM.LST, which contains a source listing with error messages. If there are any fatal errors, MPASM.HEX will not be created.
We'll assume you have just one file, MYPROG.ASM, and from it you want to generate MYPROG.HEX.
Start MPLAB.
Choose Project, New Project.
Go to the directory where MYPROG.ASM resides, and create MYPROG.PJT there. The dialog box will say "*.pjt" and you type "myprog" in place of "*".
A diagram of the structure of the project will appear. It contains only one item, "myprog[.hex]". This is a "node," i.e., a file to be created by MPLAB.
Click once on "myprog[.hex]" and add the node "myprog.asm" under it. Then click OK a couple of times to get back to the main menu.
Choose Project, Save Project.
Then go to File, Open, and open the file MYPROG.ASM.
Go to Options, Development Mode, and choose MPSIM Simulator and tell it what kind of PIC you're using. Also go to Options, Processor Setup, and make sure everything is right.
Edit your file ad libitum, save it, and then go to Project, Build All. That means "do all the assembling and other things needed to get the .hex file into final form."
The assembler will run and some messages will appear on the screen:
You can also view the entire source listing (LST file), with messages in context, by choosing Window, Absolute Listing. Get into the habit of doing this.
Close the "Build Results" window when you are through with it.
You will be using the Debug menu to run the program. But you must also set up some memory locations to be displayed, or you won't see anything.
Here is one of many things you can do.
From there, you can do another Run To Here, or step through the code, or reset the program, using the Debug, Run menu.
If you had a Microchip programmer such as a PICstart Plus, you could turn it on from within MPLAB and do your programming. But NOPPP doesn't work that way. Exit MPLAB, find your .HEX file, and use the NOPPP software (in a DOS box) to do the programming.