uPSD3300 Series Design Guide for DK3300-ELCD Using KEIL
■ Click
“Run” and see that LCD display now shows original text
DEMO”
“PWM to ADC
■ Click
“Reset”.
■ Go back to the file pwm_adc.c by clicking on its file tab.
■ Set one breakpoint at line of code ( printfLCD(msg_buff); ) as shown in Figure 48 in
APPENDIX B.
Note: the red dot indicates where the breakpoint is set and the yellow arrow indicates the next
instruction to execute.
■ Go back to the file pwm_adc.c and remove the breakpoint by clicking on the icon
at
the top so that the red dot is gone
■ Click “Run ” and notice that the LCD display shows continuous changes in values of
PWM and ADC as the loop is executed multiple times . This is seen by changing vales of
PWM and ADC in the LCD display.
■ After about 10 seconds click.
”Halt”.
5.7.1 Instruction Tracing
The uPSD will rapidly stream a record of all the MCU instruction steps out to the ULINK adap-
tor. From this data, uVision will create a formatted file to help you find even the most stubborn
bugs, showing a history instruction steps that the MCU has last executed.
■ •To enable Trace, select from the debug bar
(Figure 16) .
Figure 16. Debug Bar
RUN
Step-Over
View trace
Watch Window
RESET
Step-In
Record Trace Dissassembly Window
A Trace Display file can display program source code in both C and Assembly formats.
■ Go back to the file pwm_adc.c by clicking on its file tab.
■ Set one breakpoint at line of code ( printfLCD(msg_buff); ) as shown in Figure 48 in
APPENDIX B. by moving the pointer on the left of the line of code and clicking on .
A red dot is seen on left of line of code.
■ Click “Run”, and the MCU will run until hitting the breakpoint, then a window will open
showing the Assembly source code, as shown in Figure 48 in APPENDIX B.
Note: The Program Counter in Register and in the Trace Dissassembly window
■ Go back to the file pwm_adc.c and remove the breakpoint by clicking on the
top.
at the
25/68
1