How to do a Simulation in MPLAB IDE
You can stimulate and observe the SFRs without actually burning the program to the chip. When you have a program ready according How to start Programming with MPLAB IDE that you want to simulate the steps are as follows.
Go to the Debugger menu, then go to Select Tool sub menu and select MPLAB Sim. Now you have selected the simulation tool.
Go to the Debugger menu and then go to Stimulus and click New WorkBook. In Asynch tab, select the pins or SFRs you want to stimulate. Then change the action you want. For example let’s say you wanted to toggle a pin high and low during the simulation. For that, select Toggle and click Fire during simulation to toggle between high and low. Please note that the Stimulus dialog must be open for stimulus to be active during simulation.
Then go to View and select and open the windows you want to monitor. If you select Watch, you can clearly monitor some SFRs that you specify.
Finally go to the Debugger menu and click Animate. Instructions will be executed slowly so that you can monitor everything.