4.15 Viewing Device Memory (including Configuration Bits)

MPLAB X IDE has flexible, abstracted memory windows that provide a customizable view of differing types of device memory. Select Window > Target Memory Views to see a list of device-specific memory windows.

For example, to view the Flash memory:

  1. Put a breakpoint at this line of code: if (counter < THRESHOLD).
  2. Click the Debug Project icon
    . When the code starts to run, quickly press and release the button on the evaluation board. The code will halt at the breakpoint.
  3. Select Window > Target Memory Views > Program Memory.
  4. The Program Memory window will open showing the last halt location.
    Figure 4-23. Memory Window Content at Breakpoint Halt

To set Memory window options, right click in the Memory window to pop up a menu with various options such as display options, fill memory, table import/export, and output to file. The content of the menu depends on the window. See 14 MPLAB X IDE Windows and Dialogs.

Figure 4-24. Memory Context Menu

To refresh some windows, a read of device memory is needed. For AVR devices, the Configuration Bits memory window needs to be read before it can be edited.

  1. Click the Finish Debugger Session icon
  2. Click on the Read Device Memory icon, either on the window (see image below) or the toolbar (
    ). In the context of this window, it is Read Configuration Bits.
  3. Once memory has been read, the red text will change to black.