Micro Question and Explaination Module
Micro Question and Explaination Module
UNIT I
THE 8085 AND 8086 MICROPROCESSORS
1. What is Microprocessor? Give the power supply & clock frequency of 8085
A microprocessor is a multipurpose, programmable logic device that reads binary instructions from a
storage device called memory accepts binary data as input and processes data according to those
instructions and provides result as output. The power supply of 8085 is +5V and clock frequency in
3MHz.
7. What is an Opcode?
The part of the instruction that specifies the operation to be performed is called the operation code or
opcode.
It is a status signal. It is used to differentiate between memory locations and I/O operations. When this
signal is low (IO/M = 0) it denotes the memory related operations. When this signal is high (IO/M = 1) it
denotes an I/O operation.
9. What is an Operand?
The data on which the operation is to be performed is called as an Operand.
10. How many operations are there in the instruction set of 8085 microprocessor?
There are 74 operations in the 8085 microprocessor.
11. List out the five categories of the 8085 instructions. Give examples of the instructions for each
group.
• Data transfer group – MOV, MVI, LXI.
• Arithmetic group – ADD, SUB, INR.
• Logical group –ANA, XRA, CMP.
• Branch group – JMP, JNZ, CALL.
• Stack I/O and Machine control group – PUSH, POP, IN, HLT.
12. Explain the difference between a JMP instruction and CALL instruction.
A JMP instruction permanently changes the program counter. A CALL instruction leaves information on
the stack so that the original program execution sequence can be resumed.
14. What is the difference between the shift and rotate instructions?
A rotate instruction is a closed loop instruction. That is, the data moved out at one end is put back in at
the other end. The shift instruction loses the data that is moved out of the last bit locations.
18. List the four instructions which control the interrupt structure of the 8085 microprocessor.
• DI (Disable Interrupts)
Microprocessor And Microcontroller
• EI (Enable Interrupts)
• RIM (Read Interrupt Masks)
• SIM (Set Interrupt Masks)
Interrupts Priority
TRAP 1
RST 7.5 2
RST 6.5 3
RST 5.5 4
INTR 5
24. What are operations performed on data in 8085 The various operations performed are
• Store 8-bit data
• Perform arithmetic and logical operations
• Test for conditions
• Sequence the execution of instructions
• Store data temporarily during execution in the defined R/W memory locations called the stack
ii. The control unit sends the control signal RD to enable the
memory chip
iii. The byte from the memory location is placed on the data busThe
byte is placed in the instruction decoder of the microprocessor
and the task is carried out according to the instruction
31. How many machine cycles does 8085 have, mention them
The 8085 have seven machine cycles. They are
• Opcode fetch
• Memory read
• Memory write
• I/O read
• I/O write
• Interrupt acknowledge
• Bus idle
HOLD indicates that a peripheral such as DMA controller is requesting the use of address bus, data bus
and control bus. READY is used to delay the microprocessor read or write cycles until a slow
responding peripheral is ready to send or accept data. SID is used to accept serial data bit by bit
33. Mention the categories of instruction and give two examples for each category The instructions of
8085 can be categorized into the following five
• Data transfer MOV Rd, Rs STA 16-bit
• Arithmetic ADD R DCR M
• Logical XRI 8-bit RAR
• Branching JNZ CALL 16-bit
• Machine control HLT NOP
35. Explain the different instruction formats with examples The instruction set is grouped into the
following formats
• One byte instruction MOV C, A
• Two byte instruction MVI A, 39H
• Three byte instruction JMP 2345H
36. What is the use of addressing modes, mention the different types
The various formats of specifying the operands are called addressing modes, it is used to access the
operands or data. The different types are as follows
• Immediate addressing
• Register addressing
• Direct addressing
• Indirect addressing
• Implicit addressing
44. How does the microprocessor differentiate between data and instruction?
When the first m/c code of an instruction is fetched and decoded in the instruction register, the
microprocessor recognizes the number of bytes required to fetch the entire instruction. For example
MVI A, Data, the second byte is always considered as data. If the data byte is omitted by mistake
whatever is in that memory location will be considered as data & the byte after the “data” will be treated
as the next instruction.
UNIT II
8086 SOFTWARE ASPECTS
1. What is assembler?
The assembler translates the assembly language program text which is given as input to the assembler
to their binary equivalents known as object code. The time required to translate the assembly code to
object code is called access time. The assembler checks for syntax errors & displays them before giving
the object code.
2. What is loader?
The loader copies the program into the computer’s main memory at load time and begins the program
execution at execution time.
3. What is linker?
A linker is a program used to join together several object files into one large object file. For large
programs it is more efficient to divide the large program modules into smaller modules. Each module is
individually written, tested & debugged. When all the modules work they are linked together to form a
large functioning program.
The ASSUME directive assigns a logical segment to a physical segment at any given time. It tells the
assembler what address will be in the segment registers at execution time. Example: ASSUME CS:
code, DS: data, SS: stack
A program may contain several segments of the same type. The GROUP directive collects them under
a single name so they can reside in a single segment, usually a data segment. The format is Name
GROUP Seg-name, Seg-name PTR is used to assign a specific type to a variable or a label. It is also
used to override the declared type of a variable.
link map which contains the address information about the link files. The linker does not assign absolute
addresses but only relative address starting from zero, so the programs are relocatable & can be put
anywhere in memory to be run.
CALL PRO1
PRO1 ENDP
CODE ENDS
Software interrupts
• Type 0-255
The code segment register gives the address of the current code segment. ie. It will points out here the
instructions, to be executed, are stored in the memory.
The data segment register points out where the operands are stored in the memory.
The stack segment registers points out the address of the current stack, which is used to store the
temporary results.
If the amount of data used is more the Extra segment register points out where the large amount of data
is stored in the memory.
28. What is the maximum memory size that can be addressed by 8086?
In 8086, an memory location is addressed by 20 bit address and the address bus is 20 bit address and
the address bus is 20 bits. So it can address up to one mega byte (2^20) of memory space.
30. What are the predefined interrupts in 8086? The various predefined interrupts are,
DIVISIONBY ZERO (type 0) Interrupt.
SINGLE STEP (type 1) Interrupt.
NONMASKABLE (type2) Interrupt.
BREAK POINT (type 3) Interrupt.
OVER FLOW (type 4) Interrupt.
31. What are the conditional and control flags available in status register of 8086?
Conditional Flags: CF
- Carry Flag
PF - Parity
Flag
AF - Auxiliary Carry Flag
ZF - Zero Flag SF - Sign Flag
Microprocessor And Microcontroller
OF - Overflow Flag
Control Flags:
TF – Single step Trap Flag
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
U U U U OF DF IF TF SF ZF U AF U PF U CF
33. List the various addressing modes present in 8086? There are 12 addressing modes present in
8086. They are,
(a) Register and immediate addressing modes
_ Register addressing modes
_ Immediate addressing
mode
(b) Memory addressing modes.
_ Direct addressing modes
_ Register indirect addressing modes
_ Based addressing modes
_ Indexed addressing modes
_ Based Indexed addressing modes
_ String addressing modes
(c) I/O addressing modes
_ Direct addressing mode
_ Indirect addressing mode
(d) Relative addressing mode
(e) Implied addressing mode
given of any other processors. After the use of the system bus again the LOCK signal is made high.
That means it is ready to give the system bus to any processor.
36. What are the functions of bus interface unit (BIU) in 8086?
(a) Fetch instructions from memory.
(b) Fetch data from memory and I/O ports.
(c) Write data to memory and I/O ports.
(d) To communicate with outside world.
(e) Provide external bus operations and bus control signals.
S4 S3
0 0 --I/O from extra segment
0 1 --I/O from Stack Segment
1 0 --I/O from Code segment
1 1 --I/O from Data segment
CLD – It resets the direction flag to 0 so that SI and/or DI can be incremented automatically after
execution of string instruction & does not affect other flags STI – Sets the interrupt flag to 1. Enables
INTR of 8086.
CLI – Resets the interrupt flagto0. 8086 will not respond to INTR.
UNIT III
MULTIPROCESSOR CONFIGURATIONS
6. What is Coprocessor?
The coprocessor is a processor which specially designed for processor to work under the control of the
processor and support special processing capabilities. Example : 8087 which has numeric processing
capability and works under 8086.
8. Draw the block diagram of communication between host CPU and IOP in closed coupled
configuration.
11. Write the advantages of loosely coupled system over tightly coupled systems?
1. More number of CPUs can be added in a loosely coupled system to improve the system
performance
2. The system structure is modular and hence easy to maintain and troubleshoot.
3. A fault in a single module does not lead to a complete system breakdown.
12. What are the schemes for establishing priority in order to resolve bus arbitration problem?
There are three basic bus access control and arbitration schemes
1. Daisy Chaining
2. Independent Request
Microprocessor And Microcontroller
3. Polling
17. What are the three memory reference options in 8087 instruction?
1. Not reference memory.
2. Load an operand word from memory into 8087.
3. Store an operand word from 8087 to memory.
S2 S1 S0 STATUS
0 X X unused
1 0 0 unused
1 0 1 READ memory
1 1 0 WRITE memory
1 1 1 Passive
UNIT IV
I/O INTERFACING
3. Out of 8-bit port C, PC0-PC2 is used to generate control signals for port B and PC3=PC5 are used
to generate control signals for port A. The lines PC6, PC7 may be used as independent data lines.
4. What are the signals used in input control signal & output control signal?
Input control signal
STB (Strobe
input)
IBF (Input buffer full)
INTR (Interrupt request)
Output control signal
OBF (Output buffer full)
ACK (Acknowledge input)
INTR (Interrupt request)
7. What are the different types of write operations used in 8253? There are two types of write
operations in 8253
1. Writing a control word register
2. Writing a count value into a count register
The control word register accepts data from the data buffer and initializes the counters, as required. The
control word register contents are used for
(a) Initializing the operating modes (mode 0-mode4)
(b) Selection of counters (counter 0- counter 2)
(c) Choosing binary /BCD counters
(d) Loading of the counter registers.
The mode control register is a write only register and the CPU cannot read its contents.
Microprocessor And Microcontroller
8. Give the different types of command words used in 8259a? The command words of 8259A are
classified in two groups
1. Initialization command words (ICWs)
2. Operation command words (OCWs)
9. Give the operating modes of 8259a?
(a) Fully Nested Mode
(b) End of Interrupt (EOI)
(c) Automatic Rotation
(d) Automatic EOI Mode
(e) Specific Rotation
(f) Special Mask Mode
(g) Edge and level Triggered Mode
(h) Reading 8259 Status
(i) Poll command
(j) Special Fully Nested Mode
(k) Buffered mode
(l) Cascade mode
In the left entry mode, the data is entered from the left side of the display unit. 2.
Right Entry Mode
In the right entry mode, the first entry to be displayed is entered on the rightmost display.
16. What are the different types of methods used for data transmission?
The data transmission between two points involves unidirectional or bi-directional transmission of
meaningful digital data through a medium. There are basically there modes of data transmission
(a) Simplex
(b) Duplex
(c) Half Duplex
In simplex mode, data is transmitted only in one direction over a single communication channel.
For example, a computer (CPU) may transmit data for a CRT display unit in this mode.
In duplex mode, data may be transferred between two transceivers in both directions simultaneously.
In half duplex mode, on the other hand, data transmission may take pace in either direction, but at a
time data may be transmitted only in one direction. For example, a computer may communicate with a
terminal in this mode. When the terminal sends data (i.e. terminal is sender). The message is received
by the computer (i.e the computer is receiver). However, it is not possible to transmit data from the
computer to terminal and from terminal to the computer simultaneously.
20. What are the functional types used in control words of 8251a?
The control words of 8251A are divided into two functional types.
Microprocessor And Microcontroller
28. What is the purpose of control word written to control register in 8255?
The control words written to control register specify an I/O function for each I.O port. The bit D7 of the
control word determines either the I/O function of the BSR function.
UNIT V MICROCONTROLLERS
• Register indirect
• Immediate
• Register specific
• index
5. State the function of RS1 and RS0 bits in the flag register of Intel 8051 microcontroller?
RS1 RS0 Bank Selection
0 0 Bank 0
0 1 Bank 1
1 0 Bank 2
1 1 Bank 3
RS, RS0 – Register bank select bits
6. Write a program using 8051 assembly language to change the date 55H stored in the lower byte of
the data pointer register to AAH using rotate instruction. MOV DPL, #55H
MOV A, DPL
RL A
Label: SJMP label
8. Specify the single instruction, which clears the most significant bit of B register of 8051, without
affecting the remaining bits.
Single instruction, which clears the most significant bit of B register of 8051, without affecting the
remaining bit is CLR B.7.
PSEN: PSEN stands for program store enable. In 8051 based system in which an external ROM holds
the program code, this pin is connected to the OE pin of the ROM.
2 It has many instructions to move data between It has one or two bit handling instructions. It has
memory and CPU. It has one or two instructions many bit handling instructions.
to move data between memory and CPU.
3 Access times for memory and I/O devices are Less access time for built-in memory and I/O
more. devices.
4 Microprocessor based system requires Microcontroller based system requires less
more hardware. hardware reducing PCB size and increasing the
reliability.
16. Name the five interrupt sources of 8051? The interrupts are:
Vector address
• External interrupt 0: IE0: 0003H
• Timer interrupt 0: TF0: 000BH
• External interrupt 1: IE1: 0013H
• Timer Interrupt 1: TF1: 001BH
• Serial Interrupt
Receive interrupt: RI: 0023H
Transmit interrupt: TI: 0023H
17. Explain the contents of the accumulator after the execution of the following program segments:
MOV A, #3CH
MOV R4, #66H
ANL A, R4
A = 3C
R4 =
66
A =
24
18. Write a program to load accumulator A, DPH and DPL with 30H.
MOV A, #30
MOV DPH, A
MOV DPL, A
19. Write a program to subtract the contents of R1 of Bank0 from the contents of R0 of Bank2.
MOV PSW, #10
MOV A, R0
MOV PSW, #00
Microprocessor And Microcontroller
SUBB A, R1
20. How the RS -232C serial bus is interfaced to 1TL logic device?
The RS-232C signal voltage levels are not compatible with TTL logic levels. Hence for interfacing TTL
devices to RS-232C serial bus, level converters are used. The popularly used level converters are MC
1488 & MC 1489 or MAX 232.
21. List some of the features of 8096 microcontroller.
a) The 8096 is a 16-bit microcontroller.
b) The 8096 is designed to use in applications which require high speed calculations and fast
I/O operations.
c) The high speed I/O section of an 8096 includes a 16-bit timer, a 16-bit counter, a 4 input
programmable edge detector, 4 software timers and a 6-output programmable event
generator.
d) It has 100 instructions, which can operate on bit, byte, word, and double words.
e) The bit operations are possible and these can be performed on any bit in the register
file or in the special function register.
24. List the 8051 instructions that affect the overflow flag.
ADD, ADDC, DIV, MUL, SUBB
25. List the 8051 instructions that always clear the carry flag. CLR C, DIV, MUL
26. List the 8051 instructions that affect all the flags.
ADD, ADDC and SUBB