Paul E. Schoen said:
In the help for MPLAB SIM I found the following under register trace:
The value of a specified register may be saved to a file (traced) during
a run for certain conditions (see Table: Definitions of Register Trace).
Specify register trace information here.
I have not actually done it, but it sounds like it should be possible.
The best place to ask is
http://forum.microchip.com.
I did a little experimenting and I was able to get a file with a trace of
the value of a user-defined file register upon each entry into a procedure.
I used Stimulus-Register Trace, and I set the Reg/SFR to "ledcount", and
the PC value to "BlinkUSBStatus". I created a text file for the results,
and chose "Dec" format. I set the width as 2 since the variable is an
integer. I am using my USB project, which is modified from the USB FS Demo,
and the "ledcount" simply runs from 0 to 9999 as a delay for blinking
status LEDs. When I click on "Apply" it tells me that the synchronous
stimulus was applied successfully, and it also clears the content of the
text file. When I run the simulation and stop after a second or so, or upon
a breakpoint, the file shows a succession of integer values from 0 to 9999.
I was unable to get a trace on the WREG register or LATB, but I was able to
see the PORTB register.
If you want to update the trace on a PC that is not named in the drop-down
list, you can use the disassemby listing to find the hex value of the PC
you want, and enter that.
It seems that it is best to set up separate files if you want to trace more
than one register, but a single file does work. It just adds the second
trace at the end of the first.
HTH,
Paul