14.15.4 SFRs Window

The Special Function Registers (SFRs) window displays the contents of the SFRs for the selected processor. The format provided by this window is more useful for viewing the SFRs than the normal file register window, since each SFR name is included and several number formats are presented. To view only a few SFRs, you might want to use a Watches window, which may help with speed issues when using hardware debug tools (i.e., faster window update rate).

Whenever a break occurs, the contents of the Special Function Registers are updated.

When using a hardware tool for debug, some registers may show an R for each nibble of data to represent a reserved resource.

Visible Registers

If a data memory register is not physically implemented on a device, it may not appear in the SFR list. Some tools, such as simulators, may allow you to see registers that do not exist on the actual device, such as prescalers.

Single Stepping

If Freeze Peripherals On Halt is selected, the I/O port bits in the SFR or the Watches windows will not update when single stepping. The pin will be modified, but the read request to retrieve the new value is blocked by the freeze and cannot be updated until the next step or run command.

Figure 14-35. SFRs Window with Content

SFRs Window Displays

You may specify how memory is displayed in the window by selecting from the Format drop-down box on the bottom of the window. Choices are:

  • Individual - View all SFR registers together.
  • Peripherals - View SFR registers in functional groups.

Individual

In this display, SFRs are listed by address.

Data is displayed in the following columns.

  • Address – SFR hexadecimal address.
  • Name – Symbolic name for the SFR.
  • Radix Information – Hex, Decimal, Binary
Radix information is displayed in these four columns. Hex is shown in 1-byte blocks.

Peripheral

In this display, SFRs are grouped according to their related device peripherals.

Data is displayed in the following columns:

  • Address – SFR hexadecimal address.
  • Name – Name of peripheral or symbolic name for the SFR.
  • Radix Information – Hex, Decimal, Binary, Char
Radix information is displayed in these four columns. Hex is shown in 1-byte blocks.

Click the Filter Peripheral button to view the SFRs for only the peripherals selected.

SFRs Window Icons

Icons are located on the left side of the window.

Table 14-27. SFRs Window Icons
Icon Icon Text Function
Find Specify a string to find in the window. Select to match whole word or case.
Find Next Find next instance of string from Find.
Find Previous Find previous instance of string from Find.
Go To Go to specified line number or address.
Filter Peripherals

Peripheral Format Only

Filter by peripherals available in view.

Click icon to open the Select dialog. Select peripherals using Shift-click (range) or Ctrl-click (individually).

Filter Select All Peripherals.

Peripheral Format Only

Filter Select All Peripherals.

SFRs Window Menu

Right click in the memory window data area to pop up this menu.

Table 14-28. SFRs Window Context Menu
Item Description*
Find Find text specified using the Find dialog.
Output To File Write the displayed window contents to a text file using the Output to File dialog.
Print Print the contents of this window using the Print dialog.
Note: If you have a large memory device, the number of pages printed can become very large. A suggestion is to print the window contents to a file (Print dialog, General tab, Print to File check box) and then select which pages from the file you need to print.
Adjust Table Columns Adjust the columns automatically.