CP316: Microprocessor Systems and Interfacing
Setup and test a base program that:
- flashes the left LED every 250 milliseconds (fairly rapid pulse) based
on Timer0. Use hardware timing that polls the interrupt flag. This
timing routine will be used to keep the processor busy. You will be
interrupting this routine. You need a fairly rapid pulse so that it
obvious if there are problems with your interrupts or interrupt handling
- the signal that is driving the LED should be displayed on
(use the C2 pin).
Note: this program has no interrupts and should be a simple reconfiguration
of work done in previous labs. Program must be working before you get to the
Demonstration - demonstrate the base program
To be done in your lab notebook.
- If working in the simulator, an interrupt can be "fired off"
Window | Simulator | Stimulus. What would you have to do in
the Stimulus screen to
configure and issue an INT1 interrupt?
- The timer routine presented in class has been modified to protect
region from interrupts.
- Explain how this code (shown below) works.
- What is the advantage to using this instead of simply
GIEL or GIEH?
- Would time_adj have to be modified to use this code? If yes, what is
the adjustment; if no, why not?
movlw low time_adj
movlw high time_adj
Demonstration - Explain your results for
the above questions.
Wilfrid Laurier University
© 2015 Wilfrid Laurier University