Interfacing and Programming 8279
Interfacing and Programming 8279
Problem :
Interface keyboard and display controller 8279 with 8086 at address 0080H. Write an ALP to set up 8279 in scanned keyboard mode with encoded scan, N-Key
rollover mode.Use a 16 character display in right entry display format. Then clear the display RAM with zeros. Read the FIFO for key closure. If any key is
closed, store it’s code to register CL.Then write the byte 55 to all the displays, and return to DOS. The clock input to 8279 is 2MHz, operate it at 100KHz.
Solution :
The 8279 is interfaced with lower byte of the data bus, i.e. Do-D7 . Hence the Ao input of 8279 is connected with address lineA1.
The data register of 8279 is to be addressed as 0080H, i.e.Ao=0.
For addressing the command or status word Ao input of 8279 should be 1.
The next step is to write all the required command words for this problem.
This command byte sets the 8279 in 16-character right entry and encoded scan N-Key rollover mode.
The clock input to 8279 is 2MHz, but the operating frequency is to be 100KHz, i.e. the clock input is to be divided by 20 (10100). Thus the prescalar value is
10100 and trhe command byte is set as given.
Read FIFO :
This command byte enables the programmer to read a key code from the FIFO RAM
This command enables the programmer to write the addressed display locations of the
RAM as presented below.