ColdFire V1 Full Chip Simulation Connection
True Time I/O Stimulation
639
Microcontrollers Debugger Manual
2. Choose Simulator > Set > Sim.
3. Choose Component > Open > Io_led
Figure 28.71 shows the IO_LED component.
Figure 28.71 IO_LED Component Window
4. Choose Component > Open >Template.
Figure 28.72 shows the Template component.
Figure 28.72 Template Component Window
5. Choose Simulator > Load io_demo.abs.
6. Choose Run > Start/Continue or click the green arrow icon.
7. If the program halts in startup, click the Start/Continue command again.
8. Choose Run > Halt to stop execution after a few seconds.
The Template component is a view linked to a specific memory location in TargetObject.
In the source code of the test program, you can find a variable associated with it:
#define PORT_DATA (*((volatile unsigned char *)0x0210))/* Value
with range 0..255 */
The Template component polls this value and displays it in a speedometer-like outlook.
The procedure IO_Show in io_demo.c, shown in Listing 28.6, increments or
decrements this value, depending on the raise direction. The raise direction depends on a
global variable dir that is turned back when the top or bottom value is reached.