1. Start MPLAB.
2. From the Programmer menu. Select "Programmer\Select Programmer\PICSTART Plus". Then "Programmer\Enable Programmer".
3. Select the PIC16F877 using the "Configure\Select Device" menu.
4. Click "File\Import", and locate the MCS boot-loader firmware for the PIC16F877 at 4MHz. Import this .hex file to memory.

Important: Do not make any configuration fuse changes once you have imported the loader .hex file.

5. Place your 16F877 in the PICStart.
6. Click the Program button or "Programmer\Program" menu options.
7. Use the "Programmer\Disable Programmer" menu options to disconnect the PICStart once finished. This will free up the serial port for use with the loader.

You should now have the MCS boot-loader firmware programmed into your F877.

To use the MCS loader, you need the max232 interface to your PC serial port as shown in the loader help file.

Place the programmed F877 into your circuit or board with the max232 PC interface.

If you're compiling PBP code for use with the loader, then place;

DEFINE LOADER_USED 1
DEFINE OSC 4

in the beginning section of your code.

From within the MCS IDE, select the MCS loader as the programmer. Click the Compile\Program button. Your code will compile, and the MCS loader software screen should pop up, then program the PIC using the boot-loader.

If you're not using (shown in the MCS loader help file) the auto reset circuit, then cycle power to the board, or momentarily ground /MCLR to reset the PIC.

You can also use the loader with MCS ICD. With the PIC connected as above, use the ICD\Compile button. This will compile your code with the additional ICD code in your final .hex file. Then use the ICD control buttons to start, pause, stop, etc.