Electronic – What facilities/methods exist to debug and simulate programs for PIC microcontrollers

debuggingemulatormicrocontrollerpicsimulation

In the university, even though I did do some PIC programming and project, the project was quite simple. We could always put in a blinking LED as a sign of life into our program or have the code write to the serial port every now and then to let the programmer know that the code is executing ok. However, I am sure that there are some real proper standard ways to (1) debug and (2) simulate the PIC code. This becomes important when we have really huge and complex programs.

I think there is some sort of simulator for PIC but I can't find a link which says "The simulator does ABC and this is how you use it…". So what do the experts here say?

Best Answer

The PICkit3, ICD3 and REAL ICE programmers/debuggers from Microchip all support various levels of debugging. All of these allow you to pause execution, set breakpoint(s) and view variables / SFRs / CPU registers / etc. REAL ICE also allows you to stream data out at high speed through DMCI.

Microchip also has their MPLAB SIM simulator, which does a pretty good job of simulating the parts (with exceptions of course). There are also third-party tools like Proteus VSM.