12/07/2006
There are still a number of students sending me email for additional clarification on various aspects of interrupts. I will continue to forward the ones I think might be useful to you all. I leave it to you to decide which to read carefully, and which add no value to you. A student writes: Hey Dr. Patt, Hey, Mr. *******. in writing my interrupt service routine I have successfully written code to poll the DSR until it is ready, then load my ASCII value into the DDR. My question is, is it necessary to do the same thing for the KBSR/KBDR? Under normal circumstances I would poll the KBSR until it was ready, then read the value from the KBDR, but since those parts of my code are in my interrupt service routine, is it redundant? Meaning, hasn't the KBSR been asserted with a 1 in the highest 2 bits for my interrupt to execute, so do I need to poll the KBSR before I read from the DDR? Or will either way work and have no effect on the grading of my program? <<name withheld to protect the student who sees it is redundant and unnecessary, but deep down wants to be sure it has no effect on the grading>> The whole point of the programming assignment is that if the IE bit is set, you don't need to poll the KBSR, and in fact you should NOT waste time polling the KBSR. Yale Patt