Please use CodeWarrior to write an assembly program to do the followings: Turn on only LED0 and LED7 continuously during the normal operation. Turn on all LEDs whenever there is XIRQ interrupt. Go...

Please use CodeWarrior to write an assembly program to do the followings:

  • Turn on only LED0 and LED7 continuously during the normal operation.

  • Turn on all LEDs whenever there is XIRQ interrupt.

  • Go back to normal operation after no more interrupt.

  • This process continues until a Reset.



Assembly Program


You will have 45 minutes to complete this part of the exam. You

may

use your textbook for this part of the Final Exam.






Instructions:


This is similar to the IRQ interrupt example program in the Unit 5 Lecture 8. Please use CodeWarrior to write an assembly program to do the followings:



  • Turn on only LED0 and LED7 continuously during the normal operation.

  • Turn on all LEDs whenever there is XIRQ interrupt.

  • Go back to normal operation after no more interrupt.

  • This process continues until a Reset.



Suggestions:



  • You should type in the example program on IRQ interrupt that is in the Unit 5 Lecture 8, assemble it, download it, and test it. Understand this example program completely by reading the Unit 5 Lecture 8, on IRQ and by testing the example program.




  • Then, read Unit 5 Lecture 8 slides on XIRQ interrupt, and modify the main: delete the code for enabling low-level triggering and for enabling IRQ pin, and add code to enable XIRQ pin, and clear the X bit (bit 6) in CCR.

  • Change the service routine name from IRQ_ISR to XIRQ_ISR; Set up interrupt vector for XIRQ_ISR (Please understand how IRQ_ISR is set up in the example program, and do it similarly to set up XIRQ_ISR using the XIRQ interrupt vector),



After you have successfully assembled your program, and debugged your program, download your program, and test your program.
















Notes:










May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here