Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The 8279 is a hardware approach to interfacing a matrix keyboard and a multiplexed display.
The disadvantage of using software approach is that the microprocessor is occupied for a
considerable amount of time in checking the keyboard and refreshing the display (if the CPU
gets involved in doing some lengthy task which cannot be interrupted to refresh the display,
only one digit of the display will be left lit). The 8279 relieves the processor from these two
tasks.
The disadvantage of 8279 is cost.
The trade-offs between the hardware approach and the software approach is the production
cost versus the processor time and the software development cost.
The 8279 is a 40 pin device with two major segments: Keyboard and Display.
Keyboard segment can be connected to a 64-contact key matrix. Keyboard entries are de
bounced and stored in the internal memory (FIFO), while an interrupt signal is generated
with entry.
Display segment can provide sixteen-character scanned display interface with such devices
as LEDs. This segment has 16 * 8 R/W memory (RAM), which can be used to read/write
information for display purpose.
OUT DX, AL
; Send to 8279
OUT DX, AL
MOV AL, 110 10000B
OUT DX, AL
MOV DX, 0FFE8H
OUT DX, AL
OUT DX, AL
MOV DX, 0FFE8H
IN AL, DX
Sample Program with procedure to Display contents of CX register on SDK-86 LED Displays.
DATA SEGMENT WORD PUBLIC
SEVEN_SEG
DB
DB
DATA ENDS
PUBLIC DISPLAY
CODE SEGMENT
ASSUME CS: CODE, DS: DATA
DISPLAY PROC FAR
PUSHF
PUSH DS
PUSH AX
PUSH BX
PUSH CX
PUSH DX
MOV AX, DATA
MOV DS, AX
MOV DX, 0FFEAH
CMP AL, 00H
JZ DATAFLD
MOV AL, 100 10100B
JMP SEND
DATAFLD:
MOV AL, 100 10000B
SEND: OUT DX, AL
MOV BX, OFFSET (SEVEN_SEG)
MOV DX, 0FFE8H
MOV AL, CL
AND AL, 0FH
XLATB
OUT DX, AL
MOV AL, CL
MOV CL, O4H
ROL AL, CL
AND AL, 0FH
XLATB
OUT DX, AL
MOV AL, CH
AND AL, 0FH
XLATB
OUT DX, AL
MOV AL, CH
ROL AL, CL
AND AL, 0FH
XLATB
OUT DX, AL
POP DX
POP CX
POP BX
POP AX
POPF
RET
DISPLAY ENDP
CODE ENDS
END
;
;
;
;
;
;
;
;
;
;
;