MPMC 2 Marks
MPMC 2 Marks
01
Nadar Saraswathi College of Engineering and Technology, Date 12-11-2015
Vadapudupatti, Theni - 625 531 Total Pages
TWO MARKS
For the Academic Year 2017 - 18 (Odd/Even Semester)
TWO MARKS
UNIT-I
THE 8086 MICROPROCESSOR
1. What is microprocessor?
2. What is Accumulator?
The Accumulator is an 8-bit register that is part of the arithmetic/logic unit (ALU). 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. The accumulator is also identified as register A.
The stack is a group of memory locations in the R/W memory that is used for temporary
storage of binary information during the execution of a program
5. Write a program to add a data byte located at offset 0500H in 2000H segment to another
data byte available at 0600H in the same segment and store the result at 0700H in the same
segment.
ADD AX, [600H]; Add this to the second byte from 0600H
HLT; Stop.
6. What are the different types of addressing modes of 8086 instruction set? [Nov/Dec2013]
[Apr/May 2015]
The different addressing modes are
i. Immediate
ii. Direct
iii. Register
v. Indexed
Page 2
8. What is assembly level programming?
A program called assembler is used to convert the mnemonics of instruction and data into
their equivalent object code modules. The object code modules are further converted into
executable code using linker and loader programs. This type of programming is calledassembly
level programming.
The assembler translates the assembly language program text which is given as input to
the assembler to their binary equivalents known as object code. The time required to translate the
assembly code to object code is called access time. The assembler checks for syntax errors &
displays them before giving the object code.
The ALIGN directive forces the assembler to align the next segment at an address
divisible by specified divisor. The format is ALIGN number where number can be 2,4, 8 or 16.
Example ALIGN 8. The ASSUME directive assigns a logical segment to a physical segment at
any given time. It tells the assembler what address will be in the segment registers at execution
time. Example ASSUME CS: code, DS: data, SS: stack
Procedure Macro
Accessed by CALL & RET instruction Accessed during assembly with name to
during program execution macro when defined
Machine code for instruction is put only Machine code is generated for instruction
With procedures less memory is required With macro more memory is required
12. What is the maximum memory size that can be addressed by 8086? [April/May 2014]
[Nov/Dec 2014]
In 8086, a memory location is addressed by 20 bit address and the address bus is 20 bit
address and the address bus is 20 bits. So it can address up to one megabyte (220) of memory
space.
Page 3
13. What are the 8086 interrupt types? [Apr/May 2015]
Dedicated interrupts
• Type 3: Breakpoint
Interrupt means to break the sequence of operation. While the CPU is executing a
program an interrupt breaks the normal sequence of execution of instructions & diverts its
execution to some other program. This program to which the control is transferred is called the
interrupt service routine.
Page 4
UNIT II
2. Give any four pin definitions for the minimum mode. [Nov/Dec2008]
3. What are the pins that are used to indicate the type of transfer in minimum mode?
The M/IO, RD, WR lines specify the type of transfer. It is indicated in the following table:
Page 5
4. What are the functional parts of 8086 CPU?
i. Bus Interface Unit (BIU): BIU sends out addresses, fetches instruction from memory, reads
data from ports and memory and writes data to ports and memory.
ii. Execution Unit (EU):EU tells the BIU where to fetch instructions or data, decodes instructions
and executes instructions.
ii. Special purpose registers: They are used as segment registers, pointers, index register or as
offset storage registers for particular addressing modes.
S2, S1, S0 indicates the type of transfer to take place during the current bus cycle.
Page 6
8. Give the different segment registers. [April/May2012]
i. Code segment register: It is used for addressing a memory location in the code segment of the
memory, where the executable program is stored.
ii. Data segment register: It points to the data segment of the memory, where data is resided.
iv. Stack segment register: It is used for addressing stock segment of memory. It is used to store
stack data.
NMI is an edge-triggered input, which causes a type 2 interrupt. It is not maskable internally by
software and transition from low to high initiate the interrupt response at the end of the current
instruction. This input is internally synchronized.
Page 7
12. What is the function of pin? [April/May2011]
The logic level at pin decides whether processor operates in minimum or maximum
mode.
=0 Maximum Mode
=1 Minimum Mode
If more than one process is carried out at the same time, then it is known as
multiprogramming. Another definition is the interleaving of CPU and I/O operations among
several programs is called multiprogramming. To improve the utilization of CPU and I/O
devices, we are designing to process a set of independent programs concurrently by a single
CPU. This technique is known as multiprogramming.
14. Write the advantages of loosely coupled system over tightly coupled systems?
More number of CPUs can be added in a loosely coupled system to improve the system
performance
The system structure is modular and hence easy to maintain and troubleshoot.
A fault in a single module does not lead to a complete system breakdown.
15. What are the two modes of operations present in 8086? [May/June2007]
17. What are the differences between maximum mode and minimum mode [NOV/DEC 2003]
Minimum mode
Page 8
Maximum mode
The processor drive the status signals S2, Sl and So. Another chip called bus controller
derives control signals using this status information.
The coprocessor is a processor which specially designed for processor to work under the
control of the processor and support special processing capabilities. Example : 8087 which has
numeric processing capability and works under 8086.
19. Compare closely coupled and loosely coupled configurations. [NOV/DEC 2011]
[May/June 2016]
Closely coupled Loosely coupled
Single CPU is used
Multiple CPU modules are used
It has local bus only It has local as well system bus
UNIT III
I/O INTERFACING
1. What is memory mapped I/O? [Nov/Dec 2014]
This is one of the techniques for interfacing I/O devices with μp. In memory mapped I/O, the
I/O devices assigned and identified by 16-bit addresses. To transfer the data between MPU and
I/O devices memory related instructions (such as LDA, STA etc.) and memory control signals
(MEMR, MEMW) are used.
This is one of the techniques for interfacing I/O devices with μp. In I/O mapped I/O, the
I/O devices assigned and identified by 8-bit addresses. To transfer the data between MPU and
I/O devices I/O related instructions (IN and OUT ) and I/O control signals (IOR, IOW) are used.
Page 9
3. What is USART?
It is a programmable device. Its function and specification for serial I/O can be
determined by writing instructions in its internal registers. The Intel 8251A USART is a device
widely used in serial I/O.
The 8255A has 24 I/O pins that can be primarily grouped primarily in two 8-bit Parallel
ports: A and B, with eight bits as port C. The 8-bits of port C can be used as two 4-bit ports: C
UPPER CU and CLOWER CL.
In this mode, ports A and B are used as two simple 8-bit I/O ports and port C as two 4-bit
ports. Each port can be programmed to function as an input port or an output port. The input/
output features in mode 0 as follows:
Outputs are latched
Inputs are not latched
Ports do not have handshake or interrupt capability
Bit set reset mode (BSR)
I/O mode
Page
10
9. Write the different types of ADC.
iii. It provides multiplexed display interface with blanking and inhibit options.
The push button keys when pressed, bounces a few times, closing and opening the
contacts before providing a steady reading. So reading taken during bouncing may be faulty.
Therefore the microprocessor must wait until the key reach to steady state. This is known as key
debounce.
In N-key rollover each key depression is treated independently from all others. When a
key is depressed, the denounce logic is set and 8279 checks for key depress during next two
scans.
14. List the operating modes of 8255A and 8237A. [NOV/DEC 2015]
Page
11
2. Bit Set-Reset mode (BSR) 8237 has several modes. They are,
Single mode
Burst mode
Block mode
Demand mode
Cascade mode
When the key is depressed and released, the contact is not broken permanently. In fact, the key
makes and breaks the contacts several times for a few milliseconds before the contact is broken
permanently.
UNIT-IV
MICROCONTROLLER
The special function register are stack pointer, index pointer (DPL and DPH), I/O port
addresses, status (PSW) and accumulator.
Program status word (PSW) is the set of flags that contains the status information and is
considered as one of the special function register.
Stack pointer (SP) is a 8 bit wide register and is incremented before the data is stored into
the stack using PUSH or CALL instructions. It contains 8-bit stack top address. It is defined
anywhere in the on-chip 128-byte RAM. After reset, the SP register is initialized to 07. After
each write to stack operation, the 8-bit contents of the operand are stored onto the stack, after
incrementing the SP register by one. It is not a top-down data structure. It is allotted an address
in the special function register bank.
It is a 16-bit register that contains a higher byte (DPH) and lower byte (DPL) of a 16-bit
external data RAM address. It is accessed as a 16-bit register or two 8-bit registers. It has been
allotted two addresses in the special function register bank, for its two bytes DPH and DPL.
Page
12
5. Explain the two power saving mode of operation. [April/May2011]
The two power saving modes of operation are:
Idle mode: In this mode, the oscillator continues to run and the interrupt, serial port and
timer blocks are active, but the clock to the CPU is disabled. The CPU status is
preserved. This mode can be terminated with a hardware interrupt or hardware reset
signal. After this, the CPU resumes program execution from where it left off.
Power down mode: In this mode, the on-chip oscillator is stopped. All the functions of
the controller are held maintaining the contents of RAM. The only way to terminate this
mode is hardware reset. The reset redefines all the SFRs but the RAM contents are left
unchanged.
a. CJNE
b. CLR
c. CPL
Page
13
The features are
11. Name the five interrupt sources of 8051? [MAY/JUNE2007 & APRIL/MAY2008]
Page
14
Serial Interrupt
12. List the 8051 instructions that affect the overflow flag.
13. List the 8051 instructions that always clear the carry flag.
14. List the 8051 instructions that affect all the flags. [NOV/DEC 2007]
15. What are the different types of ADC? [APR/MAY2008 NOV/DEC 2011]
The different types of ADC are successive approximation ADC, counter type ADC
flash type ADC, integrator converters and voltage to- frequency converters.
16. Mention the number of register banks and their addresses in 8051? [Nov/Dec2015]
There are 4 register banks. They are Bank0, Bank1, Bank2& Bank3.
o RAM locations from 00 to 07H for bank 0
o RAM locations from 08 to 0FH for bank 1
o RAM locations from 10 to 17H for bank 2
o RAM locations from 18 to 1FH for bank 3
18. What are the different ways of operand addressing in 8051? [May/June 2016]
Page
15
UNIT-V
INTERFACING MICROCONTROLLERS
Timer mode 0 and 1 operations are similar for the 13 bit (mode) or 16 bit (mode 1) counter.
When the timer reaches the limits of the count, the overflow flag is set and the counter is reset
back to zero. The modes 0 and 1 can be used to time external events.
3. Define interrupt.
Interrupt is defined as request that can be refused. If not refused and when an interrupt request is
acknowledged, a special set of routine or events are followed to handle the interrupt.
There are five different ways to interrupt 8051. Two of these are from external electrical
signals. The other three are caused by internal 8051 I/O hardware operations.
The register is used to enable or disable all 8051 interrupts and to selectively enable or
disable each of the five different interrupts.
EA: Disables all interrupts
Es: Enables or disable the serial port interrupt.
ET1: Enable or disable the timer 1 overflow interrupt.
EX1: Enable or disable external interrupt 1.
ET0: Enable or disable the timer 0 overflow interrupt.
EX0: Enable or disable external interrupt 0.
6. How is the 8051 serial port different from other micro controllers? [Nov/Dec2013]
Page
16
The 8051 serial port is a very complex peripheral and able to send data synchronously
and asynchronously in a variety of different transmission modes.
A stepper motor is a device used to obtain an accurate position control of rotating shafts.
A stepper motor employs rotation of its shaft in terms of steps, rather than continuous rotation as
in case of AC or DC motor.
In this mode serial enters &exits through RXD, TXD outputs the shift clock.8 bits are
transmitted/received:8 data bits(LSB first).The baud rate is fixed at 1/12 the oscillator frequency.
Baud rate is used to indicate the rate at which data is being transferred.
11. Explain the operating mode2 of 8051 serial ports? [April/May 2009&Nov/Dec2008]
Page
17
13. Compare polling and interrupt. [May/June 2016]
The 8051 microcontroller can do only one task at a time. In polling, the microcontroller
continuously checks each port one by one according to the priority assigned to the ports, and if
any device requires service, then it provides it. In interrupt, when the device requires service, it
sends the request to microcontroller and the controller then provides service to it.
Page
18