Académique Documents
Professionnel Documents
Culture Documents
ENGINEERING COLLEGE
TIRUCHIRAPALLI-621213.
PART A (2 Marks)
1. Give the significance of SIM and RIM instruction available in 8085. [NOV/DEC 2006]
Instruction SIM: Set Interrupt Mask. This is a 1 byte instruction and can be used three different
functions as follows
Instruction RIM: Read Interrupt Mask .this is a 1 byte instruction and can be used for the following
three functions.
2. List the different types of flags affected by the arithmetic and logic operations. [NOV/DEC
2007]
Carry flag, auxillary carry flag, parity flag, sign flag, zero flag
3. List the interrupt signals present in 8085 processor in the priority order. [Apr/may 2008]
Interrupts Priority
TRAP
RST 7.5
RST 6.5
RST 5.5
INTR
7. What is Microprocessor? Give the power supply & clock frequency of 8085.
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 is the use of addressing modes, mention the different types
The various formats of specifying the operands are called addressing modes, it is used to
access the operands or data. The different types are as follows
Immediate addressing
Register addressing
Direct addressing
Indirect addressing
Implicit addressing
12. What is Microprocessor? Give the power supply & clock frequency of 8085[NOV/DEC
2011]
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.
13. List few applications of microprocessor-based system.
It is used:
i. For measurements, display and control of current, voltage, temperature, pressure, etc.
ii. For traffic control and industrial tool control.
iii. For speed control of machines.
20. How many operations are there in the instruction set of 8085 microprocessor?
There are 74 operations in the 8085 microprocessor.
21. List out the five categories of the 8085 instructions. Give examples of the instructions
for each group. .[NOV/DEC 2006]
• Data transfer group – MOV, MVI, LXI.
• Arithmetic group – ADD, SUB, INR.
• Logical group –ANA, XRA, CMP.
• Branch group – JMP, JNZ, CALL.
• Stack I/O and Machine control group – PUSH, POP, IN, HLT.
22. Explain the difference between a JMP instruction and CALL instruction.
A JMP instruction permanently changes the program counter. A CALL instruction
leaves
Information on the stack so that the original program execution sequence can be resumed.
23. What is the difference between the shift and rotate instructions?
A rotate instruction is a closed loop instruction. That is, the data moved out at one end is
put back in at the other end. The shift instruction loses the data that is moved out of the last bit
locations.
31. Define instruction cycle, machine cycle and T-state [may/june 2006][APRIL/MAY2011]
Instruction cycle is defined, as the time required completing the execution of an
instruction.
Machine cycle is defined as the time required completing one operation of accessing memory,
I/O or acknowledging an external request. T-cycle is defined as one subdivision of the operation
performed in one clock period.
37.What is the use of addressing modes, mention the different types[NOV/DEC 2007]
The various formats of specifying the operands are called addressing modes, it is used to
access the operands or data. The different types are as follows
• Immediate addressing
• Register addressing
• Direct addressing
• Indirect addressing
• Implicit addressing.
1. Organisation of microcontroller:
The work done internal to the processors is addition, subtraction, logical operations,
data transfer Operations, etc. The work done external to the processor are reading/writing the
memory and Reading/writing the J/O devices or the peripherals. If the peripheral requires the
attention of the master then it can interrupt the master and initiate an operation.
The microprocessor is the master, which controls all the activities of the system. To
perform a specific job or task, the microprocessor has to execute a program stored in memory.
CS2252 MICROPROCESSORS & MICROCONTROLLERS Department of CSE
The program consists of a set of instructions. It issues address and control signals and fetches the
instruction and data from memory. The instruction is executed one by one internal to the
processor and based on the result it takes appropriate action.
BUSES:
The buses are group of lines that carries data, address or control signals.
· The CPU Bus has multiplexed lines, i.e., same line is used to carry different signals .
The CPU interface is provided to demultiplex the multiplexed lines, to generate chip
select signals and additional control signals.
· The system bus has separate lines for each signal.
All the slaves in the system are connected to the same system bus. At any time instant
communication takes place between the master and one of the slaves. All the slaves have
tristate logic and hence normally remain in high impedance state. Only when the slave is
selected it comes to the normal logic.
PERIPHERAL DEVICES:
· The EPROM memory is used to store permanent programs and data.
· The RAM memory is used to store temporary programs and data.
· The input device is used to enter the program, data and to operate the system.
· The output device is used for examining the results.
Since the speed of I/O devices does not match with the speed of microprocessor, an
interface device is provided between system bus and I/O devices. Generally I/O devices are
slow devices.
These general purpose registers are used to hold data like any other registers.
The general purpose registers in 8085 processors are B, C, D, E, H and L. Each register
can hold 8-bit data. Apart from the above function these registers can also be used to
work in pairs to hold 16-bit data. They can work in pairs such as B-C, D-E and H-L to
store 16-bit data. The H-L pair works as a memory pointer. A memory pointer holds the
address of a particular memory location. They can store 16-bit address as they work in
pair.
Signals that are associated with Timing and control unit are:
Control Signals: READY, RD‟, WR‟, ALE
Status Signals: S0, S1, IO/M‟
DMA Signals: HOLD, HLDA
RESET Signals: RESET IN, RESET OUT
Interrupt Control
As the name suggests this control interrupts a process. Consider that a
microprocessor is executing the main program. Now whenever the interrupt
signal is enabled or requested the microprocessor shifts the control from main
program to process the incoming request and after the completion of request, the
control goes back to the main program. For example an Input/output device may
send an interrupt signal to notify that the data is ready for input. The
microprocessor temporarily stops the execution of main program and transfers
control to I/O device. After collecting the input data the control is transferred
back to main program.
Interrupt signals present in 8085 are:
INTR
RST 7.5
RST 6.5
RST 5.5
TRAP
Of the above four interrupts TRAP is a NON-MASKABLE interrupt
control and other three are maskable interrupts. A non-maskable interrupt is an
interrupt which is given the highest priority in the order of interrupts. Suppose
you want an instruction to be processed immediately, then you can give the
instruction as a non-maskable interrupt. Further the non-maskable interrupt
cannot be disabled by programmer at any point of time.Whereas the maskable
interrupts can be disabled and enabled using EI and DI instructions. Among the
maskable interrupts RST 7.5 is given the highest priority above RST 6.5 and
least priority is given to INTR.
Serial I/O control
The input and output of serial data can be carried out
using 2 instructions in 8085.
SID-Serial Input Data
SOD-Serial Output Data
Two more instructions are used to perform serial-parallel conversion
needed for serial I/O devices.
SIM
RIM
Address buffer and Address-Data buffer
The contents of the stack pointer and program counter are loaded into the
address buffer and address-data buffer. These buffers are then used to drive the
external address bus and address-data bus. As the memory and I/O chips are
connected to these buses, the CPU can exchange desired data to the memory and
CS2252 MICROPROCESSORS & MICROCONTROLLERS Department of CSE
I/O chips.The address-data buffer is not only connected to the external data bus
but also to the internal data bus which consists of 8-bits. The address data buffer
can both send and receive data from internal data bus.
Address bus and Data bus:
We know that 8085 is an 8-bit microprocessor. So the data bus present in
the microprocessor is also 8-bits wide. So 8-bits of data can be transmitted from
or to the
microprocessor. But 8085 processor requires 16 bit address bus as the memory
addresses are 16-bit wide. The 8 most significant bits of the address are
transmitted with the help of address bus and the 8 least significant bits are
transmitted with the help of multiplexed address/data bus. The eight bit data bus
is multiplexed with the eight least significant bits of address bus. The
address/data bus is time multiplexed. This means for few microseconds, the 8
least significant bits of address are generated, while for next few seconds the
same pin generates the data. This is called Time multiplexing. But there are
situations where there is a need to transmit both data and address simultaneously.
For this purpose a signal called ALE (address latch enable) is used. ALE signal
holds the obtained address in its latch for a long time until the data is obtained
and so when the microprocessor sends the data next time the address is also
available at the output latch. This technique is called Address/Data
demultiplexing.
8085 is a 40 pin IC, DIP package. The signals from the pins can be
grouped as follows
Power supply and clock signals
Address bus
Data bus
Control and status signals
Interrupts and externally initiated signals
Serial I/O ports
4. Addressing modes:
5. Instruction sets:
The 8085 instruction set can be classified into the following five functional headings.
Group I - DATA TRANSFER INSTRUCTIONS:
Includes the instructions that moves ( copies) data between registers or
between memory locations and registers. In all data transfer operations the content of
source register is not altered. Hence the data transfer is copying operation.
Ex: i) MOV A,B ii) LDA 4600 iii) LHLD 4200
Flowchart
8Bit Multiplication
Source program :
LDA 2200H MOV E, A
MVI D, 00 : Get the first number in DE
register pair
LDA 2201H
MOV C, A : Initialize counter
LX I H, 0000 H : Result = 0
BACK: DAD D : Result = result + first number
DCR C : Decrement count
JNZ BACK : If count 0 repeat
SHLD 2300H : Store result
HLT : Terminate program execution
PROGRAMMING EXAMPLES:
1. Write an ALP using 8085 to multiply two 8-bit numbers by repeated addition.
MVI A, OO ; Accumulator contents are cleared
MVI C, OO ; C Register contents are cleared
MVI B, data#1 ; I Operand is loaded into B Register
MVI D, data#2 ; II Operand is loaded into D Register
Loop: ADD B |
JNC next |
INR C } Multiplication by repeated addition.
Next: DCR D |
JNZ loop |
STA 4200H ; Storing of results into memory location
MOV A,C
STA 4201H ; Storing of carry into next memory location