ELEC2220 Computer Systems Spring 2021

ELEC2220 Computer Systems Spring 2021

In this homework, you are to make the changes described below to the homework 7, adding
the component IT keyboard which is used to enter the initial pattern index l. With a proper
configuration and set-up, the IT keyboard generates the IRQ interrupt when a key is pressed.
Then, the corresponding interrupt service routine (ISR) is executed which identifies the key pressed
and returns the value of the key through the memory variable Key value. The assembly code of
the ISR is provided in the Homework folder.
ˆ Initially, all of the LED’s are to be off, i.e., lit green once your program starts.
ˆ Your program waits until a (valid) initial pattern index is entered through the keyboard.
ˆ When a valid initial pattern index (0, 1, 2, 3, 4, 5, 6, 7) is entered, the initial pattern is
displayed immediately and the corresponding sequence of patterns starts being displayed.
ˆ A sequence is repeated indefinitely until another initial pattern index is entered.
ˆ If an invalid initial pattern index or the initial pattern index the same as the one for the
current sequence is entered, it is ignored.
ˆ An initial pattern index can be entered at any time, which initiates the new sequence immediately.
ˆ The rate at which the pattern is changed must be set such that the sequence length in time
is the same independent of the initial pattern index l.
ˆ The timer basic function must be used in controlling the rate, i.e., implementing the subroutine delay.
ˆ Use the ports B (address: 1) and E (address: 8) for the rows and columns of the IT keyboard.
The vector number to be entered in the IT keyboard configuration window is 6. The interrupt
vector address for the IRQ interrupt is $FFF2.
ˆ The first 5 memory variables allocated must be LEDS, DIRECTION, NTOFS, Key flag and
Key value, in this specific order. Key flag and Key value must be initialized to 0 and
$FF, respectively.

DETAILED ASSIGNMENT

20210331152737hw21s_8

Powered by WordPress