Hello
Here I would recommend you to use the visualization tool component.
- From the Debugger menu, select: Component > Open. A window opens with a list of components,
- Select 'Visualization'
- Click OK. A Visualization tool window opens in 'Edit' mode.
- Right-click in the Visualization tool window and select Add New Instrument > LED.
The cursor is now dragging a box that you can drop in the data visualization window (click).
- Resize the box to a visible LED.
- A right click on this LED opens a window to set the properties of the LED. Set the following parameters:
- Rounding box: No Box
- Kind of Port: Memory
- Port to display: <Address of I/O port>
- Bit number to display: <Bit inside of I/O port>
- Close the property box.
You need the LED to refresh periodically to indicate changes when they happen.
- Right-click in the Data Visualization window. A pop up menu show up.
- Select Properties.
- Select Periodical and enter a Refresh Rate of 1.
- Close the window.
Now switch to Display mode
- Right-click in the Data Visualization window
- Select "Edit Mode". The entry Edit mode should be unchecked in the pop up menu after that.
From now on, you should see how the port is changing in the Visualization tool window
Clicking on the LED in the Visualization tool window will toggle the bit.
CrasyCat