Watch function
By registering a variable to the watch window, it is possible to display the value of that variable. In this section, you register a global variable called "wait" to the watch window and confirm that the value of the variable is incremented using a software break. The "wait" that is defined as a global variable which uses it as a timer use and counts up about 1 second (from H'0 to H'80000).
Since the interrupt process functions peculiar to the embedded systems cannot have arguments, this variable is defined as a global variable so that other functions can share its value.
In the project tree, double click "main.c" to display the source. |
Select the variable "wait" in the source code. |
While wait is selected, right-click the mouse and select [Register to Watch1] from the menu. |
This opens the Watch panel where you can confirm that the variable is now registered. The current value of wait is 0. |