Distributor of STMicroelectronics: Excellent Integrated System Limited
Datasheet of ST62GP-EMU2 - KIT EMULATOR FOR ST6 MCU SER
Contact us: [email protected] Website: www.integrated-circuit.com
4 - Tutorial
ST62GP-EMU2 Emulator User Manual
32/57
14 In the Control Bar, click the Cont button - this runs the program from the
current Program Counter location without stopping until a breakpoint is
encountered (see
Figure 16
).
15 After the program stops running (note that it has stopped where the breakpoint
was set), click the Step button in the Control Bar. It executes the
jrs
0,drbcopy,lowbit
instruction which tests the zero bit of the drbcopy
register to see if it is a “1” or a “0”. If it is a “1”, then it jumps to the label referred
to as
lowbit
. In our case the zero bit is “0”, so the
jrs
instruction does not
make a jump and the next instruction is highlighted (
ldi drbcopy,01h
).
16 Click the Step button again - this loads the hexadecimal value 01h into the
drbcopy register.
Results: Look at the oscilloscope which is displaying the voltage level of pin
PB0 and note that it is low (0 V).
17 Click the Step button again - this loads the hexadecimal value 01h into the DRB
register.
Results: Look at the oscilloscope which is displaying the voltage level of pin
PB0 and note that it has changed to high (5 V). The reason why it changed is
because the last instruction that was executed changed PB0 from Output
Figure 16: Breakpoint encountered
33 / 58
33 / 58