Assignment 2
Assignment 2
Q1. Explain the 8279 block diagram,pin diagram and how it work .
Ans- 8279 Block Diagram consists of four main sections-
1.CPU Interface and Control Section:This section consists of data buffers, I/O
control, control and timing registers, and timing and control logic.
Data Buffers:The data buffers are 8-bit bi-directional buffers that connect the
internal data bus to the external data bus.
I/O Control: The I/O control section uses the A 0, CS, RD and WR signals to control
data flow to and from the various internal registers and buffers.
Control and Timing Registers:The control and timing registers store the keyboard
and display modes and other operating conditions programmed by the CPU. The
modes are programmed by sending the proper command on the data lines with A 0 =
1.
Timing Control: The timing control consists of the basic timing counter chain. The
first counter is divided by N prescaler that can be programmed to give an internal
frequency of 100 kHz.
2. Scan Section (Scan counter):The scan section has a scan counter which has two
modes : Encoded mode and decoded mode.
Encoded Mode:In the encoded mode, the scan counter provides a binary count from
0000 to 1111 on the four scan lines (SC3 — SC0) with active high outputs. This
binary count must be externally decoded to provide 16 scan lines.
Decoded Mode:In the decoded mode, the internal decoder decodes the least
significant 2 bits of binary count and provides four possible combinations on the scan
lines (SC3 — SC0) :1110, 1101, 1011 and 0111. Thus the output of decoded scan is
active low.
Return buffers:The 8 return lines (RL7 — RL0) are buffered and latched by the
return buffers during each row scan in scanned keyboard or sensor matrix imode In
strobed input mode, the contents of the return lines are transferred to the FIFO RAM
on the rising edge of the CNTL/STB line pulse.
FIFO/sensor RAM status:FIFO RAM status keeps track of the number of characters
in the FIFO and whether it is full or empty.
Display RAM:It is 16 x 8 RAM, which stores the display codes for 16 digits. It can
be accessed directly by CPU. In decoded mode, 8279 uses only first four locations of
display RAM. In encoded mode, Block Diagram of 8279 uses first eight locations.
Display address registers:The display address registers hold the address of the byte
currently being written or read by the CPU and scan count value.
Pin diagram of 8279:
How it work:The Intel 8279 is a programmable keyboard and display interface chip.
It is commonly used in microprocessor-based systems to interface with keyboards,
displays, and other input/output devices. The 8279 performs the following functions:
1. Keyboard Interface:
• The 8279 can be used to interface with a variety of display devices, such
as 7-segment displays or LED displays.
• It can drive up to 16 display patterns with a maximum of 16 characters
each.
• The chip provides multiplexing capabilities for driving multiple displays.
3. Modes of Operation:
• Data and commands are exchanged between the microprocessor and the
8279 through data and command registers.
• The microprocessor sends control words to configure the 8279 and read
status information.
• The chip sends data, such as key codes or display information, to the
microprocessor.
Q2. Explain the 8259 block diagram,pin diagram and how it work .
Ans-
It includes eight blocks : data bus buffer, read/write logic, control logic, three
registers (IRR, ISR and IMR), priority resolver, and cascade buffer.
Data Bus Buffer:The data bus buffer allows the 8085 to send control words to the
8259A and read a status word from the 8259 Block Diagram. The 8-bit data bus
buffer also allows the 8259A to send interrupt opcode and address of the interrupt
service subroutine to the 8085.
Read/Write Logic:The RD and WR inputs control the data flow on the data bus
when the device is selected by asserting its chip select (CS) input low.
Control Logic:This block has an input and an output line. If the 8259A is properly
enabled, the interrupt request will cause the 8259A to assert its INT output pin high.
Interrupt Request Register (IRR): It stores those bits which are requested for
their interrupt services.
Interrupt Service Register (ISR): It stores the interrupt levels which is currently
being served.
Interrupt Mask Register (IMR): It stores interrupt levels that have to be masked.
These interrupt levels are already accepted by the 8259 microprocessor.
Priority Resolver (PR): It examines all the 3 registers and sets the priority of
interrupts and sets the interrupt levels in ISR which has the highest priority and the
rest of the interrupt bit is IRR which is already accepted.
SP/EN (low active pin): If its value is 1 it works in master mode & if its value is 0
then it works in slave mode.
How it work: The Intel 8259 is a Programmable Interrupt Controller (PIC)
commonly used in microprocessor-based systems to manage and prioritize interrupts
from various sources. Here is an overview of how the 8259 works:
1. Interrupt Handling:
• The 8259 can be cascaded to handle more than eight interrupt sources. In
a cascaded configuration, one 8259 is designated as the master, and
additional 8259s are set as slaves.
• This allows the system to handle more than eight interrupt sources by
chaining multiple 8259s together.
3. Priority Resolution:
• The 8259 is connected to the CPU via IRQ lines, and each device that
can generate interrupts is connected to a specific IRQ line.
10.Priority Rotation:
• The 8259 can be configured to rotate priority levels, ensuring that lower-
priority interrupts get a chance to be serviced.
Q3. Explain the 8257 block diagram,pin diagram and how it work .
Ans- The Intel 8257 is DMA (Direct Memory Access) controller. The 8257 is
designed to facilitate the transfer of data between external devices and memory
without involving the microprocessor in each data transfer.
Here's an overview of how the Intel 8257 DMA controller works:
1. Functionality:
• The primary purpose of the 8257 is to offload the data transfer tasks
from the microprocessor to enhance overall system efficiency.
• It is commonly used to transfer blocks of data between memory and
various peripherals, such as I/O devices.
2. Channels:
• The 8257 typically has multiple channels (four channels in the case of
the Intel 8257).
• Each channel can operate independently, allowing simultaneous data
transfers between different devices and memory.
3. Control Registers:
• The DMA controller is configured and controlled through a set of control
registers.
• These registers include the base address register, word count register,
mode register, and command register, among others.
4. Modes of Operation: