EEE Lab Questions Key
EEE Lab Questions Key
LABORATORY
Accumulator is a 8 bit register. Any data input/output to/from the microprocessor takes place via the
accumulator (register). It is generally used for temporary storage of data and for the placement of final
result of arithmetic/logical operations.
Accumulator (ACC or A) register is extensively used for arithmetic, logical, store and rotate
operations.
2. What is Microprocessor.
Ans It is a program controlled semi conductor device (IC), which fetches, decodes and execute
instructions.
3.What are the Addressing modes of 8085.
Register:- Data is provided through the registers. Or operand is only register(s). Example: MOV Rd,
Rs.
Register indirect:- Operand M or register pair. Example: MOV A,M; LDAX B; STAX D; MVI M,32H
(exception for immediate addressing mode).
Direct:- Operand 8-bit port address or 16-bit memory address. Example: IN 84H, OUT 84H, all
CALLs.
Immediate:- Instruction having the letter I. Or immediate data to the destination provided. Also all
jump instructions as the meaning is jump immediately. Example MVI M, 2H; ADI 47H; LXIH 2050
(exception for direct addressing mode).
Implicit:- No operand. Example: XCHG.
4.How does the microprocessor communicate with the memory and input/output devices?
Ans. The microprocessor communicates with the memory and the Input/Output devices via the three
buses, viz., data bus, address bus and control bus.
5.Write opcode for following instructions.
MVI A, data 1 ADD B
MVI B, data 2 INR C
6. What is a mnemonic?
Ans. It is very difficult to understand a program if it is written in either binary or hex code.
Thus the manufacturers have devised a symbolic code for each instruction, called a mnemonic.
(2501 H) = 99H
(2502 H) = 39H
Result (2503 H) = 99H + 39H = D2H
Since,
1 0 0 1 1 0 0 1 (99H)
+ 0 0 1 1 1 0 0 1 (39H)
1 1 0 1 0 0 1 0 (D2H)
Ans:
LXI H, 2501H : "Get address of first number in H-L pair. Now H-L points to 2501H"
MOV A, M : "Get first operand in accumulator"
INX H : "Increment content of H-L pair. Now, H-L points 2502H"
ADD M : "Add first and second operand"
INX H : "H-L points 4002H"
MOV M, A : "Store result at 2503H"
HLT : "Stop"
9.Write a code for Subtracting two 16-bit numbers with the following data.
(2500H) = 19H
(2501H) = 6AH
(2504H) = 15H (2503H) = 5CH
Result = 6A19H - 5C15H = OE04H
(2504H) = 04H
(2505H) = OEH
Program
LHLD 2500H : "Get first 16-bit number in HL"
XCHG : "Save first 16-bit number in DE"
LHLD 2502H : "Get second 16-bit number in HL"
MOV A, E : "Get lower byte of the first number"
SUB L : "Subtract lower byte of the second number"
MOV L, A : "Store the result in L register"
MOV A, D : "Get higher byte of the first number"
SBB H : "Subtract higher byte of second number with borrow"
MOV H, A : "Store l6-bit result in memory locations 2504H and 2505H"
SHLD 2504H : "Store l6-bit result in memory locations 2504H and 2505H"
HLT : "Terminate program execution"
Before After
9. Write down the instructions that load H-L register pair by the contents of
memory location 3500 H. Then move the contents to register C.
Ans. The corresponding instructions are
LXI H, 3500 H fi execution of this instruction loads H-L register pair with
the contents of memory location 3500 H.
and MOV C, M fi execution of this instruction moves the contents of
memory location 3500 H to register C.
10. What is a bus?
Ans. A bus is a bunch of wires through which data or address or control signals flow.
3. Interface Experiments:
a) A/D Interfacing.
b) D/A Interfacing.
c) Traffic light controller.
Pre lab questions:
1) What is ADC?
Analog-to-digital converter (ADC)
An electronic circuit that converts analog signals into digital numbers
ADCs are used to measure signals like temperature, pressure, acceleration, and speed.
ADCs are essential because digital signals are easier to store, manipulate, and transmit than
analog signals.
In the 2-key lockout mode, if two keys are pressed simultaneously, only the first key is recognized.
In the N-key rollover mode, simultaneous keys are recognized and their codes are stored in FIFO.
The keyboard section also has an 8 x 8 FIFO (First In First Out) RAM.