Debugging with MPLab

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
How do I watch variable values in real time in MPLab? I tried the View -> Watch and entered in the variables, but they are not updating. Do I need to run MPLab in Debug mode to view these variables in real time?
 

spinnaker

Joined Oct 29, 2009
7,830
How do I watch variable values in real time in MPLab? I tried the View -> Watch and entered in the variables, but they are not updating. Do I need to run MPLab in Debug mode to view these variables in real time?
You need to compile with Debug and set a breakpoint. Variables will only update when a breakpoint is reached or CPU is halted.

To update variables in "real time", you will need some kind of debug terminal like terminal software on your PC attached through the PICs serial output or to an LCD display. You would just write the values to your "debug" terminal".
 

maxpower097

Joined Feb 20, 2009
816
How do I watch variable values in real time in MPLab? I tried the View -> Watch and entered in the variables, but they are not updating. Do I need to run MPLab in Debug mode to view these variables in real time?
I think your gonna need an ICE to do that in real time while the chips banging. Other wise you can go into debug mode and it will update the variables after a breakpoint or on pause in simulation.
 
Top