MPMC Unit-3 Material
MPMC Unit-3 Material
MPMC Unit-3 Material
• n = log2N, where N is the number of locations that could be addresses in that chip and n is
no.of address lines we need to use.
2n=N
• For 1K chip n would be 10
• Available memory is 2K*8 means 8 bit data line and address line, 2K=21×210=211
A1 A0 SELECTION
0 0 PORT A
0 1 PORT B
1 0 PORT C
CONTROL
1 1
REGISTER
• (RESET) : It is an active high signal that shows the resetting of the PPI. A
high signal at this pin clears the control registers and the ports are set in
the input mode.
Group A & Group B Ports
• It has Three ports Port A, Port B and Port C and as each port has 8
lines.
• Two Groups: 12-bits each
Group A - Port A and Port C Upper (i.e., PC7 – PC4)
Group A - Port A and Port C Lower (i.e., PC3 – PC0)
• Port A – 8-bit buffered I/O Latch and can be programmed by mode0,mode1 &
mode 2
• Port B – 8-bit buffered I/O Latch and can be programmed by mode 0 and
mode 1
• Port C – 8-bit unlatched buffered I/O ,split into 2 parts and programmed by
bit set/ reset mode
Pin diagram of 8255
1 0 0 0 0 0 0 0
CWR=1000 0000 = 80H
PORT-A as OUTPUT PORT
MOV AL,80H
MOV DX,ADD-CWR
MOV DX,AL
2. Half Duplex
The half duplex transmission allows the data transfer in
both directions, but not simultaneously. A typical
example is a walkie-talkie.
3. Full Duplex
The full duplex transmission allows the data transfer in
both direction simultaneously. The typical example is
transmission through telephone lines.
INTEL 8251 USART ARCHITECTURE AND INTERFACING
8251 Universal Synchronous and Asynchronous Receiver Transmitter (USART)
or Programmable Communication Interface (PCI) acts as a mediator between
microprocessor and peripheral to transmit serial data into parallel form and
vice versa.
1.It takes data serially from peripheral (outside devices) and converts into
parallel data.
2.After converting the data into parallel form, it transmits it to the CPU.
3.Similarly, it receives parallel data from microprocessor and converts it into
serial form.
4.After converting data into serial form, it transmits it to outside device
(peripheral).
5.Also, it allows both synchronous and asynchronous transmission and
reception thus is called so.
USART 8251 ARCHITECTURE
USART 8251 Pin Diagram
There are 5-BLOCKS IN 8251:
1. Data bus buffer
2. Read/Write control logic
3. Modem control (modulator/demodulator)
4. Transmitter section
1. Transmit buffer
2. Transmit control
5. Receiver section
1. Receive buffer
2. Receive control
1.Data bus buffer –
This block helps in interfacing the internal data bus of 8251 to the system data bus.
• The data bus buffer has 8-bit bidirectional data bus that allows the transfer of
data bytes, status or command word between the processor and external
devices.
2. Read/Write control logic –
It is a control block for overall device. It controls the overall working by selecting
the operation to be done.
• CS: It is chip select. A low signal at this pin shows that processor has selected
8251 in order to communicate with the peripheral devices.
• C/D: As the system has control, status and data register. So, when a high signal is
present at this pin then control or status register is addressed. While in case of
low signal data register is addressed.
• RD and WR: Both read and write are active low signal pins. A low signal at RD
shows that the processor is reading the control, status or data bytes from the
8251. While at WR indicates the write operation over the data bus of 8251.
• CLK and RESET: CLK stands for clock and it produces the internal timing for the
device. While an active high signal at the RESET pin puts the 8251 in the idle
mode.
3.Modem control (modulator/demodulator) –
A device converts analog signals to digital signals and vice-versa and helps
the computers to communicate over telephone lines or cable wires. The
following are active-low pins of Modem.
1. DSR: Data Set Ready signal is an input signal.
3. CTS: Clear to send- It is an input signal which controls the data transmit circuit.
4. RTS: Ready to send- It is an output signal which is used to set the status RTS.
4. Transmitter Section
It has 2 blocks.
a. Transmit buffer –
This block is used for parallel to serial converter that receives a parallel
byte for conversion into serial signal and further transmission onto the
common channel.
1. TXD: It is an output signal, if its value is one, means transmitter will transmit
the data.
b. Transmit control –
This block is used to control the data transmission with the help of
following pins:
1. TXRDY: It means transmitter is ready to transmit data character.
2. TXEMPTY: An output signal which indicates that TXEMPTY pin has
transmitted all the data characters and transmitter is empty now.
3. TXC: An active-low input pin which controls the data transmission rate of
transmitted data.
5.Receiver Section:
It has 2 blocks.
a. Receive buffer –
This block acts as a buffer for the received data.
1. RXD: An input signal which receives the data.
b. Receive control –
This block controls the receiving data.
1. RXRDY: An input signal indicates that it is ready to receive the data.
2. RXC: An active-low input signal which controls the data transmission rate of
received data.
3. SYNDET/BD: An input or output terminal. External synchronous mode-input
terminal and asynchronous mode-output terminal.
Control Word of 8251:
The Control Word of 8251 defines the complete functional definition of
8251 Block Diagram in Microprocessor and they must be loaded before
any transmission or reception. The control words of Block Diagram of
8251 Microcontroller are split into two formats
1.Mode instruction
2.Command instruction
Mode Instruction : Fig. shows the mode instruction format of 8251.
Command Instruction:
After the mode instruction, command character should be issued to the USART. It controls the
operation of the USART within the basic frame work established by the mode instruction. Fig. shows
command instruction format.
8251A Status Word:
In the data communication systems it is often
necessary to examine the “status” of the
transmitter and receiver. It is also necessary for
CPU to know if any error has occurred during
communication. The 8251 Block Diagram in
Microprocessor allow the programmer to read
above mentioned information from the status
register any time during the functional
operation. Fig. shows the format of status
register.
Interfacing 8251A to 8086 in I/O
Mapped I/O Mode:
Fig. 14.46 shows the interfacing of 8251
with 8086 in I/O mapped I/O technique.
Here, RD and WR signals are activated
when M/IO signal is low, indicating I/O
bus cycle. Only lower data bus (D0 – D7)
is used as 8251 is 8-bit device. Reset out
signal from clock generator is connected
to the reset signal of the 8251.
Interfacing 8251 to 8086 in Memory Mapped I/O:
In this type of I/O interfacing, the 8086 uses 20
address lines to identify an I/O device; an I/O device
is connected as if it is a memory register. The 8086
uses same control signals and instructions to access
I/O as those of memory. Fig. 14.47 shows the
interfacing of 8251 with 8086 in memory mapped
I/O technique. Here, RD and WR signals are
activated when M/IO signal is high, indicating
memory bus cycle. Address line A1 is used to select
either data register, or control register. The
remaining address lines A2-A19 are used to decoder
the addresses for 8251.
MODES OF DATA TRANSFER:
• We store the binary information received through an external device in the
memory unit.
• The information transferred from the CPU to external devices originates
from the memory unit.
• Although the CPU processes the data, the target and source are always the
memory unit.
We can transfer this information using three different modes of transfer.
1.Programmed I/O
2.Interrupt- initiated I/O
3.Direct memory access( DMA)
8259-Programmable Interrupt Controller (PIC)
The 8259 is known as the Programmable Interrupt Controller (PIC) microprocessor. In 8085 and
8086 there are five hardware interrupts and two hardware interrupts respectively. By adding
8259, we can increase the interrupt handling capability. This chip combines the multi-interrupt
input source to single interrupt output. This provides 8-interrupts from IR0 to IR7.
Need for 8259-PIC
8259- PIC Architecture
8259 Pin diagram
• The Fig. shows the connection
between 8085/8086 and 8259A.
• The 8259A is a commonly used
priority interrupt controller, which is
specifically designed for use with
interrupt signals INTR and INTA of
Intel series.
• It is packaged in a 28 pin DIP. It uses
NMOS technology and requires a
single + 5V supply.
10 M Questions
1. With neat functional block diagram, explain the 8255 programmable peripheral interface and its operating
modes?
2. Draw and discuss the internal architecture of USART 8251.
3. Explain the operation of 8259 Programmable Interface Controller with a neat diagram.
4. (a) Explain different types of semiconductor memories.
(b) Interface two 4K×8 EPROMS and two4K×8 RAM chips with 8086.
5. With a neat diagram, explain in detail about DMA controller.
6. (a) With neat block diagram explain ADC interfacing with 8086.
(b) With neat block diagram explain DAC interfacing with 8086.
7.