Spring 2000
ENSC 151
DIGITAL AND COMPUTER DESIGN LABORATORY

Assignment #2(a): Handling Interrupts

Posted: February 1, 2000
Due: Monday, February 14, 2000, by 16:00 in the ENSC departmental office


The given interrupt example program, irqtst, sets up IRQ interrupts and then prints "Ready." on line 1 of the LCD device. It then waits for an IRQ interrupt (blue push-button). When an IRQ interrupt event occurs, the program prints "Got it!" on line 2 of the LCD device. In-between interrupts it does nothing but waste time in a "busy loop".

Modify the program, irqtst, so that it prints one of your user defined characters (from asn1) each time the push-button is pressed, up to a maximum of 8 chars. After that it should not print anything when the push-button is pressed.

Use your "best" coding habits. You can modify any part of the irqtst program. Note, you most likely have to set the top bit of control register INTCR (located at $001e), see page 53 in the 6812 technical summary. Otherwise your active low push-button may trigger several interrupts before you can take your finger off of it.


Last modified: Thursday December 24 17:07:12 PST 1998.