Keyboard Interfacing in 8085 - ComputerSC
Keyboard Interfacing in 8085 - ComputerSC
Keyboard Interfacing in 8085 - ComputerSC
THAKURPUKUR
KOLKATA-700063
NAAC ACCREDITED ‘A’ GRADE
Even there is a matrix size were to be 8 × 8, for a sum total of 64 keys, only one output port
and one input port would be sufficient. The processor sends logic 1 on row 0 by the other row
results in exit of logic 0 carried by the instructions
MVI A, 00000001B
OUT PC
Then the processor will start to read the input port. Presently, according to the given Byte
pattern, logic 1 is sent out only on row 0. But no key is pressed on this row. As such, the input
port receives the value 0000 from the keyboard because of the pull-down resistors as shown in
the circuit diagram. The reader might think about the key 9 that is pressed on row 2. But logic
0 is sent out presently on row 2. Hence only logic 0 is received on column 1 via the pressed
key. The processor compares the value that is read from the input port with 0000. If both are
same, it means that no key is pressed on row 0.
And in this way, all rows will get scanned one after another till the last row to detect the actual
key pressed. Thus the keyboard will get interfaced by the 8085 microprocessor.
It consists of three 8-bit bidirectional I/O ports i.e. PORT A, PORT B and PORT
C. We can assign different ports as input or output functions.
Block diagram –
It has two control groups, control group A and control group B. Control group A
consist of port A and port C upper. Control group B consists of port C lower and
port B.
Depending upon the value if CS’, A1 and A0 we can select
different ports in different modes as input-output function or BSR.
This is done by writing a suitable word in control register (control
word D0-D7).