Program Debugging
The program can be run by pressing the Play button in the control console. If the program is correct, the specified output is seen. The bar graph displays a binary count when the Input button on the schematic is “pressed” using the mouse pointer. It should take 2.56 sec to cycle through all the output codes with a loop delay of 10 ms. This can be checked using the simulation clock at the bottom of the screen.
If the program does not work as required, it needs debugging. The screenshot in Figure C.2 shows some of the debugging features. The principal technique is single stepping—the program sequence is checked by executing one statement at a time. This requires the source code to be displayed; pause the program and select the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access