DB g)
Microprocessors and Microcontrollers Questions
oa
ES
eee aren poeta) Ps
Start Complete Exam Preparation
eR Rete
Giese roca
CO tie Coreen
Download App
MCQ Question 1 View this Question Online >
Which of the following are the two 16 bit SFRs of Microcontroller 8051?
1. PC,DPTR
2. SP PSW
3. SPR DPTR
4. PC,SP
Answer (Detailed Solution Below)
Option 1: PC, DPTR
Microprocessors and Microcontrollers MCQ Question 1 Detailed Solution
Microcontroller 8051:
+ Microcontrollers are embedded inside devices to control the action and feature of a product or
equipment.
+ So they can also be referred to as embedded controllers. They run one specific program and are
dediceted to a single task.
+ They are low power devices with dedicated input devices and small LED or LCD display outputs.
+ Microconiroller 8051 is designed by Intel in 1981.
+ Itis an 8-bit microcontroller. [tis built with 40 pins DIP (Dual inline package), 4 KB of ROM
storage and 128 bytes of RAM storage, two 16-bit times.
+ It consists of four parallel 8-bit parts, which are programmable as well as addressable as per the
requirement.Features of 8051 Microcontroller:
+ 4.KB on-chip program memory (ROM)
* 128 bytes on-chip data memory (RAM)
+ Four register lanks
+ 8-bit bidirectional data bus
+ 16-bit unidirectional address bus
+ 32 general purpose resisters each of 8-bit
+ 16 bittimers
Applications of microcontroller 8051:
+ Automobiles
+ Aeronautics
+ Space
+ Robotics
+ Electronics
+ Defence application
+ Mobile communication
+ Rail transport
+ Industrial processing
+ Medical application
‘SFR's (special function registers):
+ There are 21 SFRs (special function registers) in microcontroller 8051. The SFR is the upper area
of addressable memory, from address OX80 to OXff
+ These SFR's contain all peripherally related register like PO, P1, P2, P3, timers or counters, serial
part and interrupt related registers.
+ DPTR - Data pointer is the 8051's only user-accessible 16 bit (2 - byte) register. DPTR is meant
for pointing to data. It is used by the 8051 to access extemal memory using the address
indicated by DPTR. It is used to stone 2-byte value.
+ 16-bit data pointer Is physically the combination of DPL (Date Pointer Low) and DPH (Data
Pointer High) SFRs.
+ The data pointer can be used as a single bit (16-bit) register (as DPTR) or two 8-bit registers as
DPL and DPH.
PSW (Program status word register)
+ Itis an 8-bit register.
+ Itis also referred to flag register.
* It contains status bits that reflect the current CPU state.
+ Although PSW register is 8-bit wide, only 6-bits of it are used by the 8051 microcontroller. The
‘two unused bit are user-definable flags.
‘Stock pointer (SP):
+ The register used to access the stack is known as stock pointer register.
+ [tis 8-bits wide and can take value of 00 to FFH
+ When 8051 is initialized, the SP register contains the value of 07H which means the RAM
location 08 is the first location used for the stock* It tells the location focus where the n™ value is to be removed from the stock.
+ When value is pushed onto the stack, the value of SP is incremented and then the value is
stored at the resulting memory location.
+ When a value is popped off the stock, the value is returned from the memory location indicated
by SP, anc then the value of SP is decremented.
PC (Program counter):
+ Itis a two byte (16-bit) address which tells the 8051 where the next instruction to execute can be
found in the memory.
+ PC starts at 0000 when 8051 initializes and is incremented every time after an instruction is
executed.
+ PCis not always incremented by 1 since same instructions may require 2 or 3 bytes, in such
cases, PC will be incremented by 2 or 3.
* Branch, Jump and Interrupt operations load the PC with an address other than the next
sequential location.
Note’
Registers | Bits
DPTR 16 bits
PC 16 bits
SP 8 bits
PSW 8 bits
ees ete)
Start Complete Exam Preparation
PoE Soa
Taio [aq] Practice ees
Rca oes ca
Download App
exotic?
MCQ Question 2 View this Question Online >
There are 3 types of ‘bus’ in a microprocessor; out of them two are data ‘bus’ and address
‘bus’, the third one is1. Program
2. Flag
3. Control
4. Serial
Answer (Detailed Solution Below)
Option 3: Control
Microprocessors and Microcontrollers MCQ Question 2 Detailed Solution
Aset of parallel connecting lines is called a bus.
In 8085 microprocessor 3 sets of buses are used they are
+ Address bus,
+ Data bus and
* Control bus.2
ere ea ecu
PS Ela Orel lM Ce eh)
Reon hess
cal PUT Practice aie)
CCS caer Correa Exerie2?
Download App
MCQ Question 3 View this Question Online >
Cycle stealing mode of DMA operation involves
1. DMA-controlled taking on the address, data and contral buses, while a block of data is
transformed between memory and the 1/0 device
2.. While the microprocessor is executing a programme, an interface circuit takes control of the
address, data and control buses, when not In use by the microprocessor
3. The data transfer takes place, between I/O device and memory during every alternate clock
cycle
4, The DMA controller working for the microprocessor to finish execution of the programme and
then takes over the buses
Answer (Deiailed Solution Below)
Option 2: While the microprocessor is executing a programme, an interface circuit takes control of the
address, data and control buses, when notin use by the microprocessor
Microprocessors and Microcontrollers MCQ Question 3 Detailed Solution
There are three modes of DMA operation:
1. Burst mode DMA,
+ the CPU can be put on hold while the DMA transfer occurs and a full block of possibly hundreds
or thousands of bytes can be moved
+ For the entire duration of the transfer, the CPU stays idle end the DMA controller and the
peripheral device gets complete access to the system buses
2. Transparent mode
+ It takes the most time to transfer a block of data, yet it is also the most efficient made in terms
of overall system performance+ In transparent mode, the DMA controller transfers data only when the CPU is performing
operations that do not use the system buses
3. Cycle stealing mode
+ In this only one byte of data transferred in a single request, after one byte of data transfer, the
control of the system bus is given back to the CPU transferring one byte of data per request, until
the entire block of data has been transferred.
ieee er ar
Start Complete Exam Preparation
ic } Ledijaies Practice
ol) oreeates
Download App
MCQ Question 4 View this Question Online >
How many bits are used in the data bus of 8051 ?
1.8 3
2 16
3. 32
4. 24
Answer (Detailed Solution Below)
Option 1:8
Microprocessors and Microcontrollers MCQ Question 4 Detailed Solution
+ 8051 is an 8-bit\(data bus) microcontroller built with 40 pins DIP (dual inline package).
+ 8051 has internal RAM (128 Bytes) and ROM (4K Bytes)
+ Of the 128-byte Intemal RAM, only 16 bytes are bit addressable. The rest must be accessed in
byte format.
Notes:The Block Diagram of an 8051 microcontroller is as shown:
Exjemd| Counter
Interrupt fut
2s tL
Interrupts 4k 128 Timer 4
Control || FLASH || RAM Timer 0
y
CPU
Bus Bus
baad Control See Control
Lam Po P2 Pl P3
Address/Data
In.an 8051 microcontroller,
+ Internal RAM (data memory) -128 bytes
+ Internal memory (code memory) -4 kB (ROM)
+ Timer/counter - 2
+ No. of interrupt -5
+ 1/0 pins - 32
+ Serial port-1
a
Cs
India's #4 Learning Platform
Start Complete Exam Preparation
Pr ege fees Degas
De tierce Question Bank poor ce
Download App
MCQ Question 5 View this Question Online >
The function of ALE signal in 8051 microcontroller is
1. To extend the memory capacity
2. To control demuttiplexing the address and data bus
3. To distinguish between external RAM and PROM
4. To initialize parallel portAnswer (Detailed Solution Below)
Option 2: To control demultiplexing the address and data bus.
Microprocessors and Microcontrollers MCQ Question 5 Detailed Solution
ALE:
The Pin 30 of 8051 microcontroller is used for ALE that is Address Latch Enable.
+ Itis an activehigh input control signal.
+ ALE signal is used for demultiplexing the multiplexed Address/Data bus of Port 0 during external
memory interfacing
+ In each machine cycle, there are 2 ALE pulses
+ ALE is also used to check whether the device is working or not.2
ere ea ecu
PS Ela Orel lM Ce eh)
Reon hess
cal PUT Practice aie)
CCS caer Correa Exerie2?
Download App
MCQ Question 6 View this Question Online >
The System program used to translate directly an assembly language to machine
language is called
1. Compiler
2. Assembler
3. Text editor
4, Debugger
Answer (Detailed Solution Below)
Option 2: Assembler
Microprocessors and Microcontrollers MCQ Question 6 Detailed Solution
Assembler:
+ An assembler is a program that converts the assembly language into machine code.
+ Ittakes the basic commands and operations from assembly code and converts them into binary
code that can be recognized by a specific type of processor.
+ Assemblers are similar to compilers in that they produce executable code. However, assemblers
are more simplistic since they only convert low-level code (assembly language) to machine
code.
+ Since each assembly language is designed for a specific processor, assembling @ program is.
performed using a simple one-to-one mapping from assembly code to machine code.
+ Compilers, on the other hand, must convert generic high-level source code into machine code for
a specific processor.
Assembly language (input) — Assembler — relocatable machine code (output)
Source program (input) — preprocessor — modified source program (output)Relocatable machine code (input) — linker/loader — target machine code (output)
Modified source program (input) — compiler — assembly language (output)
important Point
Compil
Acompiler is a computer program (or a set of programs) that converts the source code (written in the
high-level language) into machine language.
Interpreter:
An interpreter is a computer program that directly executes, i. performs, instructions written in @
programming or scripting language, without previously compiling them into a machine language
program,
Debugger:
A debugger or debugging tool is a computer program used to test and debug other programs.
rag
* India's #1 Learning Platform Tere
Start Complete Exam Preparation
Preurd Practice
De cher oe eres eucs
Download App
MCQ Question 7 View this Question Online >
The number of pins in micro processor 8086 is
1. 30
2. 40
3. 50
4. 60
Answer (Detailed Solution Below)
Option 2: 40Microprocessors and Microcontrollers MCQ Question 7 Detailed Solution
8086 is 2 40 pin DIP (Dual In-Line Package) that uses MOS technology. The pin diagram for 8086 is as
shown:
eno “40 = Vic
AD,, | 2 39 | AD,
AD). —| 3 38 | AD, IS,
AD), >} 4 37 = AD,/S,
AD, 1 5 36 | AD,,/S,
AD, | 6 35 > AD,,/S,
AD, z 34 | BHEIS,
AD, 8 33 }— MNIMX
AD, 32+ Rp
AD, 8086 31} HOLD (RQ/GT,)
AD, 30} HLDA (RQ/GT,)
AD, 12 29+ WR = (LOCK)
AD, 113 28}— iio (S,)
AD; 114 27-—oTR = (8,)
AD, 415 26} DEN (S,)
AD, 16 25} ALE (QS,)
NMI 17 24} iInTA (QS,)
INTR —}18 23} TEST
cLK —}19 22 |— READY
GND —}20 21} RESET
+ Ithas 2 GND's (Ground) as the circuits complexity demands a large amount of current flowing
through the circuits, and multiple grounds help in dissipating the accumulated heat etc.
+ 8086 works an two modes of operation: Maximum made and Minimum mode
od
Ie se rela Ree oe
Start Complete Exam Preparation
Pea esc ena
panos
DE Ciera (ores
Download App
MCQQuestions View this Question Online >Which one of the following is correct with respect to microcontrollers?
1. Integration of a microprocessor with I/O interfaces and memory and other peripherals ina single
IC chip
2. Asingle very large scale integrated (VLSI) chip that contains programmable electronic
components that perform control functions
3. Digital circuit for data handling and computation
4, The primary computation and system control
Answer (Detailed Solution Below)
Option 1 : Integration of a microprocessor with I/O interfaces and memory and other peripherals in a
single IC chip
Microprocessors and Microcontrollers MCQ Question 8 Detailed Solution
Concept:
Amicrocontroller is a compact integrated circuit designed to govern a spectic operation in an embedded system
‘The typical microcontroller includes a processor, memory and inputioutput (1/0) peripherals on a'single chip.
Microcontrollers are used in automatically controlled products and devices, such as automobile engine control
systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other
embedded systems.
Following factors are to be considered while selecting a micro controller:
() Memory requirements
(li) Processing speed required
(iil) Number of input/output pins
(iv) Interfaces required
(v) The number of interrupts required2
ere ea ecu
PS Ela Orel lM Ce eh)
Reon hess
CCS caer Correa Exerie2?
Download App
cal PUT Practice aie)
MCQ Question 9 View this Question Online >
The 8051 can handle ______ interrupt sources.
Answer (Detailed Solution Below)
Option 4:5
Microprocessors and Microcontrollers MCQ Question 9 Detailed Solution
Explanation:
An interrupt is an event that occurs randomly in the continuation of something depending upon call
priority, you decide whether to neglect or attend it.
8051 architecture handles 5 interrupt sources, out of which two are internal (Timer interrupts), two are
external and one is a serial interrupt. Each of their interrupts has its vector address.
The highest interrupt priority upon reset in 8051 is external interrupt 0.IPriority| Interrupt source interrupt Bit / flag
1 [External interrupt INTO
2 | Timer interrupt 0 TFO
3. [External Interrupt 1 INT1
4° | Timer interrupt 1 TFA
5 | Serial interrupt TIRE
Hence option (4) is the correct answer.
As per 8051 interrupt priority, the lowest priority interrupts are not served until the microcontroller is
finished with higher prority interrupts.
Bere ea sc
Start Complete Exam Preparation
(Ea) Daily Live are) acd
is) ar
DOS tei Question Bank
Download App
MCQ Question 10
‘View this Question Online >
Name of the register which stores the address of the next instruction to be executed in
8085 in microprocessor
1. Stack pointer
2. Accumulator
3. Program counter
4, Index registerAnswer (Detailed Solution Below)
Option 3: Program counter
Microprocessors and Microcontrollers MCQ Question 10 Detailed Solution
Program counter (PC):
+ The program counter acts as a pointer to the next instruction to be executed and always
contains the 16-bit address of the memary location of the next instruction
+ [tis a 16-bit register as 8085 has 16 address lines
+ The program counter is updated by the processor and points to the next instruction after the
processor has fetched the complete instruction.
Bj important Point
‘Stack Pointer:
+ Stack Pointer is also a special purpose register that is used to point the location of the top of the
stack.
+ Since location is specified using 16 bits, the stack pointer is a 16-bit register.
Accumulator: An accumulator is a register in which intermediate, arithmetic and logic results are
stored