Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
177 views

Microprocessor Microcontroller

This document contains 30 questions and answers about microprocessors and microcontrollers. It covers topics like the functions of various components like the program counter, accumulator, status pins. It also discusses interrupt signals, instruction cycles, assemblers, linkers, assembly vs high-level languages, arithmetic instructions, and more. The questions are answered concisely with 1-2 sentences per answer providing the key details about each topic.

Uploaded by

Matiko Desalegn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views

Microprocessor Microcontroller

This document contains 30 questions and answers about microprocessors and microcontrollers. It covers topics like the functions of various components like the program counter, accumulator, status pins. It also discusses interrupt signals, instruction cycles, assemblers, linkers, assembly vs high-level languages, arithmetic instructions, and more. The questions are answered concisely with 1-2 sentences per answer providing the key details about each topic.

Uploaded by

Matiko Desalegn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

MICROPROCESSOR AND

MICROCONTROLLER VIVA
QUESTIONS
Engineering Funda YouTube Channel
Prof. Hitesh Dholakiya

SSASIT, Surat
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-1 What is microprocessor?


Ans It is a program controlled semiconductor device (IC), which fetches, Decodes and
execute instructions.
Q-2 What is the function of program counter?
Ans Program counter is the 16 bit counter.
1. Sequncelly program run.
2. If contain the memory address of the instruction which is next fetched.
Q-3 What is the function of stack pointer?
Ans Stack pointer is the 16 bit register.
1. It indicates the top location of stack memory.
2. While executing the interrupt and subroutine program it uses the
microprocessor stack pointer.
Q-4 What is the function of accumulator?
Ans 1. Accumulator is the 8 bit register. During arithmetical and logical operation
microprocessor used this register.
2. After arithmetical and logical operation the output result data bus store
through accumulator.
Q-5 What is the function of ALE, and S0, S1 pin?
Ans ALE- this is the high output signal. Which give the information about the contain
on multiplexed address/data line. If the ALE=1 it indicate that the contain on
multiplexed line are address line and ALE=0 multiplexed line are data line.
S0, S1-this are status signal which gives the information about the operation of
microprocessor.
Q-6 What is the function of HOLD and HLDA signal?
Ans HOLD- if an external controller want to transmit a large amount of data to
microprocessor it first activate HOLD pin.
HLDA-if microprocessor sense HOLD=1 it set address and data bus in tri-state
condition then acknowledge the controller.
Q-7 What is the function of TRAP, RST7.5, RST6.5, RST5.5 interrupt?
Ans TRAP- this is the non-mask able, vectored, edge and level triggered interrupt
signal. used for emergency purpose like power failure, smoke detector etc. if
TRAP signal is activate by any peripheral device control is transfer to the memory
location PC=0024H.
RST7.5- it is a mask able, vectored, edge triggered interrupted signal. If RST7.5
is activated then value of PC is set to 003ch.
RST6.5- it is a mask able, vectored, level triggered signal. When RST6.5 is
activated the value of PC is 0034H.
RST5.5- it is the mask able, vectored, edge interrupt signal. If RST5.5 activated
the value of PC is set to 002CH.
Q-8 What is the function of timing and control unit?
Ans It receives binary information from the instruction decoder. And generate timing
and control signal.
Q-9 What is the function of SID and SOD pin?
Ans SID pin- SID pin is used by the microprocessor to accept one bit data under
software control.
SOD pin- SOD pin is used by microprocessor to transmit one bit data under
software control.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-10 What do you mean by T-state, instruction cycle, and machine cycle?
Ans T-state-each clock period of clock signal is called T- state. Instruction cycle- the
time taken by the microprocessor to read an instruction from memory. It takes 1
to 6 machine cycle to read an instruction from memory.
Machine cycle- the time taken by data/ opcode / oprent from memory/ peripheral
devices to acknowledge the external hardware. It takes 1to6 T-state.
Q-11 What is assembler?
Ans An assembler translates a file of assembly language statements into a file of binary
Machine instructions and binary data.
Q-12 What is a Text segment?
Ans The text segment contains the machine language code for routines in the source
File. These routines may be unexcitable because of unresolved references.
Q-13 What is data segments?
Ans The data segment contains a binary representation of the data in the source file.
The data also may be incomplete because of unresolved references to labels in
other files.
Q-14 What is assembly language?
Ans Assembly language is the symbolic representation of a computer’s binary
Encoding machine language. Assembly language is more readable than machine
language because it uses symbols instead of bits. The symbols in assembly
language Name commonly occurring bit patterns, such as opcode and register
specifies, so people can read and remember them
Q-15 What is the difference between assembly language and high level language?
Ans Assembly language is a programming language. Its principal difference from
high-level languages such as BASIC, Java, and C is that assembly language
provides only a few, simple types of data and control flow. Assembly language
programs do not specify the type of value held in a variable. Instead, a programmer
must apply the appropriate operations (e.g., integer or floating-point addition) to
a value. In addition, in assembly language, programs must implement all control
flow with go tos. Both factors make assembly language programming for any
machine MIPS or 80x86 more difficult and error-prone than writing in a high-
level language.
Q-16 What do you mean by assembler directives?
Ans Assembler directives are the predefine mnemonics that tell the assembler how to
translate a program but do not produce machine instructions.
Q-17 What are the drawback of assembly language?
Ans Assembly language has many disadvantages that strongly argue against its
widespread use. Perhaps its major disadvantage is that programs written in
assembly language are inherently machine-specific and must be totally rewritten
to run on another computer architecture.. An assembly language program remains
tightly bound to its original architecture, even after the computer is eclipsed by
new, faster, and more cost-effective machines.
Q-18 What is linker?
Ans A linker s first task is to ensure that a program contains no undefined labels. The
linker matches the external symbols and unresolved references from a programs
files. An external symbol in one file resolves a reference from another file if both
refer to a label with the same name. Unmatched references mean a symbol was
used, but not defined anywhere in the program.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-19 What are the main function of linker?


Ans The linker performs three tasks:
Searches the program libraries to find library routines used by the program
Determines the memory locations that code from each module will occupy and
relocates it instructions by adjusting absolute references
Resolves references among files
Q-20 What is back patching?
Ans back patching A method for translating from assembly language to machine
instructions in which the assembler builds a (possibly incomplete) binary
representation of every instruction in one pass over a program and then returns to
fill in previously undefined labels.
Q-21 Explain the types of instruction set?
Ans A1there are five types of instruction used in 8085 microprocessor:
1. Data transfer group
2. Arithmetic group
3. Logical group
4. Branching group
5. Stack and machine control group
Q-22 What do you mean by Arithmetic group instruction?
Ans these groups of instructions perform arithmetic operations such as addition,
subtraction, increment and decrement etc.
Q-23 What is compiler?
Ans A compiler is software which converts high level language into its equivalent
machine language. A compiler will take a programme as one & compile it.
Q-24 What is interpreter?
Ans Software which converts high level language into its equivalent program line by
line to all instruction by which error is found & checked & it is improved.
Q-25 What is the function of ADD R?
Ans This instruction adds the contents of register R to the contents of Accumulator and
stored the obtained result accumulator. Example. - AAD B
Q-26 What is the function of ADD M?
Ans This instruction adds the contents of the memory location addressed by HL pair to
the contents of the accumulator and the result is stored in accumulator. Example.
- ADD M
Q-27 What is the function of ADC R?
Ans This instruction add the contents of register R carry flag and accumulator and
stored the result in accumulator. EX. – ADC B
Q-28 What is the function of ADC M?
Ans This instruction adds the contents of memory location addressed by HL pair and
carry flag to the contents of accumulator the result in the accumulator. EX. – ADC
M.
Q-29 What is the function of ADI DATA?
Ans This instruction adds 8 bit immediate data to the contents of accumulator and result
is stored in accumulator. EX. – ADI 20 H
Q-30 What is the function of ACI DATA?
Ans This instruction add the immediate data carry flag and accumulator and stored the
result in the accumulator. EX. – ACI 20 H
Q-31 What is the function of DAD Rp?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans This instruction add the contents of the specified register pair to the HL pair and
stores the result in HL pair. EX. – DAD B
Q-32 What do you mean by Immediate Addressing mode addressing mode?
Ans Immediate Addressing mode – In immediate addressing mode the data is given in
the instruction. It is a 2 Byte or 3 Byte instructions
Q-33 What do you mean by Direct addressing mode?
Ans Direct addressing mode – In direct addressing mode the address of the data is
given in the instruction. It is a 3 Byte instruction
Q-34 What do you mean by Indirect addressing Mode addressing mode?
Ans Indirect addressing Mode – In indirect addressing mode the address of the data is
not given by the instruction but a memory pointer indicate were the data is present.
Q-35 What do you mean by Resister addressing mode addressing mode?
Ans Resister addressing mode – In this addressing mode the data is present in any
general purpose resister. It is 1 Byte instruction.
Q-36 What do you mean by Implicit/Inherent addressing mode addressing mode?
Ans Implicit/Inherent addressing mode – In this addressing mode the memory location
of data/Operant is not given in the instruction, the instruction define itself in a
program.
Q-37 What do you mean by input device?
Ans The job of input device is to accept input from external world. The input may be
given using keyboardouseoystick, from operator. The input may be in the from of
Image using video camera and scanner.
Q-38 What do you mean by output device?
Ans The job of output device is to make the system user friendly by “displaying” or
“announcing”the required data or message. Most widely used output device is
CRT screen and LCD screen.
Q-39 What do you mean by memory unit?
Ans Memory is a storage device. Data and instruction entered in to a computer system
through input unit have to be stored inside the computer before actual processing
starts.
Q-40 What do you mean by RAM?
Ans RAM- the RAM is also called as Read/Write memory. The RAM is a volatile type
of memory. It allows programmer to read write data.
Q-41 What is the function of SUB R?
Ans This instruction subtracts the contents of the register from the contents of the
register R and result is placed in the accumulator the contents of register R are not
altered.
Q-42 What is the function of SUB M?
Ans This instruction subtract the contents of the memory location whose address is
given by HL from accumulator and result is placed in the accumulator. EX. – SUB
M
Q-43 What is the function of SBB R?
Ans This instruction subtracts register and borrow flag from the accumulator and stores
the result in the accumulator. EX. – SBB C
Q-44 What is the function of SBB M?
Ans This instruction subtracts contents of memory location and the borrow flag from
accumulator and result is placed in accumulator. EX. – A (HL) – BORROW –
ACCUMULATOR
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-45 What is the function of SUI DATA?


Ans This instruction subtract the immediate data of the instruction from the data in
accumulator and the result in placed in the accumulator. EX. – SUI 50H
Q-46 What is the function of SBI DATA?
Ans This instruction subtract the data and the borrow flag from accumulator and stores
result in accumulator. EX. – SBI 40H
Q-47 What is the function of INR R -?
Ans This instruction increment the contents of the specified register by 1 and result is
stored in the same register. EX. – INR B
Q-48 What is the function of INR M?
Ans This instruction increments the contents of the memory location addressed by HL
register pair and the result is placed back in the same memory location. EX. -
HL+1 – HL
Q-49 What is the function of DCR R?
Ans These instruction decrements the constants of the register R and result is stored in
the same register. EX. DCR B
Q-50 what is the function of DCR M
Ans This instruction decrement the contents of memory location addressed by HL
register pair by 1and result is stored back at the same memory location itself. EX.-
HL-1-HL
Q-51 What is the function of INR R -?
Ans This instruction increment the contents of the specified register by 1 and result is
stored in the same register. EX. – INR B
Q-52 What is the function of INR M?
Ans This instruction increments the contents of the memory location addressed by HL
register pair and the result is placed back in the same memory location. EX. -
HL+1 – HL
Q-53 What is the function of DCR R?
Ans These instruction decrements the constants of the register R and result is stored in
the same register. EX. DCR B
Q-54 What is the function of DCR M?
Ans This instruction decrement the contents of memory location addressed by HL
register pair by 1and result is stored back at the same memory location itself. EX.-
HL-1-HL
Q-55 What is the function of INX Rp?
Ans This instruction increment the contents of the register pair by 1 and result gets
stored in the same register pair.
Q-56 What is the function of DCX Rp?
Ans This instruction decrement the contents of the register pair Rp by 1 and result gets
stored in the some Rp itself.
Q-57 What is the function of DAA –?
Ans This instruction changes the contents of accumulator from a binary value to its
equivalent two 4bit binary coded decimal i.e. BCD number.
Q-58 What is the function of RLC?
Ans Each binary bit the accumulator is rotated left by one position. Bit D7 is placed in
the position of D0 as well as in the carry flag.
Q-59 What is the function of RAL?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans Each binary bit of the accumulator is rotated left by one position through the carry
flag .Bit D7 is placed in the bit in the carry flag is placed in the least significant
position D0.
Q-60 What is the function of RAR?
Ans Each binary bit of the accumulator is rotated right by one position through the
carry flag .bit D0 is placed in the carry flag and the bit in the carry flag is placed
in the most significant position D7.
Q-61 What is the function of RRC?
Ans Each binary bit of the accumulator is rotated right by one position. Bit D0 is placed
in the position of D7 as well as in the carry flag.
Q-62 What is the function of RLC?
Ans Each binary bit of the accumulator is rotated left by one position .Bit D7 is placed
in the position of D0 as well as in the carry flag.
Q-63 What is the function of CALL instruction?
Ans Call is a three byte instruction used to transfer program control to subroutine the
starting address is specified instruction.
Q-64 What is the function of RETURN instruction?
Ans Return instruction is a 1 byte instruction used to transfer program control back to
main program to implement this transfer is takes back the store contain of PC from
stack and next instruction executed will be from main program
Q-65 What do you mean by CONDITIONAL CALL instruction?
Ans In conditional call instruction, when condition is true then a call at address is mode
.If condition is false then it will not have a call and will proceed for next instruction
after it.
Q-66 What do you mean by UN-CONDITIONAL CALL instruction?
Ans UNCONDITIONAL CALL: - When this instruction is executed the program
sequence is transfer to the address specified in the instruction.
Q-67 What do you mean by UN-CONDITIONAL RETURN instruction?
Ans UNCONDITIONAL RETURN- When this instruction is executed program
sequence Is transfer from the subroutine to calling program. The return address is
taken from stack and this address is loaded in pc and the programmer execution
beings at address Taken from stack
Q-68 What do you mean by CONDITIONAL CALL instruction?
Ans CONDITIONAL RETURN- In conditional RETURN instruction when the
Condition is true then only the RET is made at the address given by address if
Condition is false it will proceed further to execute the next instruction after it
Q-69 What is the function of RSTN?
Ans This instruction transfer the program Execution to a location depending on the
instruction.
Q-70 What do you mean by the upcode fetch operation?
Ans The operations perform by the microprocessor read up code from program
memory is called up code fetch operation.
Q-71 What do you mean by the memory read operation?
Ans The operations perform by the microprocessor read data from memory that is
called memory read operation.
Q-72 What do you mean by memory write operation?
Ans The operations perform by the microprocessor write a data on memory that is
called memory write operation.
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-73 What do you mean by the I/O read and I/O write operation?
Ans I/O read- the operations perform by the microprocessor read data from I/O device.
I/O write- the operation perform by the microprocessor write a data on I/O device.
Q-74 What do you mean by the operant fetch operation?
Ans The operation perform by the microprocessor read operant from program memory.
Q-75 What is the function of I0/M (BAR), WR (BAR), and RD (BAR) signal?
Ans IO/M (BAR) -this is an output signal used by microprocessor to differentiate
memory devices and IO devices.
If IO/M (BAR) = 1 then the IO/M (BAR) related operation and IO/M (BAR) =0
then the memory related operation.
RD (BAR) - This is an active low output signal used by the microprocessor to
read data from memory and peripheral device.
WR (BAR) - This is an active low output signal used by the microprocessor to
write a data on memory device and peripheral device.
Q-76 What do you mean by addressing mode?
Ans It is a way to define a data in a program is called addressing mode.
Q-77 Explain the type of addressing mode?
Ans There were five type of addressing mode –
1. Immediate Addressing mode.
2. Register addressing mode
3. Direct addressing mode
4. Indirect addressing mode
5. Implicit addressing mode
Q-78 What do you mean by ROM?
Ans ROM- The data in this memory can only be read, no writing is allowed. It is used
to permanent program.
Q-79 What do you mean by PROM?
Ans PROM- The basic function is same as that masked ROM. But in PROM, we have
fuse link. Depending up on the bit pattern, fuse can be burnt or kept intact.
Q-80 What do you mean by EPROM?
Ans EPROM- It uses MOS circuitry to store data. They store 1’s and 0’s in form of
charge. The information stored can be erased by exposing the memory to UV light
which erases the data stored in all memory location.
Q-81 What do you mean by STATIC RAM?
Ans STATIC RAM- SRAM consists of flip flop, using either transistor or MOS. For
each bit we require one flip flop. It is fast memory.
Q-82 What do you mean by, DYNAMIC RAM?
Ans DYNAMIC RAM – In this type of memory a data is stored in form of charge in
capacitors. When data is 1, the capacitor will be charge and if data is 0, the
Capacitor will not be charge.
Q-83 What do you mean by processing unit?
Ans CPU is the brain of computer. CPU stands for central processing unit. Control unit
and arithmetic logic unit of a computer system are together known as central
processing unit.
Q-84 What do you mean by a data?
Ans Data are raw facts. Data can be any number name of a person name of place,
weight name of a book, name of store

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-85 What do you mean by program?


Ans Program is set of instruction.
Q-86 Explain the types of memory?
Ans There are two types of memory:-
Primary memory. - Primary memory of a computer also known as its main
memory is used to hold pieces of program, instruction, and data.
Secondary memory. - Secondary memory of a computer is known as auxiliary
memory is used to take care of the limitation of primary memory.
Q-87 What do you mean by a flow chart?
Ans The flow chart is a pictorial representation of various actions and computations
that are taken to perform any task. A flowchart is similar to a block diagram
representing the structure of the program.
Q-88 What do you mean by Data transfer group instruction?
Ans This group of instructions copies data from source to destination without
modifying the contents of the source.
Q-89 What do you mean by Logical group instruction?
Ans these groups of instructions perform logical operations such as AND, OR, EXOR,
Rotate, Complement etc.
Q-90 What is the function of 8255?
Ans 8255 is a programmable peripheral interface it is general purpose programmable
parallel input output device it contain three input output ports .Which can be
program in deferent modes. To program the function to all 3 input output ports it
contains a register called control resister. The control register gives the signals
which are used to define the function of each input output ports and in which mode
they should operate.
Q-91 Explain the operating mode of 8255?
Ans It can operate in three modes –
1. Mode0- input output mode.
2. Mode1- strobe mode.
3. Mode2- strobe bidirectional
Q-92 What is trap and what is the vectored address of trap?
Ans It is a non-maskable , edge & level triggered &vectored interrupt s/g used for
emergency purpose like power failure , smoke detector etc. The up doesn’t execute
any interrupt acknowledge cycle to read interrupt from interrupting device. When
trap signal is activated up execute RST 4.5 instruction to generate starting address
of TRAP. It is the highest priority interrupt s/g among all interrupt &the memory
location for TRAP s/g is 0024H.
Q-93 Differentiate between I/O mapped I/O & memory mapped/O?
Ans In the peripheral mapped I/O all the input and output devices 2^8 = 256 input
&256 output Device can be connected to 8085 up hence the space range for I/O
device is from 00H to FFH Control signal used for input &output devices are I/O
read & I/O write. The execution speed is 10T state. Decoding 8 bits of address is
only required so hardware needed is less. Memory Mapped: - In memory mapped
I/O both I/O o/p device &memory device are treated as memory. The device
address is 16 bit hence the address range is 000H to FFFH. Control s/g used in
memory mapped I/O O/P is MEMR, MEMW
Q-94 What is call & return instruction?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans Call: - When this instruction is executed the programme sequence is transfer to
the address Specifies in the instructions. Before transferring the sequence the
programme counter contents are stored on stack. The call instruction is used a sub-
routine. Return: - return from subroutine. When this instruction is executed
sequence is transferred from The subroutine to the calling program .The return
address is taken from the stack & the program execution begins in address taken
from stack.
Q-95 What do you mean by Maskable interrupt?
Ans Maskable interrupt: - The up can be ignore/delay a maskable interrupt request.
It is used to interface peripherals.
Lower priority.
It mainly vectored or non-vectored.
Response time is high.
This interrupt does not disable non maskable interrupt.
Q-96 What do you mean by Maskable interrupt?
Ans Non-maskable interrupt: - The up cannot be masked/delay or nonmaskable
interrupt request. It is used for emergency purpose like power failure, smoke
detector etc. It has highest priority. It is vectored. The response time is low.
Non-maskable interrupt are used for disable all maskable interrupt. The execution
speed is 137T state for STA, LDA instruction & 7T state for MOVRd Rs
instruction. Since 16 bit address has to be decoded hence more hardware is
required.
Q-97 What do you mean by Vectored interrupt?
Ans Vectored interrupt: - are those interrupts which are automatically vectored to
specific location on memory page 00H without any external hardware. They do
not require INTA s/g or am I? P port. IN 8085 up out of five interrupt four are
vectored. These are TRAP RST7.5, 6.5, 5.5.
Q-98 What do you mean by Non- Vectored interrupt?
Ans Non- vectored interrupt: - non-vectored interrupt are not automatically vectored
to specific location on page 00H. An external hardware is required to transfer it to
a particular location. In 8085 up out of five interrupt only INTR require RSTN
instruction for its working RSTN is nothing but it is an s/w interrupt.
Q-99 What do you mean by jump instruction?
Ans The Jump instruction specifies the memory location explicitly. They are three byte
instruction. One byte for the operation code, followed by a 16 bit memory address.
Q-100 Which type of architecture 8085 has?
Ans 8085 has Von Neumann architecture. It was derived after the name of
mathematician John Von Neumann. It’s having 16 address bus and 8 bit data bus.
It can access 2^16 individual memory location.
Q-101 How many memory locations can be addressed by a microprocessor with 14
address lines?
Ans 2^14=16384
Q-102 8085 is how many bit microprocessor?
Ans 8 bit as its data bus is 8 bit.
Q-103 Why is data bus bi-directional?
Ans As it has to carry data from mp to external device or the reverse.
Q-104 What is the function of accumulator?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans This register is used to store 8-bit data and to perform arithmetic and logical
operations. The result of an operation is stored in the accumulator.
Q-105 What are tri-state devices and why they are essential in a bus oriented
system?
Ans Tri state logic devices have three states (0, 1 and high impedance). When the
enable maybe active high or active low) line is activated, the device works. The
disabled enable line makes the device at high impedance state and it is
disconnected from the circuit. For example see the tri stated inverter in the figure
shown. In microcomputer system the peripherals are connected in parallel between
address bus and data bus. Because of tri stated interfacing devices, peripherals do
not load the system buses.
Q-106 Why are program counter and stack pointer 16-bit registers?
Ans Because SP points to the beginning of stack memory (LXI SP 8000H) which is
16-bits. Also PC points to the memory locations (16-bits) of the instructions to be
executed tomaintain the proper sequence of execution of program.
Q-107 What does it mean by embedded system?
Ans A specialized computer system that is part of a larger system or machine.
Typically, an embedded system is housed on a single microprocessor board with
the programs stored in ROM. Virtually all appliances that have a digital interface
like watches, microwaves, VCRs, cars etc utilize embedded systems. Some
embedded systems include an operating system, but many are so specialized that
the entire logic can be implemented as a single program.
Q-108 What are the different addressing modes in 8085?
Ans Register: - Data is provided through the registers. Or operand is only register(s).
Example: MOV Rd, Rs.
Register indirect: - Operand M or register pair. Example: MOV A,M; LDAX B;
STAX D; MVI M,32H (exception for immediate addressing mode).
Direct: - Operand 8-bit port address or 16-bit memory address. Example: IN 84H,
OUT 84H, all CALLs.
Immediate: - Instruction having the letter I. Or immediate data to the destination
provided. Also all jump instructions as the meaning is jump immediately. Example
MVI M, 2H; ADI 47H; LXIH 2050 (exception for direct addressing mode).
Implicit: - No operand. Example: XCHG.
Q-109 What is the function of 8237?
Ans The 8237 is a programmable direct memory access controller housed in a 40-pin
package It has four independent channels with each channel capable of
Transferring 64K bytes.
Q-110 Explain the operating mode of 8237?
Ans It can operate in two modes-
1. Slave Mode- In the slave mode, the DMA controller is treated as a peripheral
Using the following steps-
1. The MPU selects the DMA controller through Chip Select.
2. The MPU writes the control words as illustrated in example in channel
registers and command/status registers by using control signals IOW and IOR.
2. Master Mode- After the initialization, the 8237 in master mode keeps
Checking for a DMA request, and the steps in data transfer can be listed As
follows-
1. When the peripheral is ready for data transfer, it sends a high signal to DRQ.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

2 In the next cycle, the MPU relinquishes the buses and sends the HLDA Signal
to the 8237.
Q-111 What do you mean by wait state? What is its need?
Ans A wait state is a delay experienced by ìP when accessing external memory or
another device that is slow to respond. The vice versa also cone into scenario.
Now, to be able to access slow memory the ìP must be able to delay the transfer
until the memory access is complete. One way is to increase the ìP clock period
by reducing the clock frequency. Some ìPs provide a special control input called
READY to allow the memory to set its own memory cycle time. If after sending
an address out, the ìP dies not receive a READY input from memory, it enters a
wait state for as long as the READY line is in 0 state. When the memory access is
completed the READY goes high to indicate that the memory is ready for specified
transfer.
Q-112 What is PSW?
Ans PSW (Program Status Word) represents the contents of the accumulator and the
flag register together considering the accumulator as the high order and flag as the
low order register as if it is the AF register pair. For example POP PSW.
Q-113 What is ALE? Explain the functions of ALE in 8085.
Ans It is the acronym for Address Latch Enable (pin number 30) used to demultiplex
the multiplexed lower order address/data bus. During T1 the ALE goes HIGH.
When ALE goes HIGH, the latch is enabled. So the o/p changes according to the
i/p data. During T1 the o/p of latch is 05H. When ALE goes LOW, the data byte
05H is latched until the next ALE. And after the latching operation the o/p of the
latch represents the lower order
Q-114 What do you mean by Branching group instruction?
Ans These groups of instructions changes the path of program execution or sequence
of program execution.
Q-115 What do you mean by Stack and machine control group instruction?
Ans these groups of instructions performs stack and machine control functions such as
PUSH, POP, Halt, and enable/disable interrupt, no operation etc.
Q-116 What is debugging?
Ans Debugging is a kind of process by which in any program used instructions &
content of Register are checked & error is found.
Q-117 Explain the types of debugging?
Ans There are two types of debugging:-
1. Static debugging: - If the length & size of programme is small than static
debugging is used.
2. Dynamic debugging: - If programme length & size is large than dynamic
debugging is used.
Q-118 What is interrupt?
Ans Interrupt: - is a data transfer by an external device peripheral can inform the
microprocessor that it is ready for communication & it request as Attention.
Q-119 What is the function of 8253?
Ans The 8253 programmable interval timer is an Ic used to provide accurate time Delay
under software control it will work parallel with microprocessor. After the
completing the require delay time it will interrupt the Microprocessor to give the
information above completion of job.
Q-120 What is the function of 8251?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans 8251 Ic is designed by Intel corporation for parallel communication. The


Communication between microprocessor and 8251 is done in parallel. The 8251
will convert the parallel data into serial bit stream and Transmission serial output
lines. At the same time if can receive serial data on serial input lines converts it
into parallel from and then transfer to microprocessor.
Q-121 What is the operation of DMA?
Ans If the data is less than microprocessor will not waste its time. It’s simply
Transferring data from input output to memory are memory to input output. But if
the data is large then the transfer rate from input output to memory or memory to
input output will slow down. Because of Microprocessor intervention. In such case
to speed up the process of transferring the data under the supervision of a device
called DMA controller.
Q-122 Explain the types of interrupt?
Ans There are two types of interrupt:-
1. Hardware interrupt
2. Software interrupt
Q-123 Differentiate between software & hardware interrupt.
Ans Difference between hardware & software interrupt.
1. Hardware interrupt: - It is asynchronous event. This interrupt is requested by
executing instruction. PC is incremented.
It cannot be ignored or masked.
It has highest priority among all interrupt.
2. Software interrupt: - It is a synchronous event. This interrupt is requested by
external device. PC is not incremented.
It can be masked.
Q-124 What is function of assembler?
Ans Assembler is a program which convert a source code into its equivalent object
code .During conversion of source code to object code assembler also check the
syntax error in the program & if any syntax error is found it repair the programme
and remove it.
Q-125 What happens during DMA transfer?
Ans To make a fast data transfer, the MPU releases the control of its buses to DMA.
DMA acts as an external device and the active high input signal HOLD goes HIGH
when the DMA is requesting to the MPU to use its buses. After receiving the
HOLD request from DMA, the MPU releases the buses in the following machine
cycle and generates an active high output signal HLDA indicating the release of
buses. Once the DMA gains that control, it acts in the role of the MPU for data
transfer.
Q-126 What do you mean by wait state? What is its need?
Ans A wait state is a delay experienced by ìP when accessing external memory or
another device that is slow to respond. The vice versa also cone into scenario.
Now, to be able to access slow memory the ìP must be able to delay the transfer
until the memory access is complete. One way is to increase the ìP clock period
by reducing the clock frequency. Some ìPs provide a special control input called
READY to allow the memory to set its own memory cycle time. If after sending
an address out, the ìP dies not receive a READY input from memory, it enters a
wait state for as long as the READY line is in 0 state. When the memory access is
completed the READY goes high to indicate that the memory is ready for specified
transfer.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-127 What are the functions of RIM?


Ans Read Interrupt Mask (RIM) RIM is a multipurpose instruction used to read the
status of interrupts 7.5, 6.5, 5.5 and to read serial input data bit. RIM loads 8-bit
data in the accumulator with the following interpretation:
1.interrupt masked if bit = 1 (5.5 ,6.5, 7.5)
2.iterrupt enable F/F is set if bit = 1 (IE)
3.interrupts pending if bit = 1(15.5,16.5,7.5)
4.serial input data bit (SID)

*Actually RIM does the following three tasks:

fy pending interrupts (bit 6, 5, 4).

e interrupt mask (bit 2, 1, 0).


Q-128 What are the functions of SIM?
Ans Set Interrupt Mask: SIM is a multipurpose interrupt used to implement the 8085
interrupts (RST 7.5, 6.5, 5.5) and serial data output. SIM interprets the
accumulator content as follows:
1.Mask interrupts if bits(M5.5,M6.5,M7.5) = 1
2.Mask set enable if bit(MSE) = 1
3.Reset RST7.5 if bit = 1
5 XXX
6.Serial data enable(SDE) 1 = enable
0 = disable
7.Serial output data (SOD)
This is mainly Actually, SIM does the following three tasks:

4). Used to overwrite RST 7.5 without serving it.


Q-129 What are the functions of IN?
Ans Input Data to Accumulator from a Port with 8-bit Address (IN) The contents of
the input port designated in the operand are read and loaded into the accumulator.
The operand is an 8-bit address. During execution, this port address is duplicated
in the lower order and higher order address buses. Any one of the sets of address
lines can be decoded to enable the input port.
Q-130 What are the basic units of microprocessor?
Ans The basic units or blocks of microprocessor are ALU, an array of registers and
control unit.
Q-131 What is a bus?
Ans Bus is a group of conducting lines that carries data, address and control signals.
Q-132 Why data bus is bi-directional?
Ans The microprocessor is to fetch (read) the data from memory or input device for
processing and after processing it has to store (write) the data to memory or output
devices. Hence the data bus is bi-directional.
Q-133 Why data bus is bi-directional?
Ans The address is an identification number used by the microprocessor to identify or
access a memory location or input/output device. It is an output signal from the
processor. Hence the address bus is unidirectional.
Q-134 Define machine cycle?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans Machine cycle is defined as the time required to complete one operation of
accessing memory input/output, or acknowledging an external request. This cycle
may consists of three to six T-states.
Q-135 Define T-state?
Ans T-state is defined as one subdivision of operation performed in one clock period.
These subdivisions are internal states synchronized with the system clock, and
each Tstate is precisely equal to one clock period.
Q-136 What is an instruction cycle?
Ans The sequence of operations that a processor has to carry out while executing the
instruction is called instruction cycle. Each instruction cycle of processor contains
a number of machine cycles.
Q-137 What is fetch and execute cycle?
Ans The instruction cycle is divided in to fetch and execute cycles. The fetch cycle is
executed to fetch the opcode from memory. The execute cycle is executed to
decode the instruction and to perform the work instructed by the instruction.
Q-138 List the flags of 8085?
Ans There are five flags in 8085.They are sign flag, zero flag, auxiliary carry flag,
parity flag and carry flag.
Q-139 What does memory-mapping mean?
Ans The memory mapping is the process of interfacing memories to microprocessor
and allocating addresses to each memory locations
Q-140 What is a port?
Ans The port is a buffered I/O, which is used to hold the data transmitted from the
microprocessor to I/O devices and vice versa.
Q-141 What is USART?
Ans The device which can be programmed to perform Synchronous or Asynchronous
serial communication is called USART (Universal Synchronous Asynchronous
Receiver Transmitter). Eg: INTEL 8251
Q-142 What is scanning in keyboard and what is scan time?
Ans The process of sending a zero to each row of a keyboard matrix and reading the
columns for key actuation is called scanning. The scan time is the time taken by
the processor to scan all the rows one by one starting from first row and coming
back to the first row again.
Q-143 What is programmable peripheral device?
Ans If the function performed by the peripheral device can be altered or changed by a
program instruction then the peripheral device is called programmable device. It
has control register. The device can be programmed by sending control word in
the prescribed format to the control register
Q-144 What is baud rate?
Ans The baud rate is the rate at which the serial data are transmitted. Baud rate is
defined as (The time for a bit cell). In some systems one bit cell has one data bit,
then the baud rate and bits/sec are same.
Q-145 What are the tasks involved in keyboard interface?
Ans The tasks involved in keyboard interfacing are sensing a key actuation,
Debouncing the key and generating key codes (Decoding the key). These tasks are
performed software if the keyboard is interfaced through ports and they are
performed by hardware if the keyboard is interfaces through 8279.
Q-146 How a keyboard matrix is formed in keyboard interface using 8279?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans The return lines, RL0 toRL7 of 8279 are used to form the columns of keyboard
matrix. In decoded scan lines SL0 t0SL3 of 8279 are used to form the rows of
keyboard matrix. In encoded scan mode, the output lines of external decoder are
used as rows of keyboard matrix. Output function in different operating modes
The port is a buffered I/O, which is used to hold the data transmitted from the
microprocessor to I/O devices and vice versa.
Q-147 What is the need for interrupt controller?
Ans The interrupt controller is employed to expand the interrupt inputs. It can handle
the interrupt request from various devices and allow one by one to the processor.
Q-148 What is synchronous data transfer scheme?
Ans For synchronous data transfer scheme, the processor does not check the readiness
of the device after a command have been issued for read/write operation. For this
scheme the processor will request the device to get ready and then read/write to
the device immediately after the request.
Q-149 What is asynchronous data transfer scheme?
Ans In asynchronous data transfer scheme, first the processor sends a request to the
device for read/write operation. Then the processor keeps on polling the status of
the device. Once the device is ready, the processor executes a data transfer
instruction to complete the process.
Q-150 What is IMR(Interrupt mask register)
Ans IMR stores the masking bits of the interrupt lines to be masked. This register can
be programmed by an operation command word (OCW).
Q-151 What is priority resolver?
Ans It determines the priorities of the bits set in the Interrupt request register (IRR).The
bit corresponding to the highest priority interrupt input is set in the ISR during
INTA input.
Q-152 What is the use of IRR?
Ans The interrupt request register is used to store all the interrupt levels which are
requesting the service. The eight interrupt inputs sets corresponding bits of the
Interrupt Request Register upon the service request.
Q-153 What is Interrupt service register (ISR)?
Ans The interrupt service register stores all the levels that are currently being serviced.
Q-154 What is the difference between SHLD and LHLD?
Ans SHLD- Store HL register pair in memory. This instruction is used to store the
contents of H and L register directly in to memory.
LHLD- Load HL register pair from memory. This instruction copies the contents
of memory location given with in the instruction in to the L register and the
contents of next memory location in to the H register.
Q-155 What is the difference between STAX and LDAX?
Ans STAX rp – Store the contents of Accumulator register (A) in memory location
whose address is specified by BC or DE register pair.
LDAX rp – Load Accumulator register (A) with the contents of memory location
whose address is specified by BC or DE register pair.
Q-156 Write an assembly language program to transfer data from memory block
B1 to memory block B2?
Ans MVI C, 0AH; Initialize counter
LXI H, 2200H; Initialize source memory pointer
LXI D, 2300H; Initialize destination memory pointer

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Loop: MOV A, M; Get byte from source memory block


STAX D; Store byte in the destination memory block
INX H; Increment source memory pointer
INX D; Increment destination memory pointer
DCR C; Decrement counter
JNZ Loop; counter 0 repeat
HLT
Q-157 What are the types of branching instructions?
Ans 1. Jump instructions
2. Call and Return instructions
3. Restart instructions
Q-158 Write an assembly language program to add 2 BCD numbers?
Ans LXI H,2200H; Initialize pointer
MOV A,M ; Get the first number
INX H; Increment the pointer
ADD M ; Add two numbers
DAA ; Convert HEX to valid BCD
STA 2300; store the result
HLT
Q-159 Explain the instruction LXI rp,data (16)?
Ans LXI rp, data(16) – Load 16 –bit immediate data to specified register pair or
Stack pointer. The rp is 16 – bit register pairs such as BC, DE, HL or stack pointer.
Q-160 Write a program to swap two numbers using 8051?
Ans MOV A,# data
SWAP A
Q-161 Write a program to subtract two numbers & exchange the digits using 8051?
Ans MOV A,#9F
MOV R0,#40
SUBB A,R0
SWAP A
Q-162 What are the different types of Address decoding Techniques?
Ans Absolute decoding/Full decoding
Linear decoding/Partial decoding
Q-163 Comparison between full address decoding and Partial address decoding?
Ans Full address decoding
1. All higher address lines are decoded to select the memory or I/O device
2. More hardware is required to design decoding logic.
3. Higher cost for decoding circuit.
4. No multiple addresses.
5. Used in large systems.

Partial address decoding


1. Few higher address lines are decoded to select the memory or I/O device.
2. Hardware required to design decoding logic is less and sometimes it can be
eliminated.
3. Less cost for decoding circuit.
4. It has a disadvantage of multiple addresses.
5. Used in small systems.
Q-164 What is the significance of wait state generator?
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans This is used to transfer data between slower I/O device and the microprocessor. In
some applns, the speed of I/O systems is not compatible with the microprocessor’s
timings. So the microprocessor has to confirm whether the peripheral is ready or
not. If READY pin is high, the peripheral is ready otherwise 8085 enters in to wait
state.
Q-165 What is a Non-maskable interrupt?
Ans It is unaffected by any mask or interrupt enable. Eg: TRAP
Q-166 What is a Data pointer register?
Ans The data pointer register (DPTR) consists of a high byte (DPH) and a low byte
(DPL) functions to hold 16 bit address. It may be manipulated as a 16-bit data
register or as independent 8-bit registers. It serves as a base register in indirect
jumps, look up table instructions and external data transfer.
Q-167 What are the operating modes of 8279?
Ans 1.Input Modes: Scanned Keyboard, Scanned sensor matrix , Strobe input
2. Display Modes: Left entry (Type writer mode ),Right entry (calculator
mode)
Q-168 What are the different functional units in 8279?
Ans CPU interface section
Keyboard section
Display section
Scan section
Q-169 What are the priority modes in 8259?
Ans a. Fully nested mode
b. Special fully nested mode
c. Rotating Priority mode
d. Special Masked mode
e. Polled mode
Q-170 What is opcode fetch cycle?
Ans The opcode fetch cycle is a machine cycle executed to fetch the opcode of an
instruction stored in memory. Each instruction starts with opcode fetch machine
cycle.
Q-171 What are the instructions used to control the interrupts?
Ans 1.EI
2.DI
3.RIM
4.SIM
Q-172 What is polling?
Ans In polling, the microprocessor’s software simply checks each of the I/O devices
every so often. During this check, the microprocessor tests to see if any device.
Needs servicing.
Q-173 What are the different types of interrupts?
Ans Hardware interrupts- The interrupts where the CPU pins are used to receive
interrupt requests , are called hardware interrupts.

Software interrupts – This interrupt is caused by the execution of the instruction.


These are special instructions supported by the microprocessor.
Q-174 What are the types of hardware interrupts?
Ans TRAP

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

RST 7.5
RST 6.5
RST 5.5
INTR
Q-175 Difference between memory mapped I/o and I/O mapped I/o?
Ans Memory mapped I/O
1. In this device address is 16- bit. Thus Ao to A15 lines are used to Generate
the device address
2. MEMR and MEMW control signals are used to control read and write I/O to
control read and write I/O operations
3. Instructions available are LDA, STA, MOV R,M , ADD M etc.
4. Data transfer is between any register and I/O device.
5. Decoding 16-bit address may require more hardware.

I/O mapped I/O


1. In this device address is 8-bit. Thus Ao to A7 or A8 to A15 generate device
address.
2. IOR and IOW control signals are used operations. to control read and write
I/O operations
3. Instructions available are IN and OUT
4. Data transfer is between accumulators And I/O device.
5. Decoding 8-bit address will require Less hardware.
Q-176 Describe the function of the following pins in 8085?
Ans 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.
ALE – In 8085, ADo to AD7 lines is multiplexed and lowers half of address (Ao
to A7) is available only during T1 of the machine cycle. The latching of lower half
address from the multiplexed address lines by using ALE signal.
IO/M - indicates whether I/O operation or memory operation is being carried out.
HOLD – This signal indicates that another master is requesting for the use of
address Bus, data bus and control bus.
SID (Serial Input Data) – This input signal is used to accept serial data bit by bit
from The external device.
SOD (Serial Output Data) – This is an output signal which enables the
transmission of Serial data bit by bit to the external device.
Q-177 What is ALE?
Ans The ALE (Address latch enable) is a signal used to demultiplex the address and
data lines using an external latch. It is used to enable the external latch.
Q-178 Where is the READY signal used?
Ans READY is an input signal to the processor, used by the memory or input/output
devices to get extra time for data transfer or to introduce wait states in the bus
cycles.
Q-179 Give some examples of port devices used in 8085 microprocessor based
system?
Ans The various port devices used in 8085 are 8212, 8155, 8156,8255,8355,8755.
Q-180 What is the need for timing diagram
Ans The timing diagram provides information regarding the status of various signals,
when a machine cycle is executed. The knowledge of timing diagram is essential

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

for system designer to select matched peripheral devices like memories, latches,
ports etc from a microprocessor system.
Q-181 What operation is performed during first T-state of every machine cycle in
8085?
Ans In 8085, during the first T-state of every machine cycle the low byte address is
latched into an external latch using ALE signal.
Q-182 What is interrupt acknowledge cycle?
Ans The interrupt acknowledge cycle is a machine cycle executed by 8085 processor
to get the address of the interrupt service routine in order to service the interrupt
device.
Q-183 What is vectored and non-vectored interrupt?
Ans When an interrupt is accepted, if the processor control branches to a specific
address defined by the manufacturer then the interrupt is called vectored interrupt.
In Non-vectored interrupt there is no specific address for storing the interrupt
service routine. Hence the interrupted device should give the address of the
interrupt service routine.
Q-184 List the software and hardware interrupts of 8085?
Ans Software interrupts : RST 0,RST 1,RST 2,RST 3,RST 4,RST 5,RST 6,RST 7
Hardware interrupts: TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
Q-185 What is TRAP?
Ans The TRAP is a non-maskable interrupt of 8085. It is not disabled by processor
reset or after recognition of interrupt.
Q-186 How clock signals are generated in 8085 and what is the frequency of the
internal clock?
Ans The 8085 has the clock generation circuit on the chip but an external quartz crystal
or LC circuit or RC circuit should be connected at the pins X1 andX2. The
maximum internal clock frequency of 8085 is 3.03MHz.
Q-187 Define stack?
Ans Stack is a sequence of RAM memory locations defined by the programmer.
Q-188 What is program counter? How it is useful in program execution?
Ans The program counter keeps track of program execution. To execute a program the
starting address of the program is loaded in program counter. The PC sends out an
address to fetch a byte of instruction from memory and increments its content
automatically.
Q-189 Define opcode and operand?
Ans Opcode (operation code) is the part of an instruction that identifies a specific
operation. Operand is a part of instruction that represents a value on which the
instruction acts.
Q-190 How the 8085 processor differentiates a memory access and I/O access?
Ans The memory access and I/O access is differentiated using IO/M signal. The 8085
processor asserts IO/M low for memory operation and high for I/O operations.
Q-191 When the 8085 processor checks for an interrupt?
Ans In the second T-state of the last machine cycle of every instruction, the 8085
processor checks whether an interrupt request is made or not.
Q-192 Why interfacing is needed for I/O devices?
Ans Generally I/O devices are slow devices. Therefore the speed of I/O devices does
not match with the speed of microprocessor. And so an interface is provided
between system bus and I/O devices.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-193 What is interrupt I/O?


Ans If the I/O device initiate the data transfer through interrupt then the I/O is called
interrupt driven I/O.
Q-194 What is GPIB?
Ans GPIB is the General Purpose interface Bus. It is used to interface the test
instruments to the system controller.
Q-195 Advantages of differential data transfer?
Ans 1. Communication at high data rate in real world environment.
2. Differential data transmission offers superior performance.
3. Differential signals can help induced noise signals.
Q-196 Features of INTEL 8259?
Ans 1. It manage 8 interrupt request.
2. The interrupt vector addresses are programmable.
3. The priorities of interrupts are programmable.
4. The interrupt can be masked or unmasked individually.
Q-197 What is meant by micro controller?
Ans A device which contains the microprocessor with integrated peripherals like
memory, serial ports, parallel ports, timer/counter, interrupt controller, data
acquisition interfaces like ADC, DAC is called micro controller.
Q-198 List the features of 8051 micro controllers?
Ans Single supply +5v operation using HMOS technology. 4096 byts program
memory on chip. 128 data memory on chip. 4 register banks. 2 multiple modes,
16 bit timer/counter Extensive Boolean processing capabilities.
Q-199 What is debugging?
Ans Debugging is a kind of process by which in any program used instructions &
content of Register are checked & error is found.
Q-200 What is buses and operation?
Ans All internal registers as well as internal and external data buses were 16 bits wide,
firmly establishing the 16-bit microprocessor identity of the 8086. A 20-bit
external address bus gave a 1 MB physical address space (2^20 = 1,048,576). This
address space was addressed by means of internal segmentation. The data bus was
multiplexed with the address bus in order to fit a standard 40-pin dual in-line
package. 16-bit I/O addresses meant 64 KB of separate I/O space (2^16 = 65,536).
The maximum linear address space was limited to 64 KB, simply because internal
registers were only 16 bits wide. Programming over 64 KB boundaries involved
adjusting segment registers (see below) and was therefore fairly awkward (and
remained so until the 80386).
Q-201 What is return address?
Ans In postal mail, a return address is an explicit inclusion of the address of the person
sending the message. It provides the recipient (and sometimes authorized
intermediaries) with a means to determine how to respond to the sender of the
message if needed.
Q-202 What is 8086?
Ans The 8086 (also called iAPX86) is a 16-bit microprocessor chip designed by Intel
between early 1976 and mid-1978, when it was released. The 8088, released in
1979, was a slightly modified chip with an external 8-bit data bus (allowing the
use of cheaper and fewer supporting logic chips and is notable as the processor
used in the original IBM PC.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-203 How many register 8086 contain?


Ans The 8086 had eight (more or less general) 16-bit registers including the stack
pointer, but excluding the instruction pointer, flag register and segment registers.
Four of them, AX, BX, CX, DX, could also be accessed as twice as many 8-bit
registers (see figure) while the other four, BP, SI, DI, SP, were 16-bit only.
Q-204 What are the two main components in 8086?
Ans 1 program memory
2. Data memory
3. Microprocessor
4. Input port
5. Output port
6. Clock generator
Q-205 What is driver interface?
Ans Drivers or buffers are also used in microprocessor interface design. However, they
are usually only needed when the loading on the microprocessor data, address or
control lines is too high. And that is usually because the microprocessor address,
data or control lines are connected in parallel to large number of external electronic
components. Another situation that requires drivers is when the microprocessor is
connected to long cables. Drivers are needed in both cases so that delay times, rise
and fall times and noise levels do not adversely affect the reliability of the
microprocessors data and calculations.
Q-206 What are the common concept in programming?
Ans Learning any imperative programming language involves mastering a number of
common concepts: Variables: declaration/definition Assignment: assigning values
to variables Input/Output: Displaying messages Displaying variable values
Control flow: if-then Loops Subprograms: Definition and Usage Programming
Q-207 What is variables?
Ans VariablesFor the moment we will skip details of variable declaration and simply
use the 8086 registers as the variables in our programs. Registers have predefined
names and do not need to be declared.
Q-208 How many 16 bit register s are used in 8086?
Ans The 8086 has 14 registers. Each of these is a 16-bit register. Initially, we will use
four of them
– the so called the general-purpose registers: ax, bx, cx, dx
Q-209 Why the comma is essential?
Ans It is used to separate the two operands. A missing comma is a common syntax
error.
Q-210 What is comment?
Ans Anything that follows semi-colon (;) is ignored by the assembler. It is called a
comment. Comments are used to make your programs readable. You use them to
explain what we are doing in English.
Q-211 What are add, inc, dec and sub instructions?
Ans The 8086 provides a variety of arithmetic instructions The add instruction adds
the source operand to the destination operand, leaving the result in the destination
operand The inc instruction takes one operand and adds 1 to it. It is provided
because of the frequency of adding 1 to an operand in programming. The dec
instruction like inc takes one operand and subtracts 1from it. This is also a frequent

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

operation in programming. The sub instruction subtracts the source operand from
the destination operand leaving the result in the destination operand.
Q-212 What is Intel 8051?
Ans The Intel 8051 microcontroller is one of the most popular general purpose
microcontrollers in use today. The success of the Intel 8051 spawned a number of
clones which are collectively referred to as the MCS-51 family of
microcontrollers, which includes chips from vendors such as Atmel, Philips,
Infineon, and Texas Instruments. The Intel 8051 s a Harvard architecture
Q-213 What is Harvard architecture?
Ans The Harvard architecture is a computer architecture with physically separate
storage and signal pathways for instructions and data. The term originated from
the Harvard Mark I relaybased computer, which stored instructions on punched
tape (24 bits wide) and data in electromechanical counters.
Q-214 Enhanced 8051 devices are manufactured by?
Ans Enhanced 8051-compatible devices manufactured by more than 20 independent
manufacturers including Atmel, Infineon Technologies (formerly Siemens AG),
Maxim Integrated Products (via its Dallas Semiconductor subsidiary), NXP
(formerly Philips Semiconductor), Nuvoton (formerly Winbond), ST
Microelectronics, Silicon Laboratories (formerly Cygnal), Texas Instruments,
Ramtron International, Silicon Storage Technology, and Cypress Semiconductor.
Q-215 What are the functions provide by 8051?
Ans The 8051 architecture provides many functions CPU, RAM, ROM, I/O, interrupt
logic, timer, etc, in a single package
Q-216 What are the features of 8051?
Ans List the features of 8051 micro controllers:-
1) Single supply +5v operation using HMOS technology.
2) 4096 bytes program memory on-chip.
3) 128 data memory on chip
4) 4 register banks
5) 2 multiple modes, 16 bit timer/counter
6) Extensive Boolean processing capabilities
7) 64KB external RAM size.
8) 32 bi-directional I/O lines.
Q-217 What is a particularly useful feature of the 8051?
Ans A particularly useful feature of the 8051 core is the inclusion of a Boolean
processing engine which allows bit-level Boolean logic operations to be carried
out directly and efficiently on internal registers and RAM. This feature helped
cement the 8051s popularity in industrial control applications. Another valued
feature is that it has four separate register sets, which can be used to greatly reduce
interrupt latency compared to the more common method of storing interrupt
context on a stack.
Q-218 What is MCS-51 UARTs?
Ans MCS-51 UARTs make it simple to use the chip as a serial communications
interface. External pins can be configured to connect to internal shift registers in
a variety of ways, and the internal timers can also be used, allowing serial
communications in a number of modes, both synchronous and asynchronous.
Q-219 What is the function of UART and timer?
Ans Once a UART, and a timer if necessary, have been configured, the programmer
needs only to write a simple interrupt routine to refill the send shift register
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

whenever the last bit is shifted out by the UART and/or empty the full receive shift
register (copy the data somewhere else). The main program then performs serial
reads and writes simply by reading and writing 8-bit data to stacks.
Q-220 What are the components of MCS-51 based microcontrollers?
Ans MCS-51 based microcontrollers typically include one or two UARTs, two or three
timers, 128 or 256 bytes of internal data RAM (16 bytes of which are bit-
addressable), up to 128 bytes of I/O, 512 bytes to 64 kB of internal program
memory, and sometimes a quantity of extended data RAM (ERAM) located in the
external data space.
Q-221 In 8051 how many clock cycles per machine cycle?
Ans The original 8051 core ran at 12 clock cycles per machine cycle. With most
instructions executing in one or two machine cycles.
Q-222 What are the features of modern 8051 based microcontrollers?
Ans Common features included in modern 8051 based microcontrollers include built-
in reset timers with brown-out detection, on-chip oscillators, self-programmable
Flash ROM program memory, boot loader code in ROM, EEPROM non-volatile
data storage, I²C, SPI, and USB host interfaces, CAN or LIN bus, PWM
generators, analog comparators, A/D and D/A converters, RTCs, extra counters
and timers, in-circuit debugging facilities, more interrupt sources, and extra power
saving modes.
Q-223 Can you explain Memory Architecture of 8051?
Ans The MCS-51 has four distinct types of memory – internal RAM, special function
registers, program memory, and external data memory.
Q-224 What is Internal RAM (IRAM)?
Ans Internal RAM (IRAM) is located from address 0 to address 0xFF. IRAM from
0x00 to 0x7F can be accessed directly, and the bytes from 0x20 to 0x2F are also
bit-addressable. IRAM from 0x80 to 0xFF must be accessed indirectly, using the
@R0 or @R1 syntax, with the address to access loaded in R0 or R1.
Q-225 What is Special function registers (SFR)?
Ans Special function registers (SFR) are located from address 0x80 to 0xFF, and are
accessed directly using the same instructions as for the lower half of IRAM. Some
of the SFRs are also bit addressable.
Q-226 What is Program memory (PMEM)?
Ans Program memory (PMEM, though less common in usage than IRAM and XRAM)
is located starting at address 0. It may be on- or off-chip, depending on the
particular model of chip being used. Program memory is read-only, though some
variants of the 8051 use on-chip flash memory and provide a method of re-
programming the memory in-system or in-application. Aside from storing code,
program memory can also store tables of constants that can be accessed by MOVC
A, @DPTR, using the 16-bit special function register DPTR.
Q-227 What is External data memory (XRAM)?
Ans External data memory (XRAM) also starts at address 0. It can also be on- or off-
chip; what makes it external is that it must be accessed using the MOVX (Move
eXternal) instruction. Many variants of the 8051 include the standard 256 bytes of
IRAM plus a few KB of XRAM on the chip. If more XRAM is required by an
application, the internal XRAM can be disabled, and all MOVX instructions will
fetch from the external bus.
Q-228 What are the hardware features of 8051?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans 8051 has specific hardware features such as the multiple register banks and bit
manipulation instructions. There are many commercial C compilers. SDCC is a
popular open source C compiler. Other high level languages such as Forth,
BASIC, Pascal/Object Pascal, PL/M and Modula-2 are available for the 8051, but
they are less widely used than C and assembly.
Q-229 What are the addressing modes of 8051?
Ans List the addressing modes of 8051:-
Direct addressing
Register addressing
Register indirect addressing
Implicit addressing
Immediate addressing
Index addressing
Bit addressing
Q-230 What type of operations allows any addressing mode?
Ans Many of the operations allow any addressing mode for the source or the
destination, for example, MOV 020h; 03fh will copy the value in memory location
0x3f in the internal RAM to the memory location 0x20, also in internal RAM.
Q-231 Why in the 8051 all arithmetic operations must use the accumulator?
Ans Because the 8051 is an accumulator-based architecture, all arithmetic operations
must use the accumulator, e.g. ADD A, 020h will add the value in memory
location 0x20 in the internal RAM to the accumulator.
Q-232 Define DA A?
Ans This is a decimal adjust instruction It adjusts the 8-bit value in ACC resulting from
operations like ADD or ADDC and produces two 4-bit digits (in packed Binary
Coded Decimal (BCD) format Effectively, this instruction performs the decimal
conversion by adding 00H, 06H, 60H or 66H to the accumulator, depending on
the initial value of ACC and PSW
If ACC bits A3-0 are greater than 9 (xxxx1010-xxxx1111), or if AC=1, then a
value 6 is added to the accumulator to produce a correct BCD digit in the lower
order nibble. If CY=1, because the high order bits A7-4 is now exceeding 9
(1010xxxx-1111xxxx), then these high order bits will be increased by 6 to produce
a correct proper BCD in the high order nibble but not clear the carry.
Q-233 Define Logical EX OR?
Ans This instruction performs the logical XOR (Exclusive OR) operation on the source
and destination operands and stores the result in the destination variable No flags
are affected
Example:XRL A,R0 If ACC=C3H (11000011) and R0=AAH (10101010), then
the instruction results in ACC=69H (01101001)
Q-234 Define CLR A instruction?
Ans CLR A This instruction clears the accumulator (all bits set to 0) No flags are
affected If ACC=C3H, then the instruction results in ACC=00H.
Q-235 Define RRC A instruction?
Ans The instruction rotates the accumulator contents one bit to the right through the
carry flag The original value of carry flag will move into Bit 7 of the accumulator
and Bit 0 rotated into carry flag. No other flags are affected If ACC=C3H
(11000011), and the carry flag is 0, the instruction results in ACC=61H
(01100001) with the carry.
Q-236 Define PUSH Direct?
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans This instruction increments the stack pointer (SP) by 1The contents of Direct,
which is an internal memory location or a SFR, are copied into the internal RAM
location addressed by the stack pointer No flags are affected Example: PUSH 22H
PUSH 23H
Initially the SP points to memory location 4FH and the contents of memory
locations 22H and 23H are 11H and 12H respectively. After the above
instructions, SP=51H, and the internal RAM locations 50H and 51H will store
11H and 12H respectively.
Q-237 Define POP instruction?
Ans This instruction reads the contents of the internal RAM location addressed by the
stack pointer (SP) and decrements the stack pointer by 1. The data read is then
transferred to the Direct address which is an internal memory or a SFR. No flags
are affected.
Example:
POP DPH
POP DPL
If SP=51H originally and internal RAM locations 4FH, 50H and 51H contain the
values 30H, 11H and 12H respectively, the instructions above leave SP=4FH and
DPTR=1211H POP SP If the above line of instruction follows, then SP=30H. In
this case, SP is decremented to 4EH before being loaded with the value popped
(30H).
Q-238 Define XCH instruction?
Ans This instruction swaps the contents of ACC with the contents of the indicated data
byte
Example: XCH A,@R0
Suppose R0=2EH, ACC=F3H (11110011) and internal RAM location 2EH=76H
(01110110). The result of the above instruction leaves RAM location 2EH=F3H
and ACC=76H.
Q-239 Define CLR[bit] instruction?
Ans This operation clears (reset to 0) the specified bit indicated in the instruction No
other flags are affected CLR instruction can operate on the carry flag or any
directly addressable .
Q-240 What is the operation performed by SETB[bit]?
Ans This operation sets the specified bit to 1 SETB instruction can operate on the carry
flag or any directly-addressable bit. No other flags are affected
Q-241 Define CPL [bit] instruction?
Ans This operation complements the bit indicated by the operand No other flags are
affected ı CPL instruction can operate on the carry flag or any directly addressable.
Q-242 What is interface?
Ans In the field of computer science, an interface refers to a point of interaction
between components, and is applicable at the level of both hardware and software.
This allows a component, whether a piece of hardware such as a graphics card or
a piece of software such as an internet browser, to function independently while
using interfaces to communicate with other components via an input/output
system and an associated protocol.
Q-243 What is hardware and software interface?
Ans In addition to hardware and software interfaces, a computing interface may refer
to the means of communication between the computer and the user by means of

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

peripheral devices such a monitor or a keyboard, an interface with the internet via
Internet Protocol, and any other point of communication involving a computer.
Q-244 Explain software interface?
Ans Software interface may refer to a range of different types of interface at different
levels: an operating system may interface with pieces of hardware, applications or
programs running on the operating system may need to interact via streams, and
in object oriented programs, objects within an application may need to interact via
methods.
Q-245 What is constants?
Ans In computer programming, a constant is a special kind of variable whose value
cannot typically be altered by the program during its execution (though in some
cases this can be circumvented, e.g. using self-modifying code). Many
programming languages make an explicit syntactic distinction between constant
and variable symbols.
Q-246 What is programming against software interface?
Ans The use of interfaces allows implementation of a programming style called
programming against interfaces. The idea behind this is to base the logic one
develops on the sole interface definition of the objects one uses and not to make
the code depend on the internal details. This allows the programmer the ability to
later change the behaviour of the system by simply swapping the object used with
another implementing the same interface. Pushing this idea to the limit one can
introduce the inversion of control which means leaving the context to inject the
code with the specific implementations of the interface that will be used to perform
the work.
Q-247 Explain hardware interface?
Ans Hardware interfaces exist in computing systems between many of the components
such as the various buses, storage devices, other Input/output devices, etc. A
hardware interface is described by the mechanical, electrical and logical signals at
the interface and the protocol for sequencing them (sometimes called signaling).
A standard interface, such as SCSI, decouples the design and introduction of
computing hardware, such as I/O devices, from the design and introduction of
other components of a computing system, thereby allowing users and
manufacturers great flexibility in the implementation of computing systems.
Q-248 What is protocol?
Ans The protocol is a description of 1the messages that are understood by the object,2
the arguments that these messages may be supplied with, and3 the types of results
that these messages return.4the invariants that are preserved despite modifications
to the state of an object5the exceptional situations that will be required to be
handled by clients to the object.
Q-249 What is display device?
Ans A display device is an output device for presentation of information for visual,
tactile or auditive reception, acquired, stored, or transmitted in various forms.
When the input information is supplied as an electrical signal, the display is called
electronic display.
Q-250 What is dot matrix display?
Ans A dot matrix display is a display device used to display information on machines,
clocks, railway departure indicators and many and other devices requiring a simple
display device of limited resolution. The display consists of a matrix of lights or
mechanical indicators arranged in a rectangular configuration (other shapes are
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

also possible, although not common) such that by switching on or off selected
lights, text or graphics can be displayed. A dot matrix controller converts
instructions from a processor into signals which turns on or off lights in the matrix
so that the required display is produced.
Q-251 What are the common size of dot matrix display?
Ans Common sizes of dot matrix displays:
(1)128×16 (Two lined),
(2)128×32 (Four lined)
(3) 192×64 (Eight lined)
Q-252 What are the applications of 8051 chip?
Ans 8051 chips are used in a wide variety of control systems, telecom applications, and
robotics as well as in the automotive industry.
Q-253 Can you explain PIN 9 for 8051?
Ans PIN 9: PIN 9 is the reset pin which is used reset the microcontroller’s internal
registers and ports upon starting up. (Pin should be held high for 2 machine
cycles.)
Q-254 What are the function of PIN 40 and 20?
Ans PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. The 8051 chip
needs +5V 500mA to function properly, although there are lower powered
versions like the Atmel 2051 which is a scaled down version of the 8051 which
runs on +3V.
Q-255 What is the program start address of 8051?
Ans The 8051 starts executing program instructions from address 0x00 in the program
memory.
Q-256 What is meant by micro controller?
Ans A device which contains the microprocessor with integrated peripherals like
memory, serial ports, parallel ports, timer/counter, interrupt controller, data
acquisition interfaces like ADC, DAC is called micro controller
Q-257 Explain the operating mode 0 of 8051 serial port?
Ans In this mode serial data enters and exists through RXD, TXD outputs the shift
clock. 8-bits are transmitted or received: 8-data bits (LSB first). The baud rate is
fixed at 1/12 the oscillator frequency.
Q-258 Explain the mode 3 of 8051 serial port?
Ans In this mode, 11 bits are transmitted (through TXD) or (received (through RXD):
a start bit (0), 8 data bits (LSB first), a programmable 9th data bit and a stop bit
(1).It is same as mode 2 except the baud rate. The baud rate in mode 3 is variable.
Q-259 Explain the interrupts of 8051 micro controller?
Ans External interrupt 0 (IE0) – Highest priority
Timers interrupt 0 (TF0)
External interrupt 1 (IE1)
Timers interrupt 1 (TF1)
Serial port Interrupt
Receive interrupt (RI) - lowest priority
Transmit interrupt (TI)
Q-260 How many bytes of internal RAM and ROM supported by 8051 micro
controller?
Ans 128 bytes of internal RAM and 4 bytes of ROM.
Q-261 What are addressing modes of 8051 microcontroller?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans The MCS-51 instruction set offers several addressing modes, including
1.direct register, using ACC (the accumulator) and R0-R7
2.direct memory, which access the internal RAM or the SFRs, depending on the
address
3. Indirect memory, using R0, R1, or DPTR to hold the memory address. The
instruction used may vary to access internal RAM, external RAM, or program
memory.
4individual bits of a range of IRAM and some of the SFRs
Q-262 Define ADD instruction for 8051 microcontroller?
Ans Description: ADD and ADDC both add the value operand to the value of the
Accumulator, leaving the resulting value in the Accumulator. The value operand
is not affected. ADD and ADDC function identically except that ADDC adds the
value of operand as well as the value of the Carry flag whereas ADD does not add
the Carry flag to the result.
The Carry bit [C] is set if there is a carry-out of bit 7. In other words, if the
unsigned summed value of the Accumulator, operand and (in the case of ADDC)
the Carry flag exceeds 255 Carry is set. Otherwise, the Carry bit is cleared.
The Auxiliary Carry (AC) bit is set if there is a carry-out of bit 3. In other words,
if the unsigned summed value of the low nibble of the Accumulator, operand and
(in the case of ADDC) the Carry flag exceeds 15 the Auxiliary Carry flag is set.
Otherwise, the Auxiliary Carry flag is cleared. The Overflow (OV) bit is set if
there is a carry-out of bit 6 or out of bit 7, but not both. In other words, if the
addition of the Accumulator, operand and (in the case of ADDC) the Carry flag
treated as signed values results in a value that is out of the range of a signed byte
(-128 through +127) the Overflow flag is set. Otherwise, the Overflow flag is
cleared.
Q-263 Define AJMP instruction in 8051 microcontroller?
Ans AJMP unconditionally jumps to the indicated code address. The new value for the
Program Counter is calculated by replacing the least-significant-byte of the
Program Counter with the second byte of the AJMP instruction, and replacing bits
0-2 of the most-significant-byte of the Program Counter with 3 bits that indicate
the page of the byte following the AJMP instruction. Bits 3-7 of the most-
significant-byte of the Program Counter remain unchaged. Since only 11 bits of
the Program Counter are affected by AJMP, jumps may only be made to code
located within the same 2k block as the first byte that follows AJMP.
Q-264 Define ANL instruction in 8051 microcontroller?
Ans ANL does a bitwise [AND] operation between operand1 and operand2, leaving
the resulting value in operand1. The value of operand2 is not affected. A logical
[AND] compares the bits of each operand and sets the corresponding bit in the
resulting byte only if the bit was set in both of the original operands, otherwise the
resulting bit is cleared.
Q-265 Define CLR instruction?
Ans CLR clears (sets to 0) all the bit(s) of the indicated register. If the register is a bit
(including the carry bit), only the specified bit is affected. Clearing the
Accumulator sets the Accumulators value to 0.
Q-266 Define CPL instruction?
Ans CPL complements operand, leaving the result in operand. If operand is a single bit
then the state of the bit will be reversed. If operand is the Accumulator then all the

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

bits in the Accumulator will be reversed. This can be thought of as Accumulator


Logical Exclusive OR 255 or as 255-
Accumulator. If the operand refers to a bit of an output Port, the value that will be
complemented
Is based on the last value written to that bit, not the last value read from it.
Q-267 Define DA instruction?
Ans DA adjusts the contents of the Accumulator to correspond to a BCD (Binary
Coded Decimal) number after two BCD numbers have been added by the ADD or
ADDC instruction. If the carry bit is set or if the value of bits 0-3 exceed 9, 0x06
is added to the accumulator. If the carry bit was set when the instruction began, or
if 0x06 was added to the accumulator in the first step, 0x60 is added to the
accumulator.
The Carry bit [C] is set if the resulting value is greater than 0x99, otherwise it is
cleared.
Q-268 Define CJNE?
Ans CJNE compares the value of operand1 and operand2 and branches to the indicated
relative address if operand1 and operand2 are not equal. If the two operands are
equal program flow continues with the instruction following the CJNE instruction.
The Carry bit [C] is set if operand1 is less than operand2, otherwise it is cleared.
Q-269 Define JB instruction?
Ans JB branches to the address indicated by reladdr if the bit indicated by bit adder is
set. If the bit is not set program execution continues with the instruction following
the JB instruction.
Q-270 Define JC instruction?
Ans JC will branch to the address indicated by reladdr if the Carry Bit is set. If the
Carry Bit is not set program execution continues with the instruction following the
JC instruction.
Q-271 What are different addressing modes?
Ans A1Eight modes of addressing are available with the C8051
The different addressing modes determine how the operand byte is selected
Addressing
Modes [Instruction]
1.Register [MOV A, B ]
2.Direct [MOV 30H, A] 3.Indirect [ADD A,@R0 ]
4.Immediate Constant [ ADD A,#80H ]
5.Relative* SJMP [+127/-128 of PC ]
6.Absolute* [AJMP within 2K ]
7.Long* [LJMP FAR ]
8.Indexed [ MOVC A,@A+PC ]
Q-272 Define register addressing mode?
Ans The register addressing instruction involves information transfer between registers
Example:
MOV R0, A
The instruction transfers the accumulator content into the R0 register. The register
bank (Bank 0, 1, 2 or 3) must be specified prior to this instruction. In the Register
Addressing mode, the instruction involves transfer of information between
registers. The accumulator is referred to as the A register.
Q-273 Define direct addressing?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans This mode allows you to specify the operand by giving its actual memory address
(typically specified in hexadecimal format) or by giving its abbreviated name (e.g.
P3) Used for SFR accesses
Example:
MOV A, P3 ;Transfer the contents of ;Port 3 to the accumulator
MOV A, 020H; Transfer the contents of RAM; location 20H to the accumulator.
Q-274 Define indirect addressing mode?
Ans This mode uses a pointer to hold the effective address of the operand Only
registers R0, R1 and DPTR can be used as the pointer registers The R0 and R1
registers can hold an 8-bit address, whereas DPTR can hold a 16-bit address Used
for the upper data memory area
Examples:
1. MOV @R0, A; Store the content of; accumulator into the memory; location
pointed to by the contents; of register R0. R0 could have an; 8-bit address,
such as 60H.
2 MOVX A, @DPTR; Transfer the contents from; the memory location; pointed
to by DPTR into the; accumulator. DPTR could have a; 16-bit address, such
as1234H.
Q-275 Define immediate constrant addressing mode?
Ans This mode of addressing uses either an 8- or 16-bit constant value as the source
operand This constant is specified in the instruction, rather than in a register or a
memory location The destination register should hold the same data size which is
specified by the source operand
Examples:
ADD A,#030H ;Add 8-bit value of 30H to ;the accumulator register ;(which is an
8-bit register).MOV DPTR,#0FE00H ;Move 16-bit data constant ;FE00H into the
16-bit Data ;Pointer Register.
Q-276 Define ACALL Instruction?
Ans ACALL unconditionally calls a subroutine located at the indicated address. The
instruction increments the PC twice to obtain the address of the following
instruction, then pushes the 16-bit result onto the stack (low-order byte first) and
increments the stack pointer twice. The destination address is obtained by
successively concatenating the five high-order bits of the incremented PC, op code
bits 7-5, and the second byte of the instruction. The subroutine called must
therefore start within the same 2K block of program memory as the first byte of
the instruction following ACALL. No flags are affected.
Operation: ACAL L
(PC) ¬ (PC) + 2
(SP) ¬ (SP) + 1
((SP)) ¬ (PC7-0)
(SP) ¬ (SP) + 1
((SP)) ¬ (PC15-8)
(PC10-0) ¬ page address
Q-277 What are different instruction types?
Ans The C8051 instructions are divided into five functional groups:
1 Arithmetic operations
2 Logical operations
3 Data transfer operations
4 Boolean variable operations

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

5 Program branching operations


Q-278 Which flags are affected by arithmetic instruction?
Ans Arithmetic operations effect the flags,
such as Carry Flag (CY),
Overflow Flag (OV) etc, in the PSW register.
Q-279 What are logical operation?
Ans Logical instructions perform Boolean operations (AND,
OR, XOR, and NOT) on data bytes on a bit-by-bit basis
Q-280 What are data transfer instruction?
Ans A10Data transfer instructions can be used to transfer data between an internal
RAM location and an SFR location without going through the accumulator It is
also possible to transfer data between the internal and external RAM by using
indirect addressing The upper 128 bytes of data RAM are accessed only by indirect
addressing and the SFRs are accessed only by direct addressing.
Q-281 Define machine cycle of 8051?
Ans 8051 machine cycle consists of 6 states, S1 through S7. One state is made up of 2
clock pulses. Thus 12 clock periods constitute one machine cycle. Two clock
periods in a state is termed as phase 1 and phase 2.
Q-282 What are the alternative functions of port 3 of 8051?
Ans Serial data input (P3.0),
serial data output (P3.1),
external interrupt 0 (P3.2),
external interrupt 1 (P3.3),
external input for timer 0(P3.4),
external input for timer 1 (P3.5),
external memory write pulse (P3.6),
External memory read (P3.7) are the alternative functions of port 3.
Q-283 What are the uses of scratch pad area of internal RAM of 8051?
Ans In internal RAM 80 bytes constitutes the scratch pad area. The scratch pad bytes
can be programmed as a general purpose registers.
Q-284 What are the flags supported by 8051 controller?
Ans The flags supported by 8051 controller are:-
Carry flag
Auxiliary carry flag
Over flow flag
General purpose user flag
Register bank select bit one
Register bank select bit zero
Parity flag
Q-285 What are the different groups of instructions supported by 8051?
Ans The different groups of instructions supported by 8051 are:-
Data Transfer Group
Arithmetic Group
Logical Group
Branching Group
Bit manipulation Group
Q-286 Write about CALL statement in 8051?
Ans There are two CALL instructions. They are

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

LCALL (Long call)


ACALL (Absolute call)
Q-287 Write about the jump statement?
Ans There are three forms of jump. They are
1 LJMP (Long jump) – 16 bit address
2 AJMP (Absolute jump) – 11 bit address
3 SJMP (Short jump) – relative address
Q-288 Write a program to find the 2’s complement using 8051?
Ans MOV A, R0
CPL A
INC A
Q-289 Write a program to swap two numbers using 8051?
Ans MOV A, # data
SWAP A
Q-289 What is the significance of TXD and RXD pins in 8051?
Ans TXD – Transmit data pin for serial port in UART mode. Clock output in shift
register mode.
RXD – Receive data pin for serial port in UART mode. Data I/O pin in shift
register mode.
Q-290 What is Software and Hardware?
Ans The Software is a set of instructions or commands needed for performing a specific
task by a programmable device or a computing machine.

The Hardware refers to the components or devices used to form computing


machine in which the software can be run and tested. Without software the
Hardware is an idle machine.
Q-291 What is assembly language?
Ans The language in which the mnemonics (short -hand form of instructions) are used
to write a program is called assembly language. The manufacturers of
microprocessor give the mnemonics.
Q-292 What are machine language and assembly language programs?
Ans The software developed using 1 and 0 are called machine language, programs. The
software developed using mnemonics are called assembly language programs.
Q-293 What is the drawback in machine language and assembly language,
programs?
Ans The machine language and assembly language programs are machine dependent.
The programs developed using these languages for a particular machine cannot be
directly run on another machine
Q-294 Define bit, byte and word.
Ans A digit of the binary number or code is called bit. Also, the bit is the fundamental
storage unit of computer memory.
The 8-bit (8-digit) binary number or code is called byte and 16-bit binary number
or code is called word. (Some microprocessor manufactures refer the basic data
size operated by the processor as word).
Q-295 Why address bus is unidirectional?
Ans The address is an identification number used by the microprocessor to identify or
access a memory location or I / O device. It is an output signal from the processor.
Hence the address bus is unidirectional.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-296 What is the function of microprocessor in a system?


Ans The microprocessor is the master in the system, which controls all the activity of
the system. It issues address and control signals and fetches the instruction and
data from memory. Then it executes the instruction to take appropriate action.
Q-297 Write the flags of 8085.
Ans The 8085 has nine flags and they are
1. Carry Flag (CF)
2. Parity Flag (PF)
3. Auxiliary carry Flag (AF)
4. Zero Flag (ZF)
5. Sign Flag (SF)
Q-298 What is pipelined architecture?
Ans In pipelined architecture the processor will have number of functional units and
the execution time of functional units are overlapped. Each functional unit works
independently most of the time.
Q-299 What are the functional units available in 8085 architecture?
Ans The bus interface unit and execution unit are the two functional units available in
8085 architecture.
Q-300 List the components of microprocessor (single board microcomputer) based
system
Ans The microprocessor based system consist of microprocessor as CPU,
semiconductor memories like EPROM and RAM, input device, output device and
interfacing devices.
Q-301 What is the difference between CPU bus and system bus?
Ans The CPU bus has multiplexed lines but the system bus has separate lines for each
signal. (The multiplexed CPU lines are demultiplexed by the CPU interface circuit
to form system bus).
Q-302 Why EPROM is mapped at the beginning of memory space in 8085 system?
Ans In 8085 microprocessor, after a reset, the program counter will have OOOOH
address. If the monitor program is stored from this address then after a reset, it
will be executed automatically. The monitor program is a permanent program and
stored in EPROM memory. If EPROM memory is mapped at the beginning of
memory space, i.e., at OOOOH, then the monitor program will be executed
automatically after a reset.
Q-303 What is the need for system clock and how it is generated in 8085?
Ans The system clock is necessary for synchronizing various internal operations or
devices in the microprocessor and to synchronize the microprocessor with other
peripherals in the system.
Q-304 What is DMA?
Ans The direct data transfer between I/O device and memory is called DMA.
Q-305 What is the need for Port?
Ans The I/O devices are generally slow devices and their timing characteristics do not
match with processor timings. Hence the I/O devices are connected to system bus
through the ports.
Q-306 Write a short note on INTEL 8255?
Ans The INTEL 8255 is an I/O port device consisting of 3 numbers of 8 -bit parallel
I/O ports. The ports can be programmed to function either as an input port or as

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

an output port in different operating modes. It requires 4 internal addresses and


has one logic LOW chip select pin.
Q-307 What is the drawback in memory mapped I/0?
Ans When I/O devices are memory mapped, some of the addresses are allotted to I/O
devices and so the full address space cannot be used for addressing memory (i.e.,
physical memory address space will be reduced). Hence memory mapping is
useful only for small systems, where the memory requirement is less.
Q-308 How DMA is initiated?
Ans When the I/O device needs a DMA transfer, it will send a DMA request signal to
DMA controller. The DMA controller in turn sends a HOLD request to the
processor. When the processor receives a HOLD request, it will drive its tri-stated
pins to high impedance state at the end of current instruction execution and send
an acknowledge signal to DMA controller. Now the DMA controller will perform
DMA transfer.
Q-309 What is processor cycle (Machine cycle)?
Ans The processor cycle or machine cycle is the basic operation performed by the
processor. To execute an instruction, the processor will run one or more machine
cycles in a particular order.
Q-310 What is Block and Demand transfer mode DMA?
Ans In Block transfer mode, the DMA controller will transfer a block of data and
relieve the bus for processor. After sometime another block of data is transferred
by DMA and so on.
In Demand transfer mode the DMA controller will complete the entire .data
transfer at a stretch and then relieve the bus to processor.
Q-311 How many machine cycles constitute one instruction cycle in 8085?
Ans Each instruction of the 8085 processor consists of one to five machine cycles.
Q-312 Why status signals are provided in microprocessor?
Ans The status signals can be used by the system designer to track the internal
operations of the processor. Also, it can be used for memory expansion (by
providing separate memory banks for program & data and selecting the bank using
status signals).
Q-313 How the interrupts are affected by system reset?
Ans Whenever the processor or system is resetted , all the interrupts except TRAP are
disabled. fu order to enable the interrupts, El instruction has to be executed after a
reset.
Q-314 What is Software interrupts?
Ans The Software interrupts are program instructions. These instructions are inserted
at desired locations in a program. While running a program, if software interrupt
instruction is encountered then the processor executes an interrupt service routine.
Q-315 What is Hardware interrupt?
Ans If an interrupt is initiated in a processor by an appropriate signal at the interrupt
pin, then the interrupt is called Hardware interrupt.
Q-316 What is the difference between Hardware and Software interrupt?
Ans The Software interrupt is initiated by the main program, but the Hardware interrupt
is initiated by an external device.
In 8085, the Software interrupt cannot be disabled or masked but the Hardware
interrupt except TRAP can be disabled or masked.
Q-317 Whether HOLD has higher priority than TRAP or not?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans The interrupts including mAP are recognized only if the HOLD is not valid, hence
TRAP has lower priority than HOLD.
Q-318 What is masking and why it is required?
Ans Masking is preventing the interrupt from disturbing the current program
execution. When the processor is performing an important job (process) and if the
process should not be interrupted then all the interrupts should be masked or
disabled.
In processor with multiple interrupts, the lower priority interrupt can be masked
so as to prevent it from interrupting, the execution of interrupt service routine of
higher priority interrupt.
Q-319 When the 8085 processor accept hardware interrupt?
Ans The processor keeps on checking the interrupt pins at the second T -state of last
Machine cycle of every instruction. If the processor finds a valid interrupt signal
and if the interrupt is unmasked and enabled then the processor accepts the
interrupt. The acceptance of the interrupt is acknowledged by sending an OOA
signal to the interrupted device.
Q-320 When the 8085 processor will disable the interrupt system?
Ans The interrupts of 8085 except TRAP are disabled after anyone of the following
operations
1. Executing El instruction.
2. System or processor reset.
3. After reorganization (acceptance) of an interrupt.
Q-321 What is the function performed by Dl instruction?
Ans The function of Dl instruction is to enable the disabled interrupt system.
Q-322 What is the function performed by El instruction?
Ans The El instruction can be used to enable the interrupts after disabling.
Q-323 How the vector address is generated for the INTR interrupt of 8085?
Ans For the interrupt INTR, the interrupting device has to place either RST opcode or
CALL opcode followed by l6-bit address. I~RST opcode is placed then the
corresponding vector address is generated by the processor. In case of CALL
opcode the given l6-bit address will be the vector address.
Q-324 What happens to the 8085 processor when it is resetted?
Ans When the 8085 processor is resetted it execute the first instruction at the OOOOH
location. The 8085 resets (clears) instruction register, interrupt mask bits and other
registers.
Q-325 What are the operations performed by ALU of 8085?
Ans The operations performed by ALU of 8085 are Addition, Subtraction, Logical
AND, OR, Exclusive OR, Compare Complement, Increment, Decrement and Left
I Right shift
Q-326 What is a flag?
Ans Flag is a flip flop used to store the information about the status of the processor
and the status of the instruction executed most recently.
Q-327 Which interrupt has highest priority in 8085? What is the priority of other
interrupts?
Ans The TRAP has the highest priority, followed by RST 7.5, RST 6.5, RST 5.5 and
INTR.
Q-328 What is an ALE?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans The ALE (Address Latch Enable) is a signal used to demultiplex the address and
data lines, using an external latch. It is used to enable the external latch.
Q-329 Explain the function of IO/M in 8085.
Ans The IO/M is used to differentiate memory access and I/O access. For IN and OUT
instruction it is high. For memory reference instructions it is low.
Q-330 What is HOLD and HLDA and how it is used?
Ans Hold and hold acknowledge signals are used for the Direct Memory Access
(DMA) type of data transfer. The DMA controller place a high on HOLD pin in
order to take control of the system bus. The HOLD request is acknowledged by
the 8085 by driving all its tristated pins to high impedance state and asserting
HLDA signal high.
Q-331 What is Polling?
Ans Polling is a scheme or an algorithm to identify the devices interrupting the
processor. Polling is employed when multiple devices interrupt the processor
through one interrupt pin of the processor.
Q-332 What are the different types of Polling?
Ans The polling can be classified into software and hardware polling. In software
polling the entire polling process is govern by a prograrn.1n hardware polling, the
hardware takes care of checking the status of interrupting devices and allowing
one by one to the processor.
Q-333 What are the operating modes of 8212?
Ans The 8212 can be hardwired to work either as a latch or tri-state buffer. If mode
(MD) pin is tied HIGH then it will work as a latch and so it can be used as output
port. If mode (MD) pin is tied LOW then it work as tri- state buffer and so it can
be used as input port.
Q-334 Explain the working of a handshake output port
Ans In handshake output operation, the processor will load a data to port. When the
port receives the data, it will inform the output device to collect the data. Once the
output device accepts the data, the port will inform the processor that it is empty.
Now the processor can load another data to port and the above process is repeated.
Q-335 What are the internal devices of 8255?
Ans The internal devices of 8255 are port-A, port-B and port-C. The ports can be
programmed for either input or output function in different operating modes.
Q-336 What are the functions performed by INTEL 8251A?
Ans The INTEL 825lA is used for converting parallel data to serial or vice versa. The
data transmission or reception can be either asynchronously or synchronously. The
8251A can be used to interface MODEM and establish serial communication
through MODEM over telephone lines.
Q-337 What is an Interrupt?
Ans Interrupt is a signal send by an external device to the processor so as to request the
processor to perform a particular task or work.
Q-338 What are the control words of 8251A and what are its functions?
Ans The control words of 8251A are Mode word and Command word. The mode word
informs 8251 about the baud rate, character length, parity and stop bits. The
command word can be send to enable the data transmission and reception.
Q-339 What are the information that can be obtained from the status word of 8251?
Ans The status word can be read by the CPU to check the readiness of the transmitter
or receiver and to check the character synchronization in synchronous reception.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

It also provides information regarding various errors in the data received. The
various error conditions that can be checked from the status word are parity error,
overrun error and framing error.
Q-340 Give some examples of input devices to microprocessor-based system.
Ans The input devices used in the microprocessor-based system are Keyboards, DIP
switches, ADC, Floppy disc, etc.
Q-341 What is scanning in display and what is the scan time?
Ans In display devices, the process of sending display codes to 7 -segment LEDs to
display the LEDs one by one is called scanning (or multiplexed display). The scan
time is the time taken to display all the 7-segment LEDs one by one, starting from
first LED and coming back to the first LED again.
Q-342 What are the internal devices of a typical DAC?
Ans The internal devices of a DAC are R/2R resistive network, an internal latch and
current to voltage converting amplifier
Q-343 What is settling or conversion time in DAC?
Ans The time taken by the DAC to convert a given digital data to corresponding analog
signal is called conversion time.
Q-344 What are the different types of ADC?
Ans The different types of ADC are successive approximation ADC, counter type
ADC flash type ADC, integrator converters and voltage-to-frequency converters.
Q-345 How the microprocessor is synchronized with peripherals?
Ans The timing and control unit synchronizes all the microprocessor operations with
clock and generates control signals necessary for communication between the
microprocessor and peripherals.
Q-346 What is a minimum system and how it is formed in 8085?
Ans A minimum system is one which is formed using minimum number of IC chips,
The 8085 based minimum system is formed using 8155, 8355 and 8755.
Q-347 List the features of 8051 microcontroller?
Ans The features are
*single supply +5 volt operation using HMOS technology.
*4096 bytes program memory on chip(not on 8031)
*128 data memory on chip.
*Four register banks.
*Two multiple mode, 16-bit timer/counter.
*Extensive Boolean processing capabilities.
*64 KB external RAM size
*32 bidirectional individually addressible I/O lines.
*8 bit CPU optimized for control applications.
Q-348 Explain the operating mode2 of 8051 serial ports?
Ans In this mode 11 bits are transmitted(through TXD)or received (through RXD):a
start bit(0), 8 data bits(LSB first),a programmable 9th data bit ,& a stop bit(1).ON
transmit the 9th data bit (TB* in SCON)can be assigned the value of 0 or 1.Or for
eg:, the parity bit(P, in the PSW)could be moved into TB8.On receive the 9th data
bit go in to the RB8 in Special Function Register SCON, while the stop bit is
ignored. The baud rate is programmable to either 1/32or1/64 the oscillator
frequency
Q-349 Explain the mode3 of 8051 serial ports?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans In this mode,11 bits are transmitted(through TXD)or received(through RXD):a


start bit(0), 8 data bits(LSB first),a programmable 9th data bit ,& a stop bit(1).In
fact ,Mode3 is the same as Mode2 in all respects except the baud rate. The baud
rate in Mode3 is variable.
In all the four modes, transmission is initiated by any instruction that uses SBUF
as a destination register. Reception is initiated in Mode0 by the condition RI=0 &
REN=1.Reception is initiated in other modes by the incoming start bit if REN=1.
Q-350 Write A program to perform multiplication of 2 no’s using 8051?
Ans MOV A,#data 1
MOV B,#data 2
MUL AB
MOV DPTR,#5000
MOV @DPTR,A(lower value)
INC DPTR
MOV A,B
MOVX @ DPTR,A
Q-351 Write a program to mask the 0th & 7th bit using 8051?
Ans MOV A,#data
ANL A,#81
MOV DPTR,#4500
MOVX @DPTR,A
LOOP SJMP LOOP
Q-352 Write about CALL statement in 8051?
Ans There are two subroutine CALL instructions. They are
*LCALL(Long CALL)
*ACALL(Absolute CALL)
Each increments the PC to the 1st byte of the instruction & pushes them in to the
stack.
Q-353 Write program to load accumulator, DPH, & DPL using 8051?
Ans MOV A,#30
MOV DPH,A
MOV DPL,A
Q-354 Write a program to add two 8-bit numbers using 8051?
Ans MOV A,#30H
ADD A,#50H
Q-355 Write a program to subtract the contents of R1 of Bank 0from the contents
of R0 of Bank 2 using 8051?
Ans MOV PSW,#10
MOV A,R0
MOV PSW,#00
SUBB A,R1
Q-356 What is System?
Ans The system is a way of working, organizing or doing some task or series of tasks
by following plan, program and set of rules.
E.g.: time display system, Automatic cloth washing system.
Q-357 Define Embedded Systems.
Ans An embedded system is one that has computer-hardware with software embedded
in it as one of its most important component. Software embedded into hardware is
known as embedded systems.
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

E.g.: Mobile Phones, Elevator, Computer, etc….


Q-358 What are the components of embedded system hardware?
Ans Processor
- Program memory and data memory
- Timers
- Serial communication ports
- Input devices
- Output devices
- Power supply, Reset and Oscillator Circuits
Q-359 Classification of embedded system.
Ans - Small Scale Embedded Systems
- Medium Scale embedded Systems
- Large Scale Embedded Systems
Q-360 Define Processor.
Ans Processor is the heart of the system. A processor implements a process or
processes as per the commands given to it.
Q-361 Specify the 2 essential units of the processor in a system.
Ans - Program Flow Control Unit (CU)
- Execution Unit (EU)
Q-362 What are the types of General Purpose Processor?
Ans - Microprocessor
- Microcontroller
- Embedded Processor
- Digital Signal Processor (DSP)
- Media Processor
Q-363 Define Microprocessor.
Ans A microprocessor is a single VLSI chip that has a CPU and may also have some
other units that are additionally present and that result in faster processing of
instructions.
Q-364 Define Microcontroller.
Ans A microcontroller is a single-chip VLSI unit which, though having limited
computational capabilities, possesses enhanced input-output capabilities Ana a
number of on-chip functional units.
Q-365 What is Clock?
Ans A fixed frequency pulses that an oscillator circuit generates and that controls all
operations during processing and all timing references of the system.
Q-366 What is the process of Reset?
Ans A processor state in which the processor registers acquire initial values and from
which starts an initial program; this program is usually the one that also runs on
power up.
Q-367 Define Watchdog timer.
Ans A timer the timeout from which resets the processor in case the program gets stuck
for an unexpected time.
Q-368 What is ROM image?
Ans The final stage software embedded into hardware is known as Rom image.
Q-369 Define Assembler.
Ans An assembler translates the assembly software into machine codes using a step
called assembling.
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Q-370 Define Linker.


Ans Linker links the codes with the other required assembled codes. Linking is
necessary because of the number of codes to be linked for the final binary file.
Q-371 Define Loader.
Ans Loader program performs the task of relocating the codes after finding physical
RAM addresses available at a given instant.
Q-372 What is the use of Locator?
Ans A program called locator reallocates the linked file and creates a file for permanent
location of codes in a standard format.
Q-373 Define Compiler.
Ans A compiler assembles the codes according to the processor instruction set and
other specifications.
Q-374 What is Device driver?
Ans A device driver is software for controlling, receiving and sending a byte or a
stream of bytes from or to a device.
Q-375 Define multitasking.
Ans A task may share the memory with other task. A processor may process multiple
tasks separately or concurrently.
Q-376 What are the types of I/O devices?
Ans - Serial Input, Output
- Serial UART Input, Output
- Parallel Port Single Bit Input, Output
- Parallel Port Input, Output
Q-377 Give some example for Serial UART Input.
Ans Keypad, Mouse, Keyboard, Modem, Character inputs on serial line.
Q-378 Types of communication.
Ans - Synchronous
- Iso-Synchronous
- Asynchronous
Q-379 Define Synchronous Communication.
Ans When a byte or a frame of the data is received or transmitted at constant time
intervals with uniform phase differences, the communication is called as
synchronous.
Q-380 Define Is synchronous Communication.
Ans Communication in which constant phase difference is not maintained between the
frames but maintained within a frames.
Q-381 Define Asynchronous Communication.
Ans A communication in which a constant phase difference is not maintained and the
clocks that guide the transmitter and receiver are separate. The time interval is not
fixed.
Q-382 Give short notes on HDLC.
Ans HDLC represents a High Level Data Link Control. This is an international
standard protocol for a data link network. It is used for linking data from point to
point and between multiple points.
Q-383 Specify some states in a Timer.
Ans - Reset State
- Initial Load State

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

- Present state
- Overflow State
- Overrun State
Q-384 What is the Use of timer devices?
Ans - Real Time clock ticks.
- Initiating an event after a present delay time.
- Capturing the count vale at the timer.
- Scheduling of various tasks.
Q-385 Define I²C Bus.
Ans The two IC’s are mutually network through a common bus I s known as I²c bus.
It has two lines for carry signals. One line is for clock and one is for data. bi-
directional
Q-386 Define CAN Bus.
Ans The number of devices are networked and controlled through a network bus. It is
mainly used in automotive electronics.
Q-387 What is USB Bus?
Ans The Universal Serial Bus (USB) is a bus between a host system and a number of
interconnected peripherals. The serial devices are scanner, keyboard, printer,
etc….
Q-388 Give some example for Advanced Serial High Speed Buses.
Ans - IEEE 802.3
- XAUI
- XBI
- SONET OC-48
- SONET OC-192
Q-389 Define ISA Bus.
Ans It is a standard bus based on IBM standard architecture.
Q-390 What are PCI and PCI/X Bus?
Ans - PCI – A standard bus used as Peripheral Component Interconnect bus
- PCI/X – A standard bus used as PCI Extended Bus
Q-391 Define Master Slave Communication.
Ans A communication between two processors when one processor guides the
transmission of the bits to a slave after receiving acknowledgement from the
address slave.
Q-392 Handshaking signals.
Ans The signals before storing the bits at the port buffer or before accepting the bits
from the port buffer.
Q-393 What are the protocols used in Advanced Parallel High Speed Buses?
Ans - GMII
- XGMI
- CSIX-1
- RapidIO
Q-394 Explain the characteristics of parallel port devices.
Ans - A port device may have multi-byte data input buffer.
- A port may have a data Direction register (DDR).
- It is bidirectional.
Q-395 What are the advantages of assembly language coding?
Ans - It gives a precise control of the processor.
ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA
MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

- The machine codes are compact.


- A few assembly instruction device driver codes may need only.
Q-396 What are the advantages of high level language?
Ans - Repetitive coding redundant.
- Use of standard library function.
- Modular programming approach.
- Type checking.
- Control structures.
- Portability.
Q-397 Define Modular programming approach.
Ans It is an approach in which the large modules are divided into number of sub
modules and each module are executed separately.
Q-398 Bottom Up design.
Ans Programming is first done for the sub modules of the specific and distinct actions.
Q-399 Top-Down design.
Ans It is another programming approach, in which the main program is first designed,
then its modules, sub-modules, and finally the functions.
Q-400 What is the Inclusion files used?
Ans - Including Codes files.
- Including string data files.
- Including initial data files.
- Including header files.
- Including basic variable files.
Q-401 Define source files.
Ans Source files are program files for the application software. The source files need
to be compiled. The first function from where the processing will start is known
as main function. It codes starts with void main ().
Q-402 What is the use of configuration files?
Ans Configuration files are the files for the configuration of the system.
Eg: #include “os_cfg.h”
Q-403 What are the two types of pre-processor directives?
Ans - Pre-processor Global Variables.
- Pre-processor Constants.
Q-404 What are C program elements?
Ans - Inclusion files.
- Source files.
- Configuration files.
- Pre-processor directives.
Q-405 What are program elements?
Ans - Data types.
- Data structures.
- Modifiers.
- Statements.
- Loops.
Q-406 Define Macro function.
Ans Executes a named small collection of codes with values passed by calling program
through its aguments.
Q-407 What is Recursive function?

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA


MICROPROCESSOR AND MICROCONTROLLER VIVA QUESTIONS

Ans A function that calls itself is known as recursive function. It may be reentrant also.
Q-408 Define Queue.
Ans It is a data structure with a series of element with the first element waiting for an
operation. An operation can be done only in the first in first out (FIFO) mode.
Q-409 What are the steps involved in function calls?
Ans - Declaring a function.
- Defining statements in the function.
- Call to a function.
Q-410 Define Reentrant function.
Ans Reentrant function is usable by several tasks and routines synchronously (at the
same time). This is because all its argument values are retrievable from the stack.
Q-411 What are the 5 flags used in queue?
Ans - Qerrorflag
- hearderFlag
- trailingFlag
- CirQuflag
- PolyQuFlag
Q-412 How an object is characterized?
Ans - An identity (a reference to a memory block)
- A state ( its data, property, fields and attributes)
- A behavior (method or methods)
Q-413 Types of methods.
Ans - Method overloading
- Method overriding
Q-414 Define Method overloading.
Ans Methods can have same name in the inherited class. This is called as method
overloading.
Q-415 Define Method Overriding.
Ans Methods can have same name as well as same number of types of arguments in
the inherited class.
Q-416 What are the disadvantage of C++?
Ans - Template.
- Multiple Inheritance.
- Exceptional handling.
- Virtual base classes.
Q-417 Define Cross-compiler.
Ans The cross compiler runs on a host, but develops the machine codes for the targeted
system.
Q-418 What are the special functions of port 0 of 8051?
Ans Port 0 is used as a multiplexed low order address/data bus during the external
memory access. When ALE is enabled, the address on port 0 pins are latched and
bus is ready to act as a data bus when ALE is low.

ENGINEERING FUNDA YOUTUBE CHANNEL PROF. HITESH DHOLAKIYA

You might also like