2 Marks MPMC
2 Marks MPMC
TOTAL : 45 PERIODS
TEXT BOOKS
1. “Microprocessor and Microcontrollers”, Krishna Kant Eastern Company Edition, Prentice –
Hall of India, New Delhi , 2007.
2. R.S. Gaonkar, ‘Microprocessor Architecture Programming and Application’, Wiley
Eastern Ltd., New Delhi.
REFERENCES
1 . Muhammad Ali Mazidi & Janice Gilli Mazidi, R.D.Kinely ‘The 8051 Micro Controller and
Embedded Systems’, PHI Pearson Education, 5th Indian reprint, 2003.
2. N.Senthil Kumar, M.Saravanan, S.Jeevananthan, ‘Microprocessors and Microcontrollers’,
Oxford,2013.
UNIT I
8085 PROCESSOR
PART – A
1. What is the function of ALE in 8085 microprocessor? (April /May 2015)(RE)
It is a positive going pulse generated when 8085 begins an operation. This signal is used to
latch the low order address from the multiplexed A/D bus.
2. What is the use of stack pointer? (Nov/Dec 2015) (RE)
The stack pointer is a 16 bit register used as a memory pointer. Ti maintains the address of
the last byte entered into the stack. The stack pointer is decremented each time when data is
loaded into the stack and is incremented when data is retrieved from the stack.
3. How the address and data lines are demultiplexed in 8085? (Dec 2009) (RE)
The low order address and data lines of 8085 are demultiplexed using an external 8-bit D-
Latch (74LS373) and the ALE signal of 8085, as shown in fig.
A0 – A7
8085 74LS373
D0 - D7
AD0 – AD7 LATCH
8. List the five interrupt pins available in 8085. (May 2010) (RE)
The 8085 have five interrupt signal. TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR.
9. Compare the memory mapped I/O and standard I/O mapped I/O. (Nov/Dec 2005) (UN)
S.NO Memory Mapped I/O Standard I/O mapped I/O
1 16-bit address is allotted toan I/O device8 -bit address is allotted to an I/O device.
2 The devices are accessed by I/O read The devices are accessed by memory read
or I/O write cycle. or memory write cycle.
3 All instructions related to memory can beOnly IN and OUT instructions
used for data transfer can be used for data transfer.
4 A large number of I/O ports Only 256 ports can be interfaced.
can be interfaced.
10. What is Microprocessor? Give the power supply & clock frequency of 8085 (UN)
A microprocessor is a multipurpose, programmable logic device that reads binary
instructions from a storage device called memory accepts binary data as input
and processes data according to those instructions and provides result as output.
The power supply of 8085 is +5V and clock frequency in 3MHz.
11. What are the basic units of a microprocessor? (UN)
The basic units or blocks of a microprocessor are ALU, an array of registers and control unit.
12. What is multiplexing and what is its advantage? (RE)
Multiplexing is transferring different information at different well defined times through
same lines. A group of such lines is called multiplexed bus. The advantage of multiplexing is
that fewer pins are required for microprocessors to communicate with outside world.
13. What is the function of IO/M, READY in 8085. (UN)
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.
READY is an input signal to the processor, used by the memory or I/O devices to get extra
time for data transfer or to introduce wait states in the bus cycles.
19. What is meant by memory mapping? What is memory access time? (UN)
The memory mapping is the process of interfacing memories to microprocessor and
allocating addresses to each memory locations. The memory access time is the time taken
by the processor to read or write a memory location. During read operation it is the time
between a valid address on the bus and end of read control signal. During write operation
it is the time between a valid address on the bus and the end of write control signal.
20. What is an interrupt and how they are classified? (RE)
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.
They are three methods of classifying interrupts
Method I: The interrupts are classified into Hardware and Software interrupts
Method II: The interrupts are classified into vectored and Non-Vectored interrupt
Method III: The interrupts are classified into maskable and Non-maskable interrupt.
22. What is Polling and list the different types of polling? (UN)
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.
The polling can be classified into software and hardware polling. In software polling the
entire polling process is govern by program. In hardware polling, the hardware takes care of
checking the status of interrupting devices and allowing one by one to the processor.
23. What is the difference between wait state and bus idle condition? (UN)
During Bus idle condition the tri-stated pins of the processor are driven to high impedance
state, but during wait state they are in normal states (either low or high). The READY is not
sampled during bus idle condition but it is sampled during wait state.
PART – B
1. Interpret the functional block diagram, explain the architecture of 8085 microprocessor. (UN)
2. Summarize the pin configuration of 8085 processor and explain them in detail. (UN)
3. Explain 8085 interrupts system in detail.(UN)
4. Draw the timing diagram for I/O read operation and explain. (RE)
5. Draw the timing diagram of opcode fetch machine cycle and Memory read/write cycle. (RE)
6. Illustrate the timing diagram for the execution of instruction MVI B,08 in 8085. (AN)
7. Explain the memory organization of 8085 processor. (RE)
8. Draw and explain the timing diagram of LDA, address in 8085. (AN)
UNIT II
PROGRAMMING OF 8085 PROCESSOR
PART – A
4. How the time delay generated using subroutine? (April/May 2015) (UN)
A subroutine is a graph of instructions written separately from the main program
to perform a function that occurs repeatedly in the main program.
For example, if a time delay is required, delays can be written in the main
program.
To avoid repetition of the same delay instructions, time subroutine technique is
used.
11. Write an 8085 program to generate a time delay of 0.4sec given crystal frequency
5MHZ. (EV)
Operating frequency = 5/2 = 2.5MHZ.
Time for one T-state = 1/ 2.5MHZ = 0.4sec.
Number of T-states required = Required Time/Time for 1T-state
= 0.4sec/ 0.4sec
= 1 x 106
Delay program:
LXI B,COUNT
Loop : DCX B
MOV A,C
ORA B
JNZ Loop
1 x 106 = 10 + (count – 1) x24 +21
Count = 4166610
= A2C2H.
12. What is the similarity and difference between SUB and CMP instruction? (UN)
Similarity: Both the subtraction and comparison are performed by subtracting two data in acc
and flags are altered depending upon the result.
Difference: After the execution of SUB instruction, the result is stored in acc, but after the
execution of compare instruction the result is discarded.
13. What is DAA? (UN)
DAA- Decimal Adjust Accumulator.
After BCD addition, this instruction is executed to get the result in BCD. When
DAA instruction is executed the content of the acc is altered or adjusted as explained
below:
(i) If the sum of lower nibble exceeds 09 or auxiliary carry is set , a correction 06 is
added to lower nibble.
(ii) If the sum of higher nibble exceeds 09 or auxiliary carry is set , a correction 06 is
added to lower nibble.
14. What is the difference between conditional and unconditional branching instructions?
(RE)
In unconditional branch instructions the program control is transferred to branch
address without checking any flag condition. But in conditional branch instructions, a flag
condition is checked and only if the flag condition is true, the program control is transferred
to branch address. Otherwise next instruction is executed.
15. What is DAD and what are the flags affected by this instruction? (UN)
DAD refers Double Addition. This instruction is used to perform addition of two 16-bit
numbers. Syntax: DAD rp.
The content of rp is added to the content of HL pair. After the addition the result will be in
HL pair. The register pair can be BC, DE, HL or Stack pointer.
16. What is the difference between CALL and JMP instruction? (UN)
In CALL instruction, the address of next instruction is pushed into stack before transferring
the program control to call address. But in JMP instruction, the address of next instruction is not
saved.
17. Explain EI and DI. (UN)
DI – Disable Interrupt. When the instruction is executed all the interrupts except TRAP are
disabled. When the interrupts are disabled the processor will not accept or recognize the
interrupt.
EI – Enable Interrupt. This instruction is used or executed to allow the after disabling.
18. State the difference between LDA and LDAX instructions. (RE)
The LDA instruction uses direct addressing mode to load a data byte from memory to
accumulator, but LDAX instruction uses register indirect addressing for the same operation.
In LDA instruction the content of memory location whose address is given in the instruction
is moved to accumulator. In LDAX instruction a register [pair contains the address of the
memory location. The content of memory location whose address is available in register pair
is moved to accumulator.
19. What is the function performed by SIM instruction and RIM instruction? (RE)
SIM – Set Interrupt Mask – the SIM instruction is used to mask the hardware interrupts RST
7.5, RST6.5, and RST 5.5. The execution of SIM instruction output the content of
accumulator to program interrupt mask bits and also used to output serial data on the SOD
line.
RIM – Read Interrupt Mask – the RIM instruction is used to check whether an interrupt is
masked or not. It is also used to read the data from SID line.
20. State the difference between STA and STAX. (UN)
The STA instruction uses direct addressing mode to store the content of the accumulator to a
memory location, but STAX instruction uses indirect addressing mode to the same
operation.
21. What is the function XCHG? (UN)
The content of HL register pair is exchanged with DE pair. No flags are affected.
Example: Before execution: DE – 4500; HL – 6000
After execution: DE – 6000; HL – 4500
37. In which unit is the arithmetic and logical operations performed. Which unit is the
destination of the result? (UN)
The arithmetic and logical operations are performed in ALU. After the operation, the
result will be stored in the accumulator.
PART – B
1. With suitable examples, explain the function of various data transfer and data manipulation
instructions of 8085. (UN)
2. Discuss the organizations of the 8085 stack and the various instructions that will operate on
the stack.(UN)
3. Explain the sequence of events in the execution of CALL and RET instructions. (UN)
4. With example explain the different addressing modes of 8085 and the different types of
instruction.(RE)
5. Explain the instruction set of 8085 with examples.(RE)
6. Explain the loop structure with counting and indexing in 8085 programming. (AN)
7. Write an assembly language program based on 8085 microprocessor instruction set to search
the smallest data in a set. (AP)
8. Write an assembly language program based on 8085 microprocessor instruction set to find
the square root of the given number. (AP)
9. Write an assembly language program based on 8085 microprocessor instruction set for
arranging a array of 8bit unsigned number in ascending order. (AP)
10. Compare the similarities and difference of CALL and RET instructions with PUSH and POP
instructions. (UN)
UNIT – III
8051 MICROCONTROLLER
1. What are the I/O instructions used in 8051? (Nov/Dec 2014) (RE)
IN and OUT instructions is a I/O instruction.
The IN instructions is used to move data from an I/O port into the accumulator.
The OUT instruction is used to move data from the accumulator to an I/O port.
2. Write the instruction format for 8051 microcontroller? (April/May 2015) (RE)
The instruction format generally made up of three parts mnemonic destination operand
and source operand.
Menimonic Operands
5. What are the various flags used 8051? (Dec 2013) (RE)
Sign flag, Zero flag, Auxiliary carry flag, Parity flag, Carry flag
6. Mention the function of EA in 8051 microcontroller. (May 2014) (RE)
EA: EA stands for external access. When the EA pin is connected to Vcc, program fetched to
addresses 0000H through 0FFFH are directed to the internal ROM and program fetches to
addresses 1000H through FFFFH are directed to external ROM/EPROM. When the EA pin is
grounded, all addresses fetched by program are directed to the external ROM/EPROM.
9. State the function of RS1 and RS0 bits in the flag register of intel 8051
microcontroller? (UN)
RS1 , RS0 – Register bank select bits
RS1 RS0 Bank Selection
0 0 Bank 0
0 1 Bank 1
1 0 Bank 2
1 1 Bank 3
10. Write a program using 8051 assembly language to change the date 55H stored in the
lower byte of the data pointer register to AAH using rotate instruction. (AN)
MOV DPL,#55H
MOV A, DPL
RL A
Label :SJMP label
11. Give the alternate functions for the port pins of port3? (UN)
23. What are the operating modes of the timer of 8051? (RE)
The operating modes of the timers of 8051 are mode-0, mode-1, mode-2 and mode-3. In
mode-0 the timers will function as 13-bit timers and in mode-1 the timers will function as 16-
bit timers will function as 16- bit timers. In mode-2 the timers will function as 8-bit timers
with auto reload feature. The timer-0 alone can work in mode-3 and in this mode the TL0
will function as 8-bit timer controller by standard timer-0 control bits and TH0 will function
as 8-bit timer controlled by the timer-1 control bits.
28. How the 8051 controller differentiates external program memory access and internal
memory access? (UN)
With external program memory the controller can perform only read operation but with
external data memory the controller can perform both read and write operation. For reading
program memory the controller asserts /PSEN as low. For reading data memory the
controller asserts /RD as low, and for writing data memory the controller asserts /WR as low.
25. What is ISR? (UN)
The program which is associated with the interrupt is called Interrupt service Routine or
Interrupt handler. When an interrupt is invoked, the microcontroller runs the ISR. For every
interrupt, there is a fixed location in memory that holds the address of its ISR. The group of
memory locations set aside to hold the addresses of ISR is called the interrupt vector table.
27. How to estimate the time taken to execute an instruction in 8051 controller?
The time taken to execute an instruction by 8051 controller is obtained by multiplying the time
to execute a machine cycle by the number of machine cycles of the instruction. The time to
execute a machine cycle is 12 clock periods.
.˙. Time to execute an instruction = C*12*T = C*12 / f
Where C – Number of machine cycles of an instruction
T – Time period of crystal frequency in sec.
f – Crystal frequency.
28. What is the function of ALE pin in microcontroller 8051? (RE)
Address Latch Enable is an output pin and is active high. When connecting an 8051 to
external memory, port 0 provides both address and data. In other words the 8051 multiplexes
address and data through port 0 to save pins. The ALE pin is used for demultiplexing the address
and data by connecting to the G pin of the 74LS373chip.
32. How the program memory is organized in 8051 based system? (UN)
In 8051 based system the entire 64Kb program memory can be external or 4Kb I internal and the
remaining 60Kb is external. This is decided by the logic level of the signal at /EA pin. When /EA
pin is tied high the first 4Kb of program memory is internal and remaining 60Kb is external.
When /EA pin is tied low the internal ROM is ignored and entire 64Kb is external.
UNIT – IV
PERIPHERAL INTERFACING
3. List out the operating modes in 8254 Timer/Counter. (RE) (Nov /Dec 2014)
Mode 0: Interrupt on terminal count
Mode 1: Programmable one-shot
Mode2: Rate generator
Mode 3: Square wave generator
Mode4: Software triggered mode
Mode5: Hardware triggered mode
4. Mention the registers used for serial communication in 8051 microcontroller. (RE)
(Nov /Dec 2014)
PCON, SCON, TMOD, TCON
5. What is the need for interrupt controller? (RE)
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.
6. List some of the features of INTEL 8259 (Programmable Interrupt Controller )(RE)
It manages eight interrupt requests.
The interrupt vector addresses are programmable.
The priorities of interrupts are programmable.
The interrupt can be masked or unmasked individually.
7. Write the various functional blocks of INTEL 8259?(UN)
The various functional blocks of 8259 are Control logic, Read/ Write logic, Data bus
buffer, IRR, ISR, IMR, Priority resolver and cascade buffer
IRR - Interrupt Request Register
ISR - In-Service Register
IMR Interrupt Mask Register
8. What is Master and Slave 8259? (UN)
When 8259's are connected in cascade, one 8259 will be directly interrupting 8085 and it is
called master 8259, To each interrupt request input of master 8259, one slave 8259 can be
connected, The 8259 's interrupting the master 8259 are called slave 8259.
9. How 8259 is programmed? (UN)
The 8259 is programmed by sending
i) Initialization Command Words (ICWs) and
ii) Operational Command Words (OCWs).
10. What are the functions of 8259 that are programmed using ICW’s? (UN)
The ICW’s are used to program the following features of 8259:
Call address interval
Cascade mode or single mode
Level or edge triggered
Vector address or type number
8085 or 8086 mode
auto or normal end of interrupt
Special fully nested mode.
11. What is the difference in programming master 8259 and slave 8259? (UN)
The ICW 3 will be different for master 8259 and slave 8259. for master, the ICW 3 will
inform the IR input that are having slaves. For slave, the ICW3 will inform it has slave ID
number.
12. What is a programmable peripheral device? (UN)
If the functions performed by a peripheral device can be altered or changed by a program
instruction then the peripheral device is called programmable device. Usually the
programmable devices will have control registers. The device can be programmed by
sending control word in the prescribed format to the control register.
13. What is handshake port? (UN)
In handshake port, signals are exchanged between I/O device and port or port and processor
for checking or informing various condition of the device.
14. Explain the working of a handshake input port. (UN)
In handshake input operation, the input device will check whether the port is empty or not. If
the port is empty then it will load data to port. When the port receives the data, it will inform
the processor for read operation. Once the data have been read by the processor, the port will
signal the input device that it is empty. Now the input device can load another data to port
and the above process is repeated.
15. What are the functions performed by port-C of 8255? (RE)
The port-C pins are used for handshake signals.
Port-C can be used as an 8-bit parallel 1/0 port in mode-0.
It can be used as two numbers of 4-bit parallel port in mode-0.
The individual pins of port-C can be set or reset for various control
16. What are the different scan modes of 8279? (RE) Nov / Dec 2010
The different scan modes of8279 are decoded scan and encoded scan. In decoded scan mode,
the output of scan lines will be similar to a 2-to-4 decoder. In encoded scan mode, the output of
scan lines will be binary count, and so an external decoder should be used to convert the binary
count to decoded output.
17. What is baud rate? (RE)
The baud rate is the rate at which the serial data are transmitted. Baud rate is defined as l/
(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.
18. What are the functions performed by INTEL 8251A? (RE)
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.
19. What are the control words of 8251A and what are its functions? (RE)
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.
20. What is the difference in programming the 8279 for encoded scan and decoded scan?
If the 8279 is programmed for decoded scan then the output of scan lines will be decoded output
and if it is programmed for, encoded scan then the output of scan lines will be binary count. In
encoded mode, an external decoder should be used to decode the scan lines.
21. What are the different types of ADC? (RE)
The different types of ADC are successive approximation ADC, counter type ADC flash type
ADC, integrator converters and voltage-to-frequency converters.
22. What is DMA Controller? (RE)
Direct Memory Access is an I/O technique used for high speed data transfer. In DMA, the MPU
releases the control of the buses to a device called a DMA controller. The controller manages
data transfer between memory and a peripheral under its control, thus bypassing the MPU.
23. Explain the function of in-service register, masking register and interrupt request
register of 8259? (UN)
In-service Register: ISR stores all the levels that are currently being serviced.
Masking Register: IMR stores the masking bits of the interrupt lines to be
masked.
Interrupt Request Register: IRR stores the interrupt request, when interrupt
request lines goes high.
24. What is synchronous data transfer scheme? (UN)
In synchronous data transfer scheme, the processor does not check the readiness of the device
after a command has been issued for read/write operation. In this scheme the processor will
request the device to get ready and then read/write to the device immediately after the request.
25. What is asynchronous data transfer scheme? (UN)
In asynchronous data transfer scheme, first the processor sends the 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.
34. Write a program segment to initialize a single 8259 connected to 8085 processor. (AP)
MVI A, ICW1
OUT 00
MVI A, ICW2
OUT 01
MVI A, OCW1
OUT 01
HLT
40. How the RS232 serial bus is interfaced to TTL logic device?(RE)
The RS232 signal voltage levels are not compatible with TTL logic levels. Hence for
interfacing TTL devices using RS232 serial bus, level converters are used. The popularly
used level converters are MC 1488 and MC 1489 or MAX232.
41. What is the advantage in using INTEL 8279 for keyboard and display interfacing?(RE)
When 8279 is used for keyboard and display interfacing, it takes care of the entire task involved
in keyboard scanning and display refreshing. Hence the processor is relieved from the task of
keyboard scanning, debouncing, keyboard generation and display refreshing, and so the
processor time can be more efficiently used for computing.
Part - B
1. Explain the architecture of USART 8251 in detail with neat block diagram and describe the
mode, command and status control words in it. (RE)
2. With neat block diagram, explain the architecture of 8259 PIC. (UN)
3. With necessary diagrams explain the different modes of operations of 8253
Timer/Counter.(RE)
4. Explain the functional block diagram of 8255 PPI in detail. (RE)
5. With necessary diagrams explain the different modes of operations of 8279 Keyboard display
controller.(RE)
6. Summarize the interfacing ADC with 8051 microcontroller. (RE).
UNIT V
MICRO CONTROLLER PROGRAMMING AND APPLICATIONS
10. Write a program to copy a block of 10 bytes of data from RAM locations starting at 35
to RAM locations starting at 60. (EV)
MOV R0, #35
MOV R1, # 60
MOV R3, #10
BACK: MOV A, @R0
MOV @R1,A
INC R0
INC R1
DJNZ R3,BACK
17. What are the various control knobs available in washing machine? (RE)
Load select knob, water inlet knob, mode select knob, program select knob
18. What are the advantages of subroutine? (RE)
Modular programming: the various tasks in a program can be developed as separate
modules and called in the main program.
Reduction in the amount of work a program development time.
Reduces memory requirement for program storage.
Part-B