Freescale Semiconductor Microcontrollers User Manual

Page 462

Advertising
background image

HCS08 Full Chip Simulation

Peripheral Modules Commands

462

Microcontrollers Debugger Manual

Figure 18.36 Simulated Port Inputs Dialog Box

Use the Simulated Port Inputs dialog box to reconfigure the input value to any I/O port.
Depending on whether the input capture is set for rising/falling edge, to trigger the event,
first set the port inputs high or low and then invert them to an opposite value. Once the
Input Capture event takes place, you can observe the CHxF in the Channel Status and
Control register in the Memory window.

Figure 18.37 Memory Component Window

If the Timer module is configured for an Output Compare event, then once the event takes
place you can observe the same CHxF Flag via the Memory window. If the timer channel
interrupt is enabled, the FCS jumps to an appropriate subroutine as long as the Timer
channel interrupt vector is properly defined. To observe the Timer Overflow Flag (TOF)
flag being set as a result of the corresponding CPU event, situate your Memory window on
the memory location of the Timer Status and Control register.

To observe the Pulse Width Modulation (PWM) operation, properly configure the Timer
to operate in the Modulo up count mode, choose the toggle-on-overflow or clear/set output
on compare events to create the desired duty cycle wave. Once a PWM event takes place,
you can observe pin toggle/clear/set behavior corresponding to the Timer configuration in
the Memory window displaying the IO port associated with a given timer channel.

To observe the accuracy of the Timer module operation, the user can observe the number
of CPU cycles that it takes for the event to occur. The cycle counter is only incremented as

Advertising