by Jerry Messina » Wed Apr 22, 2015 9:46 am
I find debugging with MPLAB to be indispensable. However, it's very different from ISIS... it's not a circuit simulator so you don't have virtual components and such, but it does have other advantages.
MPLAB has a built-in PIC simulator that lets you run your program on a virtual PIC. It usually does a decent job simulating "code" but it's limited in IO features. You can do simple things like set and observe pin states, but it doesn't cover a lot of the peripherals except for UART1.
You can work at the source code level or view things in assembly, set variable watches, execution breakpoints, run, step, etc. I use it mainly for debugging software algorithms.
Then there's the ICD debugger interface. It looks a lot like the simulator with a few different features. Here you use one of the programmers such as the PICKit3 or ICD3 connected to the same ICSP connections that you use to program the chip. The ICD lets you load your code onto the chip and run it on an actual device. This way you can see how your code interacts with real hardware.
The nice thing is that it's all free (except for the ICD of course) so all it costs is some time to try it out. There are two versions of MPLAB available... the older MPLAB v8.92 and the "new" MPLABX. For the time being I'd recommend sticking with the original MPLAB as they're still working out some of the kinks.
One of my main complaints with simulators in general is the fact that you never know how well the simulator actually represents the part(s). You can have bugs in the model, bugs in the device that aren't in the model, limitations in the model, etc, so once you've done the simulation you can still have issues. I don't mind using a free one, but I'm not sure I'd pay money for one esp. since there are other options. I can live w/out simulating how my LCD works!