Dec 13
Dec 13
Note: Attempt five questions in total selecting one question from each of the four Units.
Question No.1 is compulsory.
Q.1.(i) Why AD0 – AD7 lines multiplexed in 8085. (4)
Ans. These are input/output, tristate signals having two set of signals. They are address
and data. The lower order 8 bits, of 16 bit address is multiplexed or time shared with data bus.
They are demultiplexed with the help of ALE signal. During the earlier part it is used as lower
order address and in later part it is used as data bus. The address and data buses are multiplexed
to reduce the number of pins of the chip.
Section-A
Q.2.(i) Explain Pin diagram of 8085 microprocessor. (10)
Ans. Refer Q.2.(a) of paper Dec 2014.
(LC or RC circuit) to determine the clock frequency, so that other timing and control signals are
developed. The speed of microprocessor is directly proportional to the speed of the crystal. The
clock speed and access time must be compatible for maximum performance. To implement this
it uses different status and control signals.
Control and status signals :
(a) ALE (Address Latch Enable) : We
know that AD0 to AD7 lines are multiplexed and
the lower half of the address is also necesarry
during T 2 and T3 of machine cycle to access
specific location in memory or I/O port. This
means that the lower half of an address must
be latched in T1 of the machine cycle, so that it
is available throughout the machine cycle. The
latching of lower half of an address is done by
external latch and ALE signal from 8085.
(b) RD and WR : These signals are
basically used to control the direction of the
direction of the data flow between processor Fig. : Control section of microprocessor
and memory or I/O device/port. A low on RD
indicates that the data must be read from the selected memory location or I/O port via data bus.
A low on WR indicates that the data must be written into the selected memory location or I/O
port via data bus.
(c) IO/ M , S0 and S1 : IO/ M indicates whether I/O operation or memory operation is
being carried out. S1 and S0 indicate the type of machine cycle in progress.
(d) Ready : It is used by the microprocessor to sense whether a peripheral is ready or
not for data transfer. If not, the processor waits. It is thus used to synchronize slower peripherals
to the microprocessor. If peripherals are fast enough it is tied to VCC. If it is left open, 8085 enters
in the wait state.
Section-B
Q.4.(i) Explain various addressing modes of 8086 microprocessor. (10)
Ans. Refer Q.4.(a) of paper Dec 2012.
Q.4.(ii) If the first instruction of a program is to be fetched from 12340H. What
should the value of CS register be ? The sixth instruction to be fetched is at memory
location 1234FH. What should be the value of Ip register ? (10)
(Hint : Assume Ip to be 000H for first part)
Ans. Value of code segment (CS) register be 1234 H.
Value of instruction pointer (IP) will be 000F H.
Q.5.(i) Explain the block diagram of 8086 microprocessor. (10)
Ans. Block Diagram of 8086 : The block diagram of 8086 microprocessor is shown in
figure. As shown in block diagram, the 8086 is divided into two independent functional units. The
Bus interface Unit (BIU) and the Execution.
(i) The Bus Interface Unit : The Bus Interface unit fetches instructions from memory,
reads data from ports and memory and writes data to ports and memory. It handles all transfers
of data and addresses on the buses for the execution unit. The Bus interface Unit consists of the
following :
(a) Instruction Queue (b) Segment Registers (c) Instruction Pointer
(a) Instruction Queue : The instruction queue is a first-in-first-out group of registers.
To speed up program execution, the Bus Interface Unit fetches as many as six instruction bytes
66 Microprocessing & Interfacing
are held for the Execution Unit in a Instruction Queue. The BIU can be fetching instruction
bytes while the Execution Unit (EU) is decoding the instruction or executing an instruction which
does not require use of the buses. When the Execution Unit is ready for its next instruction, it
simply reads the instruction from the Instruction Queue in the BIU. This scheme is much faster
than sending out an address to memory and then waiting for memory to send sack the next
instruction byte. The prefetch instruction and queue scheme greatly speeds up processing. The
arrangement of fetching the next instruction while the current instruction executes is called pipe
lining.
contains the address value which is an offset, because this value must be added to the segment
base address contained in CS register to produce the required 20 bit physical address.
(ii) The Execution Unit : The execution unit of 8086 performs the following major
operations :
– It tells the BIU, from where to fetch instructions or data.
– It decodes and executes instructions.
To perform the above operations, the execution unit consists of the following sections :
(a) Instruction Decoder, ALU and control circuitry.
(b) Flag Register
(c) General Purpose Registers
(d) Stack Pointer Register
(e) Other Pointer and Index Registers
(a) Instruction decoder, ALU and control circuitry : The instruction decoder in the
EU translate instructions fetched from memory into a series of actions which are further carried
out. The Airthmetic and Logic Unit (ALU) of 8086 is of 16 bits which can add, subtract, AND,
OR, XOR, increment, decrement, complement or shift the binary numbers. All internal operations
of EU are controlled by control circuitry.
(b) Flag register : 8086 microprocessor contains one 16 bit flag register (status register).
A flag register is a flip flop which indicates the status of some conditions produced by the
execution of an instruction or controls certain operations of the Execution Unit. In a 16 bit flag
register, there are nine active flags. Six of the nine flag bits are used to indicate some conditions
produced by an instructions. These six flags are called status flag (conditional flags). The remaining
three flag bits in the flag register are used to control certain operations of the processor and are
called control flags.
(c) General purpose registers : The execution unit 8086 contains eight general purpose
registers labelled as AH, AL, BH, BL, CH, CL, DH and DL in the fig. below.
Section-C
Q.6.(i) Explain directives used in assembly language program ? Why are segment
directives used. (10)
Ans. Directives used in assembly language program are as follows :
Directive Action
ALIGN aligns next variable or instruction to byte which is multiple of operand.
ASSUME selects segment register(s) to be the default for all symbol in segment(s)
COMMENT indicates a comment
DB allocates and optionally intializes bytes of storage
DW allocates and optionally intializes doublewords of storage
DD allocates and optionally initializes doublewords of storage
DQ allocates and optionally initializes quadwords of storage
DT allocates and optionally initializes 10-byte long storage units
END terminates assembly; optionally indicates program entry point
ENDM terminates a macro defination
ENDP marks end of procedure definition
ENDS marks end of segment or structure
EQU assigns expression to name
EVEN aligns next variable or instruction to even byte
ESITM terminates macro expansion
EXTRN indicates externally defined symbols
LABEL creates a new label with specified type and current location counter
LOCAL declares local variables in macro definition
MACRO starts macro definition
MODEL specifies mode for asssembling the program
ORG sets location counter to argument
PAGE sets length and width of program listing; generates page break
PROG starts procedure definition
PTR assigns a specific type to a variable or to a label
PUBLIC identifies symbols to be visible outside module
TITLE defines the program listing title
SEGMENT directive : An assembly program in .EXE format consists of one or more
segments. The art of these segment are defined by SEGMENT directive and the ENDS statement
indicates the end of the segment.
Format : name SEGMENT [options] ; Begin segment
. .
name ENDS ; End segment
Example : CODE SEGMENT End segement
.
.
CODE ENDS
B.Tech., 5th Semester, Solved papers, Dec 2013 69
Operation (i) The HLT instruction will cause the 8086 to stop fetching and
executing instructions. The 8086 enters into a half state. To
come out of the halt state, there are 3 ways given below.
(a) Interrupt signal on INTR pin, (b) Interrupt signal on NMI pin
(c) Reset signal on reset pin.
(ii) It may be used as an alternative to an endless software loop in
situations where a program must wait for an interrupt.
Section-D
Q.8.(i) Explain Pin diagram of 8237 DMA controller. (10)
Ans. Refer Q.9.(a) of paper Dec 2014.
Q.8.(ii) Explain BSR and I/O modes of 8255 PPI chip. (10)
Ans. BSR Mode : The BSR mode is a port C bit set/reset mode. The individual bit of
port C can be set or reset by writing control word in the control register. The control word format
of BSR mode is shown in fig.
The pin of port C is selected using bit select bits [b b b] and set or reset is decided by bit
S/R. The BSR mode affects only one bit of port C at a time. The bit set using BSR mode remains
set unless and until you change the bit. So to set any bit of port C, bit pattern is loaded in control
register. If a BSR mode is selected it will not affect I/O mode.
B.Tech., 5th Semester, Solved papers, Dec 2013 71
Priority resolver : It determines the priorities of the bit set in the IRR. To make
decision, the priority resolver looks at the ISR. If the higher priority bit in the InSR is set then it
ignores the new request. If the priority resolvers finds that the new interrupt has a higher priority
than the highest priority interrupt currently being serviced and the new interrupt is not in service,
then it will set appropriate bit in the InSR and send the INT signal to the microprocessor for new
interrupt request.
Ans. (ii) 8259-A Programmable interrupt controller : Refer Q.2.(a) of paper Dec
2012.
– Electrical characteristics : The access time of the 8254 is 200ns where as the
access time of the 8254-2 is 175ns. The GATE and CLK inputs present 10 A load and OUT
output can source 400 A in the high state and sink 2 mA in the low state.
– Data bus buffer : The 8-bit tri-state data buffer has 3-basic functions :
(a) Programming different modes of the 8253/8254,
(b) Loading the count register, and
(c) Reading the count value.
– Read/write control logic : The 8253/8254 has 5-signals, namely, CS , A0, A1, RD ,
WR . The functions of these control signals are :
(a) RD (Read Bar) : A low on this pin informs the 8253/8254 that the P is ready to
accept data in the form count value.
(b) WR (Write Bar) : A low on this pin informs the 8253/8254 that the P is ready to
output data in the form of mode informations or data.
Hence, in the isolated I/O mode, RD and WR are directly connected to IOR and
IOW . On the other hand, in the memory mapped I/O, RD and WR are connected to MEMR
and MEMW respectively..
(c) CS (Chip select Bar) : The 8253/8254 is selected only when a low (0) is applied at
this terminal. No reading or writing operations will be performed by or on the 8253/8254 unless
this chip is selected. The CS = 1 does effect the operation of the counters.
(d) A1 A0 (Address Pin) : These lines (A1 A0) are connected to the address bus. The
function of A1 and A0 are to select any one of the three counters and the control word register of
8253/8254 is indicated in below table :
Table : Selection of counter and CWR
A1 A0 Selection of counter
0 0 Counter-0 Selected
0 1 Counter-1 Selected
1 0 Counter-2 Selected
1 1 Control word register selected (CWR)
– Control word Register : As indicated in above table, the control word register is
selected only when A1A0 = 11. It is loaded with the formation of the control word to indicate
which particular counter is to be used in which mode and whether READ and WRITE operation
is to be performed.