0% found this document useful (0 votes)
33 views5 pages

Keyboard and Led by Diagram in Image

The document discusses interfacing a keyboard and a seven-segment LED display with the 8086 microprocessor using the 8255 PPI. It details the components involved, the working principles of each interfacing method, and the advantages of using this setup for input and display applications. Key processes include scanning for key presses in the keyboard matrix and sending binary data to control the LED segments.

Uploaded by

ssppace002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views5 pages

Keyboard and Led by Diagram in Image

The document discusses interfacing a keyboard and a seven-segment LED display with the 8086 microprocessor using the 8255 PPI. It details the components involved, the working principles of each interfacing method, and the advantages of using this setup for input and display applications. Key processes include scanning for key presses in the keyboard matrix and sending binary data to control the LED segments.

Uploaded by

ssppace002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1) Keyboard Interfacing with 8086 using 8255 PPI

Diagram Reference: Figure 7.44

Introduction:

The keyboard is an input device commonly used to feed alphanumeric data into a microprocessor
system. When interfacing with an 8086 microprocessor, the 8255 Programmable Peripheral Interface
(PPI) is used as an interface medium between the keyboard matrix and the microprocessor.

Components Involved:

• 8086 Microprocessor

• 8255 PPI (Programmable Peripheral Interface)

• Matrix Keyboard

• Address bus, Data bus, Control signals (RD, WR, CS)

Matrix Keyboard Layout:

• The keyboard consists of keys arranged in rows and columns (e.g., 4x4, 8x8).

• Each key lies at the intersection of a specific row and column.

• When a key is pressed, the row and column are shorted, allowing current to flow and
enabling detection.

8255 Port Allocation:

• Port A: Used for reading column lines (input).

• Port B: Used for sending signals to row lines (output).

• Port C: Can be used for control or left unused depending on the requirement.
Working Principle:

1. Initialization:

o The 8255 is configured via the control word register.

o Port A is set as input to read columns.

o Port B is set as output to drive rows.

2. Scanning Process:

o The microprocessor sets one row line low at a time through Port B.

o All other row lines are kept high.

o It then reads the column lines using Port A.

3. Key Detection:

o If a key in the selected row is pressed, the corresponding column line reads LOW
(since it's shorted to the low row).

o The 8086 detects which key is pressed by identifying the active row and column.

4. Debouncing:

o When a key is pressed, mechanical bouncing can produce multiple signals.

o Software or hardware debouncing techniques are used to ensure a single signal is


registered.

5. Key Code Generation:

o Based on the active row and column, a unique scan code is generated.

o This scan code is used to determine which character or key was pressed.

Applications:

• Keypad inputs in calculators, ATMs, embedded systems, etc.

• Control systems requiring user input.

Advantages:

• Easy to expand matrix (e.g., 4x4, 8x8).

• Simple scanning algorithm.

• Efficient use of limited I/O ports.

2) Seven-Segment LED Display Interfacing with 8086 using 8255 PPI

Diagram Reference: Figure 7.45


Introduction:

Seven-segment displays are used to show numeric data in many embedded applications. Interfacing
it with the 8086 microprocessor requires a technique to send binary data representing numbers to
the display. The 8255 PPI acts as the interface unit here.

Components Involved:

• 8086 Microprocessor

• 8255 PPI

• Four 7-segment displays

• Shift Registers (74164)

• Decoder and Control Signals

Seven-Segment Display Basics:

• Each digit has 7 LEDs (a to g) + an optional dot (h).

• By turning ON/OFF specific LEDs, digits from 0 to 9 and letters can be displayed.

• Common-anode or common-cathode configurations are used.

8255 Port Allocation:

• Port A: Not used directly here.

• Port C: Used to send serial data to the shift registers.

• Port B: Used to control other signals like clock or latch.

Role of Shift Registers (74164):

• Used to convert serial data from Port C into parallel output.

• Each 74164 shift register controls one 7-segment display.

• Chained together to support multiple displays.

Working Process:

1. Initialization:

o 8255 is configured via the control word.

o Port C is set to output serial data.

o Shift registers are reset.

2. Sending Data:
o The microprocessor sends 8-bit data to the first 74164 shift register via Port C.

o Clock pulses (from Port B or external) are used to shift data into the register.

o Each bit corresponds to segment activation (a to h).

3. Display Enable:

o Once all bits are loaded, a latch signal locks the data.

o The respective 7-segment displays show the digits.

4. Multiplexing (optional):

o If more than one display is used, they are activated one at a time rapidly.

o This gives an illusion that all displays are working simultaneously.

Digit Code Representation:

For example, to display ‘3’:

• Segments a, b, c, d, g are ON.

• Binary: 0b1111001 (depending on configuration)

Applications:

• Digital clocks, calculators, counters.

• Microprocessor kits for display output.

Advantages:

• Reduced number of microprocessor pins using shift registers.

• Simple interface using standard ICs (74164, 8255).

• Efficient for numeric display outputs.

Would you like both topics as a printable PDF or with labeled diagrams for submission?

You said:

Give the working principle of both in paragraph or in short points without sub headings

ChatGPT said:

Working Principle – Keyboard Interfacing with 8086 using 8255 PPI:


The keyboard is organized in a matrix format where rows and columns intersect at keys. The 8255 PPI
is used to interface this matrix with the 8086 microprocessor. Port B is configured as output to send
signals to rows, while Port A is set as input to read columns. The microprocessor activates one row at
a time by sending a low signal and reads the column lines through Port A. If a key in the active row is
pressed, the corresponding column line goes low, allowing the processor to identify the key based on
the row and column index. This scanning is done continuously to detect keypresses. Debouncing is
implemented to avoid multiple detections for a single keypress. The key location is then mapped to a
specific ASCII or scan code for processing.

Working Principle – LED Interfacing with 8086 using 8255 PPI:


In this setup, the 8255 PPI interfaces the 8086 microprocessor with multiple 7-segment LED displays
using shift registers like 74164. The 7-segment LEDs are controlled using binary data, where each bit
turns ON or OFF a specific segment (a to g, h). The 8255’s Port C outputs serial data corresponding to
the digit, which is then clocked into the shift registers using control signals. These shift registers
convert the serial data into parallel signals to drive the LED segments. After loading the data, a latch
or enable pulse ensures the data is displayed. For multiple digits, multiplexing is used to show each
digit sequentially at high speed, creating the illusion of a steady multi-digit display.

You might also like