CP316: Microprocessor Systems and Interfacing
Introduction to the Development Environment (part 1)
PostLab
- In your lab notebook, summarize the steps required to create a project
in the MPLABX IDE.
- Work through sections 3.5 Using MPLAB IDE and 3.6 Using the
MPLAB SIM in Debugging PIC18 Applications from the text book
[Chapter
3; pdf, 36pp, sample chapter from text web site].
Things to note:
-
Here is a correction:
3.6.6 Tracing Code
The text says to go to Debugger/Settings to enable tracing. This no
longer exists in MPLAB X.
To enable tracing:
go to File / Project Properties
click Simulator from the left tree
choose Trace from the Options categories dropdown
set Data Collection Selection to Instruction Trace
click Apply, then OK
go to Window / Debugging / Trace
run debugger
- The example uses an older version of the IDE so some of the
screen shots
will not be identical.
- The program is poorly written. If the problem is not obvious,
put a breakpoint
at the last nop and then single step through the code. What is
the problem?
- Huang doesn't use the project wizard when creating projects.
- Huang introduces some additional debugging techniques.
- In your lab notebook, list the specific debugging techniques
(e.g. breakpoints)
covered in the lab and postlab exercises with a brief description of the
technique.
Your lab notebook will be checked for the post lab work at the next
lab.
Wilfrid Laurier University
© 2019 Wilfrid Laurier University