EC8691 MICROPROCESSORS AND MICROCONTROLLERS LTPC
3003
OBJECTIVES:
• To understand the Architecture of 8086 microprocessor.
• To learn the design aspects of I/O and Memory Interfacing circuits.
• To interface microprocessors with supporting chips.
• To study the Architecture of 8051 microcontroller.
• To design a microcontroller based system
UNIT I THE 8086 MICROPROCESSOR 9
Introduction to 8086 – Microprocessor architecture – Addressing modes - Instruction set and
assembler directives – Assembly language programming – Modular Programming - Linking and
Relocation - Stacks - Procedures – Macros – Interrupts and interrupt service routines – Byte and String
Manipulation.
UNIT II 8086 SYSTEM BUS STRUCTURE 9
8086 signals – Basic configurations – System bus timing –System design using 8086 – I/O
programming – Introduction to Multiprogramming – System Bus Structure – Multiprocessor
configurations – Coprocessor, Closely coupled and loosely Coupled configurations – Introduction to
advanced processors.
UNIT III I/O INTERFACING 9
Memory Interfacing and I/O interfacing - Parallel communication interface – Serial communication
interface – D/A and A/D Interface - Timer – Keyboard /display controller – Interrupt controller –
DMA controller – Programming and applications Case studies: Traffic Light control, LED display ,
LCD display, Keyboard display interface and Alarm Controller.
UNIT IV MICROCONTROLLER 9
Architecture of 8051 – Special Function Registers(SFRs) - I/O Pins Ports and Circuits - Instruction set
- Addressing modes - Assembly language programming.
UNIT V INTERFACING MICROCONTROLLER 9
Programming 8051 Timers - Serial Port Programming - Interrupts Programming – LCD & Keyboard
Interfacing - ADC, DAC & Sensor Interfacing - External Memory Interface- Stepper Motor and
Waveform generation - Comparison of Microprocessor, Microcontroller, PIC and ARM processors
TOTAL: 45 PERIODS OUTCOMES:
At the end of the course, the students should be able to:
• Understand and execute programs based on 8086 microprocessor.
• Design Memory Interfacing circuits.
• Design and interface I/O circuits.
• Design and implement 8051 microcontroller based systems.
TEXT BOOKS:
1. Yu-Cheng Liu, Glenn A.Gibson, ―Microcomputer Systems: The Family - Architecture,
Programming and Design‖, Second Edition, Prentice Hall of India, 2007. (UNIT I- III)
2. Mohamed Ali Mazidi, Janice Gillispie Mazidi, Rolin McKinlay, ―The 8051 Microcontroller and
Embedded Systems: Using Assembly and C‖, Second Edition, Pearson education, 2011. (UNIT IV,V)
JIT-2106/ECE/Ms.A.Parimala/IIIrd Yr/SEM 05/EC8691/MICROPROCESSORS AND MICROCONTROLLERS/UNIT 1-5/QB+Keys/Ver2.0
1.1
, REGULATION: 2017 ACADEMIC YEAR: 2020-2021
Subject Code: EC8691 Year/Semester: III /05
Subject Name: MICROPROCESSORS Subject Handler: A.PARIMALA
AND MICROCONTROLLERS
Unit 1 THE 8086 MICROPROCESSOR
Introduction to 8086 – Microprocessor architecture – Addressing modes - Instruction set and
assembler directives – Assembly language programming – Modular Programming - Linking
and Relocation - Stacks - Procedures – Macros – Interrupts and interrupt service routines –
Byte and String Manipulation.
Q.
Questions & Answers
No.
1
What are the types of instruction sets of 8086 microprocessor? BTL 1
There are eight types of instructions. They are
• Data copy/Transfer instructions
• Arithmetic & Logical instructions
• Branch instructions
• Loop instructions
• Machine control instructions
• Flag manipulation instructions
• Shift & rotate instructions
String instructions
2
What are flag manipulation instructions? BTL 1
The instructions that directly modify the flags of 8086 are called as the flag manipulation
instructions. E.g.: CLC --- clear carry flag, CMC --- complement carry flag, STC ---
set carry flag , CLD --- clear direction flag
3
Explain the instructions LODS & STOS. BTL 2
a) LODS: Load String Byte or String Word
• The LODS instruction loads the AL/AX register by the content of a string
pointed to by DS: SI registers pair.
• The SI is modified automatically depending on direction flag. If it is a byte
transfer (LODSB), the SI is modified by one & if it is a word transfer (LODSW),
the SI is modified by two.
• No other flags are affected by this instruction.
b)STOS: Store String Byte or String Word
• The STOS instruction stores the AL/AX register contents to a location in the
string pointed by ES: DI register pair.
• The DI is modified accordingly.
• No flags are modified by this instruction.
4
Define control transfer instruction & explain their types. BTL 1
The instructions that transfer the flow of execution of the program to a new address specified in
the instruction directly or indirectly are called the control transfer or branching instructions.
They are of two types.
Unconditional control transfer instructions: In these types of instructions, the execution
control is transferred to the specified location independent of any status or condition.
Conditional control transfer instructions: In these instructions, The control is transferred to
the specified location provided the result of the previous operation satisfies a particular
condition, otherwise, the execution continues in normal flow sequence.
5
What are assembler directives? Give example. BTL 1
JIT-2106/ECE/Ms.A.Parimala/IIIrd Yr/SEM 05/EC8691/MICROPROCESSORS AND MICROCONTROLLERS/UNIT 1-5/QB+Keys/Ver2.0
1.2
, REGULATION: 2017 ACADEMIC YEAR: 2020-2021
The assembler is a program used to convert an assembly language program into the equivalent
machine code modules that may be further converted to executable codes. Therefore the hints
given to the assembler to complete all these tasks in some predefined alphabetical strings is
called an assembler directive. E.g.: DB------define byte, END----end of program, EQU-----
equate
6
What is the function of parity flag? (Nov 2013) BTL 1
The parity flag is set, if the result of the byte operation or lower byte of the word operation
contains an even number of ones.
7
Define a MACRO. BTL 1
A number of instructions appearing again & again in the main program can be assigned as a
macro definition (i.e.) a label is assigned to the repeatedly appearing string of instructions. The
process of assigning a label or macro name to the string is called defining a macro. A macro
within a macro is called a nested macro.
8
Which interrupt has got the highest priority among all the external interrupts? BTL 1
The Non-Maskable Interrupt pin of 8086 has got the highest priority among the external
Interrupts.
9
What are the segment registers present in 8086? BTL 1
There are four segment registers in 8086.They are
i. Code Segment register (CS)
ii. Data Segment register (DS)
iii. Extra Segment register (ES)
iv. Stack Segment register (SS)
10
What do you mean by instruction pipelining? BTL 1
While the execution unit executes the previously decoded instruction, the Bus Interface
Unit fetches the next instruction and places it in the pre fetched instruction byte queue. This
forms a pipeline.
11
What is the use of the Trap flag in the flag register of 8086? BTL 1
When the Trap flag is set, the processor enters the single step execution mode. A trap interrupt
is generated after execution of each instruction. The processor executes the current instruction
and the control is transferred to the Trap interrupt service routine.
12
List the instruction formats in 8086 instruction set. BTL 1
There are six general formats of instruction in 8086.They are
• One byte instruction.
• Register to Register.
• Register to/from Memory with no Displacement.
• Register to/from memory with Displacement.
• Immediate operand to Register.
• Immediate operand to Memory with 16-bit Displacement.
13 List the various addressing modes of 8086?(May 2018)What are the addressing modes of
sequence control transfer instructions in 8086? Give example. BTL 1
• Immediate eg: Mov AX,0005H.
• Direct eg:Mov AX,[5000H].
• Register eg:Mov BX,AX.
• Register Indirect eg:Mov AX,[Bx].
• Indexed eg:Mov AX,[SI].
JIT-2106/ECE/Ms.A.Parimala/IIIrd Yr/SEM 05/EC8691/MICROPROCESSORS AND MICROCONTROLLERS/UNIT 1-5/QB+Keys/Ver2.0
1.3
, REGULATION: 2017 ACADEMIC YEAR: 2020-2021
• Register Relative eg:Mov AX,50H[BX].
• Based Indexed eg:Mov AX,[Bx] [SI].
• Relative Based Indexed eg: Mov AX,50H [BX] [SI].
14 What are the differences between 8085 and 8086? (Nov 2013) BTL1
8-bit microprocessor 16-bit microprocessor
It is capable of addressing 28 It is capable of addressing 216 memory locations
memory locations
Low speed High speed
It can be configured only in single It can be configured in single processor mode and
processor mode multiprocessor mode
15 How is the physical address generated in 8086? (or) How 16 bit address is converted into
20 bit address in 8086? (Nov 2013) (Apr/May 2017) BTL 1
The content of the segment register called as segment address is shifted Left bit-wise four times
and to this result, content of an offset register also called as offset address is added, to produce a
20-bit physical address.
eg: segment address 1005H
Offset address 5555H
Segment address 0001 0000 0000 0101
Shifted by 4 bit positions 0001 0000 0000 0101 0000
+
Offset address 0101 0101 0101 0101
Physical address 0001 0101 0101 1010 0101
1 5 5 A 5
16
Explain XLAT instruction. BTL 2
• The XLAT (Translate) instruction replaces a byte in the AL register with a byte
from a 256-byte, user coded translation table.
• XLAT is useful for translating characters from one code to another like ASCII to
EBCDIC and ASCII to HEX etc.
17 Draw the PSW format for 8086.(May/June 2016) BTL 2
B1 B1 B1 B1 B1 B1 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
5 4 3 2 1 0
U U U U OF DF IF TF SF ZF U AF U PF U CF
U: Undefined; CF : Carry flag - Set by carry out of MSB
PF: Parity flag- set if result has even parity; AF : Auxiliary carry flag - used for BCD
operation; ZF : Zero flag - set if result = 0; SF : Sign flag - set if result is –ve.
TF : Trap flag - set to enable single step execution mode. IF: Interrupt flag- set to enable
interrupt ;DF : Direction flag - set to enable auto decrement mode for string operation ;OF:
Overflow flag - used for signed arithmetic operation
18
Explain the function of TEST pin in 8086 BTL 2
This input is examined by a “WAIT” instruction. When the processor executes WAIT
instruction, it enters into wait state (Idle state). If the TEST pin goes low, the processor will
come out from the idle state and continues the execution; otherwise it remains in an idle state.
19
Give the operation of CBW and TEST instructions of 8086? (Nov 2013) BTL 1
CBW instruction converts the byte in AL to word value in AX by extending the sign of AL
throughout the register AH. TEST instruction performs logical AND operation of the two
operands updating the flag registers without saving the result
20
What do you mean by addressing modes? (May 2014) BTL 1
JIT-2106/ECE/Ms.A.Parimala/IIIrd Yr/SEM 05/EC8691/MICROPROCESSORS AND MICROCONTROLLERS/UNIT 1-5/QB+Keys/Ver2.0
1.4