CPRE 381: Digital Systems, Logic, Programming

Spring 2006

HW#11

Due Date: Wednesday, April 19

 

  1. Program the MPC555 PIT to raise an exception every 10 milliseconds. The exception handler should be called using SIVEC based IRQ/jump table. You can see an example of SIVEC based ISR call on Page 33 of the MPC555 interrupt handling document accessible from the class web page. The PIT interrupt handler should check to see if the time to the next interrupt is greater than 5 milliseconds. If it is then it should reinitialize the PIT for an interrupt period of 50 milliseconds (otherwise leave it unchanged).
  2. In order to shed some light on Problem 1, estimate the number of instructions that will be executed from the time PPC controller accepts the PIT interrupt to the time the PIT ISR is entered. How does it compare with the PIT period of 10 milliseconds. Now imagine that all the 16 sources of interrupt (I0, L0, I1, L1, ..., I7, L7) are populated with exactly one device each. Also assume that PIT is programmed to interrupt at L7. Assume that the probability of an interrupt arising at I0, L0, I1, L1, ..., I7 is exactly 1/2. Also assume that the average size of ISR (in number of instructions executed) averaged over all the 15 sources (I0, L0, I1, L1, ..., I7) is 10000 instructions. Now estimate the average number of instructions that will be executed from the time PIT raises an interrupt to the time its ISR is entered. How does that compare with a 10 millisecond PIT period?