electronics & microprocessor lab manual

80
Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 1 VSB ENGINEERING COLLEGE KARUR 639111 V SEM III Year B.E. MECHANICAL ENGINEERING ELECTRONICS AND MICROPROCESSOR LABORATORY LAB MANUAL Prepared By J. Cyril Robinson Azariah Assistant Professor, ECE & C. Moorthy Lecturer, ECE

Upload: cyril-robinson-azariah-j

Post on 02-Aug-2015

240 views

Category:

Documents


30 download

TRANSCRIPT

Page 1: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 1

VSB ENGINEERING COLLEGE

KARUR – 639111

V SEM III Year B.E. MECHANICAL ENGINEERING

ELECTRONICS AND MICROPROCESSOR LABORATORY

LAB MANUAL

Prepared By

J. Cyril Robinson Azariah

Assistant Professor, ECE

&

C. Moorthy

Lecturer, ECE

Page 2: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 2

CONTENTS

Exp.

No.

Date Name of the Experiments Page

No.

Marks

Award

Faculty

Sign.

CYCLE I - ELECTRONICS EXPERIMENTS

1.(a) VI Characteristics of PN Junction

Diode

4

1.(b) VI Characteristics of Zener Diode 7

2. Characteristics Study Of Common

Emitter Configuration of a npn type

Bipolar Junction Transistor (BJT)

11

3. Design of an RC Phase Shift Oscillator

Using Opamp IC 741

15

4. Verification and Study of Logic Gates 19

5. Design of Half Adder and Full Adder

Using Logic Gates

26

6. Study and Construction of Flip- Flops

Using Logic Gates

28

CYCLE II - MICROPROCESSOR EXPERIMENTS

7.(a) 8-bit Addition and Subtraction Using

8085 Microprocessor

33

7.(b) 8-bit Multiplication and Division Using

8085 Microprocessor

40

8. Finding Smallest Number and largest

Number from the Array of Numbers

Using 8085 Microprocessor

44

9. Sorting an Array of Numbers in

Ascending and descending Order

Using 8085 Microprocessor

47

10. Transferring Block of Data Using 8085

Microprocessor

51

11. Stepper Motor Interfacing Using 8085

Microprocessor

53

Appendix: 8085 Op-code Sheet

Viva Questions & Answers

Page 3: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 3

CYCLE I EXPERIMENTS

ELECTRONICS

Page 4: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 4

Ex. No. 1. (a)

Date:

VI Characteristics of PN Junction Diode

Aim: To plot the VI characteristics of a PN Junction Diode

Apparatus Required:

S.No. Name of the Apparatus Range/Type Quantity

1. Ammeter (0-100)mA

(0-500)µA

1

1

2. Voltmeter (0-1)V

(0-30)V

1

1

3. Resistor 220Ω 1

4. PN Junction Diode 1N4007 1

5. Regulated Power Supply (0-30)V 1

6. Bread-Board - 1

7. Connecting Wires - Few

Procedure:

1. Wire up the circuit shown in circuit diagram of the forward biased diode.

2. Record the voltage across the diode (V) and current (I) through it as a function

of input voltage.

3. Repeat the experiment of the reverse biased diode.

4. Plot the relevant graphs.

5. Plot it along with I-V characteristics of forward biased PN Junction Diode.

Diode Symbol:

Page 5: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 5

Circuit Diagram:

Forward Biased:

Reverse Biased:

Tabulation:

Forward Bias Reverse Bias

Voltage (VF)

volts

Current (IF)

mA

Voltage (VR)

volts

Current (IR)

µA

Page 6: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 6

Model Graph:

Theory:

The PN junction region of a Junction Diode has the following important

characteristics:

1) Semiconductors contain two types of mobile charge carriers, Holes and Electrons.

2) The holes are positively charged while the electrons negatively charged.

3) A semiconductor may be doped with donor impurities such as Antimony (N-

type doping), so that it contains mobile charges which are primarily

electrons.

4) A semiconductor may be doped with acceptor impurities such as Boron (P-

type doping), so that it contains mobile charges which are mainly holes.

5) The junction region itself has no charge carriers and is known as the depletion

region.

6) The junction (depletion) region has a physical thickness that varies with the

applied voltage. 7) When a diode is Zero Biased no external energy source is applied and a

natural Potential Barrier is developed across a depletion layer which is

approximately 0.5 to 0.7v for silicon diodes and approximately 0.3 of a volt for

germanium diodes. 8) When a junction diode is Forward Biased the thickness of the depletion

region reduces and the diode acts like a short circuit allowing full current to

flow. 9) When a junction diode is Reverse Biased the thickness of the depletion

region increases and the diode acts like an open circuit blocking any current

flow, (only a very small leakage current).

Result:

Page 7: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 7

Ex. No. 1. (b)

Date:

VI Characteristics of Zener Diode

Aim: To plot the VI characteristics of a Zener Diode

Apparatus Required:

S.No. Name of the Apparatus Range/Type Quantity

1. Ammeter (0-100)mA

(0-500)µA

1

1

2. Voltmeter (0-1)V

(0-30)V

1

1

3. Resistor 330Ω 1

4. Zener Diode 1N47XX 1

5. Regulated Power Supply (0-30)V 1

6. Bread-Board - 1

7. Connecting Wires - Few

PROCEDURE:

Static characteristics:-

1. Connections are made as per the circuit diagram.

2. The Regulated power supply voltage is increased in steps.

3. The zener current (lz), and the zener voltage (Vz.) are observed and then

noted in the tabular form.

4. A graph is plotted between zener current (Iz) and zener voltage (Vz).

Regulation characteristics:-

1. The voltage regulation of any device is usually expressed as percentage

regulation

2. The percentage regulation is given by the formula

((VNL-VFL)/VFL)X100

VNL=Voltage across the diode, when no load is connected.

VFL=Voltage across the diode, when load is connected.

Page 8: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 8

3. Connection are made as per the circuit diagram

4. The load is placed in full load condition and the zener voltage (Vz),

Zener current (lz), load current (IL) are measured.

5. The above step is repeated by decreasing the value of the load in steps.

6. All the readings are tabulated.

7. The percentage regulation is calculated using the above formula

OBSERVATIONS:-

Static characteristics:-

S.NO

ZENER

VOLTAGE(VZ)

ZENER CURRENT(I

Z)

Regulation characteristics:-

S.N0 VNL(VOLTS)

VFL (VOLTS)

RL

(KΏ)

%

REGULATION

Diode Symbol:

Page 9: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 9

Circuit Diagram:

Forward Biased:

Reverse Biased:

Model Graph:

Page 10: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 10

Theory:

A Zener Diode is a special kind of diode which permits current to flow in the

forward direction as normal, but will also allow it to flow in the reverse direction

when the voltage is above a certain value - the breakdown voltage known as

the Zener voltage.

The Zener voltage of a standard diode is high, but if a reverse current above that

value is allowed to pass through it, the diode is permanently damaged.Zener

diodes are designed so that their zener voltage is much lower - for example just 2.4

Volts. When a reverse current above the Zener voltage passes through a Zener

diode, there is a controlled breakdown which does not damage the diode. The

voltage drop across the Zener diode is equal to the Zener voltage of that diode no

matter how high the reverse bias voltage is above the Zener voltage.

The illustration above shows this phenomenon in a Current vs. Voltage graph. With a

zener diode connected in the forward direction, it behaves exactly the same as a

standard diode - i.e. a small voltage drop of 0.3 to 0.7V with current flowing through

pretty much unrestricted. In the reverse direction however there is a very

small leakage current between 0V and the Zener voltage - i.e. just a tiny amount of

current is able to flow. Then, when the voltage reaches the breakdown voltage (Vz),

suddenly current can flow freely through it.

Result:

a) Static characteristics of zener diode are obtained and drawn.

b) Percentage regulation of zener diode is calculated.

Page 11: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 11

Ex. No. 2

Date:

Characteristics Study Of Common Emitter Configuration of a npn

type Bipolar Junction Transistor (BJT)

Aim: To plot the input and output characteristics of Bipolar Junction Transistor (BJT)

in Common Emitter mode Configuration and to find the Input Impedance (Ri), Output

Admittance (Ro), Forward Current Gain (hfc) and Reverse Voltage Gain (hrv)

Apparatus Required:

S.No. Name of the Apparatus Range/Type Quantity

1. Ammeter (0-30)mA

(0-500)µA

1

1

2. Voltmeter (0-1)V

(0-10)V

1

1

3. Resistor 330Ω 1

4. Bipolar Junction Transistor

(BJT)

BC107 1

5. Regulated Power Supply (0-30)V 1

6. Bread-Board - 1

7. Connecting Wires - Few

Procedure:

1. Connections are given as per the circuit diagram.

2. Power supplies are switched ON.

3. To determine the input characteristics:

a) VCB is kept constant by using the power supply Vcc.

b) VBE is varied by using the power supply VBB and the corresponding

variations in IB is noted.

c) The above step is repeated for different values of VCB.

4. To determine the output characteristics:

a) IB is kept constant by using the power supply VCC and the corresponding

value in IC is noted.

Page 12: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 12

b) VCE is varied by using the power supply and the corresponding value in IC is

noted.

c) The above step is repeated for different values of IB.

5. Graph is plotted using the tabulation.

Formulae Used:

Input Impedance ri = ∆VBE/∆IB [Unit – ohm (Ω)]

Output Admittance ro=∆IC /∆VCE [Unit – mho (Ω-1)]

Forward Current Gain hfc=∆IC/∆IB [No Unit]

Reverse Voltage Gain hrv=∆VBE/∆VCE [No Unit]

Circuit Diagram:

THEORY:

A transistor is a three terminal device. The terminals are emitter, base,

collector. In common emitter configuration, input voltage is applied

between base and emitter terminals and out put is taken across the

collector and emitter terminals. Therefore the emitter terminal is common

to both input and output.

The input characteristics resemble that of a forward biased

diode curve. This is expected since the Base-Emitter junction of the

transistor is forward biased. As compared to CB arrangement IB

increases less rapidly with VBE. Therefore input resistance of CE circuit

is higher than that of CB circuit.

The output characteristics are drawn between Ic and VCE at

constant IB. the collector current varies with VCE unto few volts only.

Page 13: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 13

After this the collector current becomes almost constant, and

independent of VCE. The value of VCE up to which the collector current

changes with V CE is known as Knee voltage. The transistor always

operated in the region above Knee voltage, IC is always constant and is

approximately equal to IB.

The current amplification factor of CE configuration is given by

Β = ∆IC/∆IB

MODEL GRAPHS:

INPUT CHARACTERSTICS:

OUTPUT CHARECTERSTICS:

Page 14: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 14

PRECAUTIONS:

1. The supply voltage should not exceed the rating of the transistor

2. Meters should be connected properly according to their polarities

RESULT:

1. the input and out put characteristics of a transistor in CE configuration are

Drawn

2. the β of a given transistor is calculated as

Page 15: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 15

Ex. No. 3

Date:

Design of an RC Phase Shift Oscillator Using Opamp IC 741

Aim: To design an RC phase shift Oscillator using Opamp IC 741

Apparatus Required:

S.No. Name of the Apparatus Range/Type Quantity

1. Op Amp IC 741 1

2. Resistors 1K,

10K,

3

1

3. Resistor (Use Decade

Resistance Box)

290K 1

4. DC Power Supply -12V-0V-+12V 1

5. CRO Digital 1

6. Bread-Board - 1

7. Connecting Wires - Few

IC 741 Pin Diagram:

Page 16: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 16

Circuit Diagram:

Model Graph:

Observation:

Amplitude Time Period Practical Frequency

Page 17: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 17

Tabulation:

S.NO

THEORETICAL

FREQUENCY

PRACTICAL

FREQUENCY

OUTPUT VOLTAGE

Design:

The attenuation, B of the three section RC feedback circuit is B = 1/29

Where, B=R1/Rf=1/29. Then Rf=29*R1, R1 = 10*R

and the frequency of oscillation (fo) is given by

Theory:

RC phase shift oscillator is a sinusoidal oscillator used to produce sustained well

shaped sine wave oscillations. It is used for different applications such as local

oscillator for synchronous receivers, musical instruments, study purposes etc. The

main part of an RC phase shift oscillator are an op amp inverting amplifier with its

output fed back into its input using a regenerative feedback RC filter network,

Hence the name RC phase shift oscillator. By varying capacitor, the frequency of

oscillations can be varied. The feedback RC network has a phase shift of 60 degrees

each. Hence total phase shift provided by the three RC network is 180 degrees. The

op amp is connected as inverting amplifier hence the total phase shift around the

loop will be 360 degrees. This condition is essential for sustained oscillations.

Working of RC Phase shift oscillator

The feedback network offers 180 degrees phase shift at the oscillation

frequency, and the op amp is configured as an Inverting amplifier it also

provide 180 degrees phase shift. Hence to total phase shift around the loop is

360=0degrees, it is essential for sustained oscillations.

At the oscillation frequency each of the resistor capacitor filter produces a

phase shift of 60° so the whole filter circuit produces a phase shift of 180°.

The energy storage capacity of capacitor in his circuit produces a noise

voltage which is similar to a small sine wave, it is then amplified using op amp

inverting amplifier.

Page 18: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 18

By taking feedback, the output sine wave also attenuates 1/29 times while

passing through the RC network, so the gain of inverting amplifier should be

29 in order to keep loop gain as unity.

The unity loop gain and 360 degree phase shift are essential for the sustained

oscillation.

RC Oscillators are stable and provide a well shaped sine wave output with the

frequency being proportional to 1/RC and therefore, a wider frequency range

is possible when using a variable capacitor.

However, RC Oscillators are restricted to frequency applications because at

high frequency the reactance offered by the capacitor is very low so it acts as

a short circuit.

Why it uses 3 RC stages?

Number of RC stages help improve the frequency stability. The total phase

shift introduced by the feedback network is 180 degrees, if we are using N RC

stages each RC section provide 180/N degree phase shift.

1. When 2 RC sections are cascaded, the frequency stability is low. For 3

sections cascaded the phase change rate is high so there is improved

frequency stability. However for 4 RC sections there is an good phase change

rate resulting in the most stable oscillator configuration. But 4 RC sections

increases cost and makes circuit complexity.

Hence phase shift oscillators make use of 3 RC sections in which each section

provides a phase shift of 60 degree. The latter is generally used in high

precision applications where cost is not much regarded and only accuracy

plays a major role.

Procedure:

1. The circuit is constructed as per the given circuit diagram.

2. Switch ON the power supply and observe the output on the CRO (Sine wave

oscillation).

3. Note down the practical frwquency and compare with the theoretical

frequency.

Result:

Thus the RC phase shift oscillator was designed and the output waveform

was obtained. Practical frequency fo=______Hz.

Page 19: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 19

Ex. No. 4

Date:

Verification and Study of Logic Gates

Aim:

To study the various logic gates and verify its truth table.

Apparatus Required:

S.NO

APPARATUS

QUANTITY

1. Digital trainer kit 1

2. IC 7408 [AND] 1

3. IC 7432 [OR] 1

4. IC 7404 [NOT] 1

5. IC 7400 [NAND] 1

6. IC 7402 [ NOR] 1

7. IC 7486 [XOR 1

8. IC 74266[XNOR] 1

9. Connecting Wires 1

Theory:

Logic gates are the basic components in digital electronics. They are used to create

digital circuits and even complex integrated circuits. For example, complex integrated

circuits may bring already a complete circuit ready to be used – microprocessors and

microcontrollers are the best example – but inside them they were projected using several logic

gates.

A gate is a digital electronic circuit having only one output but one or more

inputs. The output or a signal will appear at the output of the gate only for certain input-signal

combinations.

There are many types of logic gates; such as AND, OR and NOT, which are usually called the

three basic gates. Other popular gates are the NAND and the NOR gates; which are simply

combinations of an AND or an OR gate with a NOT gate inserted just before the output signal. Other

gates include the XOR “Exclusive-OR” and the XNOR "Exclusive NOR" gates. All the logic gates

used in the exercises below are known as TTL (transistor-to-transistor) logic. These have the

convenient property that the output of any gate can be used directly as input to another gate. All

these TTL circuits are operated from a 5 V power supply, and the binary digits 0 and 1 are

represented by low and high voltages on the gate terminals.

Page 20: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 20

AND: The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A

dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes omitted i.e.

AB

OR: The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are

high. A plus (+) is used to show the OR operation.

NOT: The NOT gate is an electronic circuit that produces an inverted version of the input at its output.

It is also known as an inverter. If the input variable is A, the inverted output is known as NOT A. This is

also shown as A', or A with a bar over the top, as shown at the outputs.

NAND: This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs of

all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on

the output. The small circle represents inversion.

NOR: This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all

NOR gates are low if any of the inputs are high. The symbol is an OR gate with a small circle on the

output. The small circle represents inversion.

XOR: The 'Exclusive-OR' or EOR or XOR gate is a circuit which will give a high output if either, but not

both, of its two inputs are high. An encircled plus sign ( ) is used to + show the EOR operation.

XNOR: The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output if

either, but not both, of its two inputs are high. The symbol is an EXOR gate with a

small circle on the output. The small circle represents inversion.

IC Pin Diagram, Logic Diagram and Truth Table:

1. AND gate:

Page 21: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 21

2. OR gate:

3. NOT Gate:

Page 22: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 22

4. NAND gate:

Page 23: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 23

5. NOR gate:

Page 24: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 24

6. XOR gate:

7. XNOR gate:

Page 25: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 25

Procedure:

Implementing the Solution

1. Plug the chips you will be using into the breadboard. Point all the

chips in the same direction with pin 1 at the upper-left corner. (Pin 1

is often identified by a dot or a notch next to it on the chip package).

2. Connect +5V and GND pins of each chip to the power and ground

bus strips on the breadboard.

3. Make the connections as per the circuit diagram.

4. Switch on VCC and apply various combinations of input according

to truth table.

RESULT:

Thus, the logic gates are studied and its truth tables are verified.

Page 26: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 26

Ex. No. 5

Date:

Design of Half Adder and Full Adder Using Logic Gates

Aim: To implement half-adder and full adder circuits.

Apparatus Required:

IC 7486, IC 7432, IC 7408, IC 7400, Digital Trainer Kit, Connecting wires, etc.

Logic Circuit Diagram:

Theory:

HALF ADDER

A half adder has two inputs for the two bits to be added and two outputs one from

the sum ‘ S’ and other from the carry ‘ c’ into the higher adder position. Above circuit is

called as a carry signal from the addition of the less significant bits sum from the X-OR Gate

the carry out from the AND gate.

FULL ADDER:

A full adder is a combinational circuit that forms the arithmetic sum of input; it

consists of three inputs and two outputs. A full adder is useful to add three bits at a time but a

Page 27: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 27

half adder cannot do so. In full adder sum output will be taken from X-OR Gate, carry

output will be taken from OR Gate.

PROCEDURE:

1. Plug the chips you will be using into the breadboard. Point all the chips in the same

direction with pin 1 at the upper-left corner. (Pin 1 is often identified by a dot or a notch

next to it on the chip package).

2. Connect +5V and GND pins of each chip to the power and ground bus strips on the

breadboard.

3. Make the connections as per the circuit diagram.

4. Switch on VCC and apply various combinations of input according to truth table.

5. Note down the output readings for half/full adder and sum and the carry bit for different

combinations of inputs in following Tables where S & V indicating logic value of the

output. And fill your result in S (V) and C (V) in voltage. Where 5V indicating logic 1

and 0V indicating logic 0.

Truth Table:

Observation:

Result:

Page 28: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 28

Ex. No. 6

Date:

Study and Construction of Flip- Flops Using Logic Gates

Aim: To construct the various flipflops using logic gates.

Apparatus Required:

Digital Trainer Kit, IC 7400, IC 7410, IC 7404, Connecting Wires..

Theory:

RS and D Flip-Flop:-

–S Flip flop has two data inputs R & S.

application.

inadvertently.

lop a circuit that needs only a single data input.

- Flop using NOR Gate.

output Q is

in the truth table.

J-K Flip-flop:-

-Flop is the most versatile binary strange element.

-flop. The uncertainty in the

State of SR Flip- Flop when S = R = 1 can be eliminated by using JK Flip-Flop

T Flip –Flop:-

obtained by using NAND or NOR gates.

) and two outputs

Q and Q.

Page 29: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 29

stable state Q=1 which is referred to as the 1 state( or set state ) whereas in

the other stable state Q=0 which is referred to as the 0 state ( or reset state )

it is in 0 state, it continues to remain in this state.

bit of digital information.

as shown in fig.

table 1. If T=1 it acts as a toggle switch for every clock pulse the output

Q changes.

Procedure:-

1. Study the circuit diagram.

2. Connect the circuit as shown in fig i.e. JK Flip Flop by using connecting

wires.

3. Switch „ON‟ the power supply.

4. Apply proper I/P to J & K I/Ps of Flip-Flop from Logic I/P

5. Check the O/P on Logic O/P Section.

6. Change the I/P & Verify the Truth Table.

Page 30: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 30

Logic Diagram and Truth Table:

SR Flipflop:

D Flipflop:

JK Flipflop:

Page 31: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 31

T FlipFlop:

Result:

Page 32: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 32

CYCLE II

MICROPROCESSOR

EXPERIMENTS

Page 33: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 33

Ex No. 7(a)

Date: __/__/2012 8-bit Addition and Subtraction Using 8085 Microprocessor

AIM:

To perform the addition and subtraction of two 8-bit data (a) without

carry/borrow and (b) with carry/borrow using 8085 Microprocessor.

EQUIPMENTS REQUIRED:

8085 Microprocessor kit, keyboard (optional), power supply unit – 1 each.

ALGORITHM:

ADDITION OF TWO 8-BIT DATA WITHOUT CARRY:

Step 1: Start the program.

Step 2: Initialize the address of the memory register as a 16-bit data.

Step 3: Get the first data in the first location and the second data in the second

location.

Step 4: Move the first data to the accumulator.

Step 5: Go to the second location and add the second data with the first data.

Step 6: Move the result stored in the accumulator in the next memory location.

Step 7: Terminate the program.

ADDITION OF TWO 8-BIT DATA WITH CARRY:

Step 1: Start the program.

Step 2: Initialize the address of the memory register of HL register pair as a 16-

bit data.

Step 3: Get the first data in the first location and the second data in the second

location.

Step 4: Move the first data to the accumulator. Initialize any general purpose

register (say „C‟ register) to zero.

Step 5: Perform addition between the two 8-bit data.

Step 6: Store the result in any address location (say „4152H‟).

Page 34: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 34

Step 7: Check for the carry flag. If CY=1, then increment the data in the general

purpose register else keep the content as such.

Step 8: Store the data in the general purpose register to any memory location

(say „4153H‟).

Step 9: Stop the program.

SUBTRACTION OF TWO 8-BIT DATA WITHOUT BORROW:

Step 1: Start the program.

Step 2: Initialize the address of the memory.

Step 3: Get the first data in the first location and the second data in the second

location.

Step 4: Move the first data to the accumulator.

Step 5: Go to the second location and formulate the subtraction operation.

Step 6: Move the result stored in the accumulator in the next memory location.

Step 7: Terminate the program.

SUBTRACTION OF TWO 8-BIT DATA WITH BORROW:

Step 1: Start the program.

Step 2: Initialize the address of the memory register of HL register pair as a 16-

bit data.

Step 3: Get the first data in the first location and the second data in the second

location.

Step 4: Move the first data to the accumulator. Initialize any general purpose

register (say „C‟ register) to zero.

Step 5: Perform subtraction between the two 8-bit data, move the difference in

the Accumulator.

Step 6: Store the result in any address location (say „4152H‟).

Step 7: Check for the carry flag. If CY=0, then keep the content as such.

Step 8: If CY=1, then increment the data in the general purpose register, take

1‟s Complement to the data in the accumulator and add 01 to it.

Page 35: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 35

Step 9: Store the data in the general purpose register to any memory location

(say „4153H‟).

Step 10: Stop the program.

PROGRAM:

ADDITION OF TWO 8-BIT DATA WITHOUT CARRY:

Memory

Address

Label Mnemonics Opcode Comments

4100 LXI H, 4150 Load the HL register pair of the

contents of the address 4150H

4101

4102

4103 MOV A, M Move the first data to

Accumulator

4104 INX H HL register points to 4151H

4105 MOV B, M Move the second data to B

register

4106 ADD B Perform Addition between A &

B [A+B A] and store the sum

in Accumulator.

4107 STA 4152 Store the results in the address

4152H from the accumulator.

4108

4109

410A HLT Stop the Program

Page 36: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 36

OBSERVATION:

INPUT ADDRESS INPUT DATA OUTPUT ADDRESS OUTPUT DATA

4150 03

4152

4151 06

ADDITION OF TWO 8-BIT DATA WITH CARRY:

Memory

Address

Label Mnemonics Opcode Comments

4100 LXI H,4150 Load the HL register pair of

the content to the address

4150H.

4103 MOV A, M Move the first data to

Accumulator.

4104 INX H HL register points to 4151H

4105 MOV B, M Move the second data to B

register

4106 MVI C, 00 Initialize C register to zero

4107 ADD B Perform addition between

A & B register [A+B A]

4108 JNC 410C Loop Check for carry flag, if

CY=0, go to 410C else go to

410B

410B INR C Increment C register

410C Loop STA 4152 Store the result in 4152H

410F MOV A, C Move the content of C to

Accumulator

4110 STA 4153 Stores the data in A at

4153H

4113 HLT Stop the Program

Page 37: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 37

OBSERVATION:

INPUT ADDRESS INPUT DATA OUTPUT ADDRESS OUTPUT DATA

4150 FF 4152

4151 06 4153

SUBTRACTION OF TWO 8-BIT DATA WITHOUT BORROW:

Memory

Address

Label Mnemonics Opcode Comments

4100 LXI H,4150 Load the HL register pair of

the contents to the address

4150H.

4103 MOV A, M Move the first data to

Accumulator.

4104 INX H HL register pair points to

4151

4105 MOV B, M Move Second data to B

register.

4106 SUB B Perform Subtraction

between A and B [A-B A]

and store the difference in

Accumulator.

4107 STA 4152 Store the results in the

address 4152H.

410A HLT Stop the Program.

OBSERVATION:

INPUT ADDRESS INPUT DATA OUTPUT ADDRESS OUTPUT DATA

4150 FF 4152

4151 06

Page 38: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 38

SUBTRACTION OF TWO 8-BIT DATA WITH BORROW:

Memory

Address

Label Mnemonics Operand Opcode Comments

4100 MVI C, 00 Clear C reg.

4102 LXI H, 4500 Initialize HL reg. to 4500

4105

MOV

A, M

Transfer first data to

accumulator 4106

INX

H

Increment HL reg. to point

next memory location. 4107

SUB

M

Subtract first number from

acc. Content.

4108 JNC L1 Jump to location if result

does not yield borrow.

410B INR C Increment C reg.

410C

CMA

Complement the Acc.

content

410D ADI 01H Add 01H to content of acc.

410F

INX

H

Increment HL reg. to point

next memory location. 4110

MOV

M, A

Transfer the result from acc.

to memory. 4111

INX

H

Increment HL reg. To point

next memory location. 4112

MOV

M, C

Move carry to memory.

4113 HLT Stop the program

OBSERVATION:

INPUT ADDRESS INPUT DATA OUTPUT ADDRESS OUTPUT DATA

4150 06 4152

4151 FF 4153

Result:

Page 39: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 39

Ex No. 7(b)

Date: __/__/2012 8-bit Multiplication and Division Using 8085 Microprocessor

AIM:

1. To multiply two 8 bit numbers stored at consecutive memory locations and store the

result in memory.

2. To divide two 8-bit numbers and store the result in memory.

ALGORITHM:

1. Multiplication:

LOGIC: Multiplication can be done by repeated addition.

1. Initialize memory pointer to data location.

2. Move multiplicand to a register.

3. Move the multiplier to another register.

4. Clear the accumulator.

5. Add multiplicand to accumulator

6. Decrement multiplier

7. Repeat step 5 till multiplier comes to zero.

8. The result, which is in the accumulator, is stored in a memory location.

2.Division:

LOGIC: Division is done using the method Repeated subtraction.

1. Load Divisor and Dividend

2. Subtract divisor from dividend

3. Count the number of times of subtraction which equals the quotient

4. Stop subtraction when the dividend is less than the divisor

.The dividend now becomes the remainder. Otherwise go to step 2.

5. Stop the program execution.

Page 40: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 40

Program:

1. Multiplication:

Memory

Address

Label Mnemonics Operand Opcode Comments

4100 LXI H, 4500 Load HL register with

data in memory

location 4500

4101

4102

Transfer first data to

register B.

4103

MOV

B, M

4104

INX

H

Increment HL reg. to

point next

memory location.

4105 MVI A, 00H Clear the accumulator.

4106

4107 MVI C, 00H Clear C register for

carry.

4108

4109

L1

ADD

M

Add data in memory

location

with

accumulator.

410A JNC NEXT

Jump to NEXT if there

is no carry.

410B

410C

410D INR C Increment C register.

410E NEXT DCR B Decrement B register.

Page 41: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 41

410F JNZ L1

Jump to L1 if B is not

zero.

4110

4111

4112

INX

H

Increment HL register to

point next

memory location.

4113

MOV

M, A Transfer the result from

acc. to memory.

4114 INX H Increment HL register.

4115

MOV

M, C Transfer the result from

C reg. to memory.

4116 HLT Stop the program

2. Division:

ADDRES S OPCOD E

LABEL MNEMONIC S OPERAN D

COMMENTS

4100 MVI B,00 Clear B register for

quotient 4101

4102 LXI H,4500

Initialize HL register

to 4500H 4103

4104

4105

MOV

A,M Transfer dividend to

accumulator.

4106

INX

H

Increment HL register

to point next memory

location.

4107

LOOP

SUB

M Subtract divisor from

dividend

4108 INR B Increment B register.

4109 JNC LOOP Jump to LOOP if

result does not yield

borrow

410A

410B

410C ADD M Add divisor to acc.

410D DCR B Decrement B reg.

Page 42: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 42

410E

INX

H

Increment HL reg to

point next memory

location.

410F

MOV

M,A Transfer the remainder

from acc. to memory.

4110

INX

H

Increment HL reg to

point next memory

location.

4111

MOV

M,B Transfer the quotient

from B reg to memory.

4112 HLT Stop the program

OBSERVATION:

INPUT OUTPUT

4500 4502

4501 4503

RESULT:

Thus the 8-bit multiplication and 8-bit division was done in 8085p.

Page 43: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 43

Ex No. 8

Date: __/__/2012

Finding Smallest Number and largest Number from the Array of

Numbers Using 8085 Microprocessor AIM:

i) To find the largest element in an array.

ii) To find the smallest element in an array.

Using 8085 Microprocessor

ALGORITHM: a) the largest element in an array

1. Place all the elements of an array in the consecutive memory locations.

2. Fetch the first element from the memory location and load it in the accumulator.

3. Initialize a counter (register) with the total number of

elements in an array.

4. Decrement the counter by 1.

5. Increment the memory pointer to point to the next element.

6. Compare the accumulator content with the memory content

(next element).

7. If the accumulator content is smaller, then move the memory content (largest

element) to the accumulator. Else continue.

8. Decrement the counter by 1.

9. Repeat steps 5 to 8 until the counter reaches zero.

10. Store the result (accumulator content) in the specified memory location.

b) To find the smallest element in an array.

1. Place all the elements of an array in the consecutive memory locations.

2. Fetch the first element from the memory location and load it

in the accumulator.

3. Initialize a counter (register) with the total number of

elements in an array.

4. Decrement the counter by 1.

5. Increment the memory pointer to point to the next element.

6. Compare the accumulator content with the memory content

(next element).

7. If the accumulator content is smaller, then move the memory content (largest

element) to the accumulator. Else continue.

8. Decrement the counter by 1.

9. Repeat steps 5 to 8 until the counter reaches zero

10. Store the result (accumulator content) in the specified memory location.

Page 44: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 44

Program:

1. Largest Number:

ADDRESS OPCODE LABEL MNEMONICS OPERAN D

COMMENTS

8001 LXI H,8100

Initialize HL reg to

8100H 8002

8003

8004 MVI B,04 Initialize B reg with

no. of comparisons(n-

1)

8005

8006

MOV

A,M Transfer first data to

acc.

8007

LOOP1

INX

H

Increment HL reg. to

point next

memory location

8008 CMP M Compare M & A

8009 JNC LOOP

If A is greater than M

then go to loop 800A

800B

800C

MOV

A,M Transfer data from M

to A reg

800D LOOP DCR B Decrement B reg

800E JNZ LOOP1

If B is not Zero go to

loop1 800F

8010

8011 STA 8105

Store the result in

a memory location. 8012

8013

8014 HLT Stop the program

Page 45: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 45

2) Smallest Number:

ADDRESS OPCODE LABEL

MNEMONICS OPERAND

COMMENTS

8001 LXI H,8100 Initialize HL reg to

8100H 8002

8003

8004 MVI B,04 Initialize B reg with no. of

comparisons(n-1) 8005

8006 MOV A,M Transfer first data to acc. 8007

LOOP1

INX

H

Increment HL reg. to

point next memory

location

8008 CMP M Compare M & A

8009 JC LOOP

If A is lesser than M then go

to loop 800A

800B 800C

MOV

A,M

Transfer data from M to

A reg

800D LOOP DCR B Decrement B reg

800E JNZ LOOP1

If B is not Zero go to

loop1 800F

8010

8011 STA 8105

Store the result in a

memory location. 8012

8013

8014 HLT Stop the program

OBSERVATION:

INPUT OUTPUT

ADDRESS DATA ADDRESS DATA

8100 8105

8101

8102

8103

8104 RESULT:

Page 46: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 46

Ex No. 9

Date: __/__/2012

Sorting an Array of Numbers in Ascending and Descending Order Using 8085

Microprocessor

Aim: To sort the given number in the ascending and descending order using 8085

microprocessor.

Algorithm:

1. Ascending Order:

1. Get the numbers to be sorted from the memory locations.

2. Compare the first two numbers and if the first number is larger than second

then interchange the number.

3. If the first number is smaller, go to step 4

4. Repeat steps 2 and 3 until the numbers are in required order

2. Descending Order:

1. Get the numbers to be sorted from the memory locations.

2. Compare the first two numbers and if the first number is smaller than second

then interchange the number.

3. If the first number is larger, go to step 4

4. Repeat steps 2 and 3 until the numbers are in required order

Program:

1. Ascending Order:

ADDRESS OPCODE LABEL MNEMONICS OPERAND

COMMENTS

8000 MVI B,04 Initialize B reg with

number of comparisons

(n-1)

8001

8002 LOOP

3

LXI

H,8100

Initialize HL reg to

8100H 8003

8004

8005 MVI C,04 Initialize C reg with no. of

comparisons(n-1) 8006

Page 47: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 47

8007

LOOP2

MOV

A,M Transfer first data to

acc.

8008

INX

H

Increment HL reg. to

point next memory

location

8009 CMP M Compare M & A

800A JC LOOP1

If A is less than M then go

to loop1 800B

800C

800D

MOV

D,M Transfer data from M to

D reg

800E

MOV

M,A Transfer data from acc

to M

800F DCX H Decrement HL pair

8010

MOV

M,D Transfer data from D to

M

8011 INX H Increment HL pair

8012 LOOP1 DCR C Decrement C reg

8013 JNZ LOOP2

If C is not zero go to

loop2 8014

8015

8016 DCR B Decrement B reg

8017 JNZ LOOP3

If B is not Zero go to

loop3 8018

8019

801A HLT Stop the program

2. Descending Order:

ADDRESS OPCODE LABEL MNEMONICS OPERAND

COMMENTS

8000 MVI B,04 Initialize B reg with

number of comparisons

(n-1)

8001

8002

LOOP

3

LXI

H,8100

Initialize HL reg.

to8100H 8003

8004

8005 MVI C,04 Initialize C reg with no.

Page 48: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 48

8006 of comparisons(n-1)

8007 LOOP2 MOV A,M Transfer first data to acc. 8008

INX

H

Increment HL reg. to

point next memory

location

8009 CMP M Compare M & A

800A JNC LOOP1 If A is greater than M

then go to loop1 800B

800C 800D

MOV

D,M

Transfer data from M to

D reg 800E

MOV

M,A

Transfer data from acc to

M

800F DCX H Decrement HL pair 8010

MOV

M,D

Transfer data from D to

M

8011 INX H Increment HL pair

8012 LOOP1 DCR C Decrement C reg

8013 JNZ LOOP2

If C is not zero go to

loop2 8014

8015

8016 DCR B Decrement B reg

8017 JNZ LOOP3

If B is not Zero go to

loop3 8018

8019

801A HLT Stop the program

OBSERVATION: Ascending:

INPUT OUTPUT

MEMORY

LOCATION

DATA MEMORY

LOCATION

DATA

8100 8100

8101 8101

8102 8102

8103 8103

8104 8104

Page 49: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 49

Descending:

INPUT OUTPUT

MEMORY

LOCATION

DATA MEMORY

LOCATION

DATA

8100 8100

8101 8101

8102 8102

8103 8103

8104 8104

Result:

Page 50: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 50

Ex No. 10

Date: __/__/2012

Transferring Block of Data Using 8085 Microprocessor

AIM:

To transfer a block of data from one block to another block

using 8085 microprocessor. ALGORITHM:

1. Get the numbers to be transferred from the memorylocations.

2. Initialize the counter value.

3. Initialize the D register with the destination address

4. Increment the H and D register and Decrement the counter.

5. If counter value is not zero then move to loop 1, until counter becomes

zero.

6. Store the result in the specified memory location.

PROGRAM:

ADDRESS OPCODE LABEL MNEMONICS OPERAND

COMMENTS

8100 LXI H,8200 Initialize H reg with

number of comparisons

(n-1)

8101

8102

Initialize C reg with no. of

comparisons(n-1) 8103 MVI C,05

8104

8105 LXI D,8300 Initialize D reg with no. of

comparisons(n-1) 8106

8107

8108 LOOP1 MOV D,M

8109 INX H

810A INX D If A is less than M then go

to loop1 810B DCR C

810C JNZ LOOP1 800D

Transfer data from M to

D reg 800E

Transfer data from acc

to M

800F HLT Stop the program

Page 51: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 51

OBSERVATION:

INPUT OUTPUT

MEMORY

LOCATION

DATA MEMORY

LOCATION

DATA

8100 8100

8101 8101

8102 8102

8103 8103

8104 8104

RESULT:

Thus the transferring a block of data from one block to another block program is

executed and thus the data’s are transferred from one block to another block.

Page 52: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 52

Ex No. 11

Date: __/__/2012

STEPPER MOTOR INTERFACING WITH 8085

Aim:

The aim of the experiment is to demonstrate the forward/reverse stepped motions of a

stepper motor, using 8085 microprocessor.

Apparatus Required:

8085 Microprocessor kit, Interfacing card, Stepper Motor, Power supply unit

Algorithm:

1. Enter the program starting from the location 8100.

2. Execute the same.

3. The stepper motor rotates.

4. Speed can be varied by varying the count at DE pair.

5. Direction can be varied by entering the data in the look –up table in the reverse order.

DESCRIPTION:

The stepper motors have immense applications in printing, Industrial Robotics, Precision

tool motions in drilling, cutting and shaping machines, lathe etc.

This project is proposed to demonstrate interfacing of stepper motor to 8085

microprocessor and to run it in continuous or stepped motion in forward or reverse direction

under program control, using 8085 microprocessor.

HARDWARE DESCRIPTION:

The hardware setup consists of a microprocessor motherboard and stepper motor

interface board. The motherboard consists of 8085 MPU, 8KB EPROM, 8KB RAM, Keyboard

and display controller 8279, 21-key Hex-keypad and six numbers of seven segment LEDs and

Bus Expansion connector. The stepper motor interface consists of driver transistors for stepper

motor windings and address decoding circuit. The microprocessor output the binary sequence

through data bus, which are converted to current pulses by the driver transistors and used to drive

stepper motor. The software for the system is developed in 8085 assembly language.

Page 53: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 53

PROGRAM:

ADDRESS OPCODE LABEL MNEMONICS OPERAND COMMENTS 8100

START

LXI

H, LOOK

UP

Initialize H reg

look up table.

8102

Initialize HL reg to

8100H 8103 MVI B, 04

8104

8105 REPT MOV A,M Initialize C reg

with no. of

comparisons(n-

1)

8106

OUT

0C0H

Fig1. Block diagram of stepper motor interface

EPROM

8KB

8085

CPU

LATCH

50

Pin

Exp

an

sio

n C

on

nec

tor

System bus

RAM

8KB

8279

Keyboard

Display

D0-D

7

A0-A

7

Keyboard

AD0-AD7

Address/

Control Address/

Decoder

Latches

Buffer

LED indication for

output binary sequence

D0-D3

Co

nn

ecto

r

M

Stepper driver

Transistor driver

Display

CS

C D E F int

8 9 A B Go

4 5 6 7 Nxt

0 1 2 3 Sub

Page 54: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 54

8108

LXI

D, 0303H

Increment HL

reg. to point

next memory

location

810B DELAY NOP

810C DCX D 810D

MOV

A,E

Transfer data

from M to D reg 810E

ORA

D

Transfer data

from acc

to M 810F

JNZ

DELAY

Decrement HL

pair

8112 INX H Decrement C reg

8113 DEC B If C is not zero go

to loop2 8114 JNZ REPT

8117 JMP START

If B is not Zero go

to loop3 8118

8119 811A

LOOK

UP

DB 09 05

06 0A

Stop the

program

RESULT:

Thus the stepper motor program is executed.

Page 55: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 55

APPENDIX A

8085 OPCODE SHEET

Page 56: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 56

APPENDIX B

VIVA QUESTIONS:

Electronics:

1. Give the value of Charge, Mass of an electron.

Charge of an electron – 1.6 x 10 -19 coloumbs & Mass of an electron - 9.11 x 10 -31 Kgs

2. Define Potential.

A potential of V volts at point B with respect to point A, is defined as the work

done in taking unit positive charge from A to B , against the electric field.

3. Define Current density.

It is defined as the current per unit area of the conducting medium. J = I / A

4. Define Electron volts.

If an electron falls through a potential of one volt then its energy is 1 electron volt.

1 eV = 1.6 x 10 -19 joules

5. What is Electrostatic deflection sensitivity?

Electrostatic deflection sensitivity of a pair of deflecting plates of a cathode ray

oscilloscope ( CRO) is defined as the amount of deflection of electron spot

produced when a voltage of 1 Volt DC is applied between the corresponding plates.

6. What is the relation for the maximum number of electrons in each shell?

Ans: 2n2

7. What are valence electrons?

Electron in the outermost shell of an atom is called valence electron.

8. What is forbidden energy gap?

The space between the valence and conduction band is said to be forbidden energy gap.

9. What are conductors? Give examples?

Page 57: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 57

Conductors are materials in which the valence and conduction band overlap each other so there is a

swift movement of electrons which leads to conduction. Ex. Copper, silver.

10. What are insulators? Give examples?

Insulators are materials in which the valence and conduction band are far away

from each other. So no movement of free electrons and thus no conduction.

Ex glass, plastic.

11. Give the energy band structure of Insulator.

In Insulators there is a wide forbidden energy gap. So movement of valence

electron from valence to conduction band is not possible.

12. Give the energy band structure of Semi conductor.

In Semiconductors there is a small forbidden energy gap. So movement of

valence electron from valence to conduction band is possible if the valence

electrons are supplied with some energy.

13. Give the energy band structure of conductor.

In conductors there is no forbidden energy gap, valence band and conduction

and over lap each other. so there is a heavy movement of valence electrons.

14. what are Semiconductors? Give examples?

The materials whose electrical property lies between those of conductors and

insulators are known as Semiconductors. Ex germanium, silicon.

15. What are the types of Semiconductor?

1. Intrinsic semiconductor 2. Extrinsic semiconductor.

16. What is Intrinsic Semiconductor?

Pure form of semiconductors are said to be intrinsic semiconductor.

Ex: germanium, silicon.

17. Define Mass – action law.

Page 58: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 58

Under thermal equilibrium the product of free electron concentration (n) and hole

concentration (p) is constant regardless of the individual magnitude.

n.p = ni2

18. What is Extrinsic Semiconductor?

If certain amount of impurity atom is added to intrinsic semiconductor the

resulting semiconductor is Extrinsic or impure Semiconductor.

19. What are the types of Extrinsic Semiconductor?

1. P-type Semiconductor

2. N- Type Semiconductor.

20. What is P-type Semiconductor?

The Semiconductor which are obtained by introducing pentavalent impurity atom

(phosphorous, antimony) are known as P-type Semiconductor.

21. What is N-type Semiconductor?

The Semiconductor which is obtained by introducing trivalent impurity atom (gallium, indium) are

known as N-type Semiconductor.

22. What is doping?

Process of adding impurity to a intrinsic semiconductor atom is doping. The impurity is called

dopant.

23. Which charge carriers is majority and minority carrier in N-type

Semiconductor?

majority carrier: electron and minority carrier: holes.

24.which charge carriers is majority and minority carrier in P-type

Semiconductor?

Majority carrier: holes and minority carrier: electron

25. Why n - type or penta valent impurities are called as Donor impurities?

Page 59: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 59

n- type impurities will donate the excess negative charge carriers ( Electrons) and therefore they are

reffered to as donor impurities.

26. Why P – type or trivalent impurities are called as acceptor impurity?

p- type impurities make available positive carriers because they create holes which can accept

electron, so these impurities are said to be as acceptor impurity.

27. Give the relation for concentration of holes in the n- type material?

pn = ni

2 /ND

Where

pn - concentration of holes in the n – type semiconductor

ND - concentration of donor atoms in the n – type semiconductor

28. Give the relation for concentration of electrons in the p - type material?

np = ni

2 /NA

Where

np - concentration of electrons in p- type semiconductor

ND - concentration of acceptor atoms in the p – type semiconductor

29. Define drift current?

When an electric field is applied across the semiconductor, the holes move towards the negative

terminal of the battery and electron move towards the positive terminal of the battery. This drift

movement of charge carriers will result in a current termed as drift current.

30. Give the expression for drift current density due to electron.

Jn = q n μnE

Where,

Jn - drift current density due to electron

q- Charge of electron

Page 60: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 60

μn - Mobility of electron

E - applied electric field

31. Give the expression for drift current density due to holes.

Jp = q p μp E

Where, Jn - drift current density due to holes q - Charge of holes

μp - Mobility of holes E - applied electric field

32. Define the term diffusion current?

A concentration gradient exists, if the number of either electrons or holes is greater in one region of

a semiconductor as compared to the rest of the region. The holes and electron tend to move from

region of higher concentration to the region of lower concentration. This process in called diffusion

and the current produced due this movement is diffusion current.

33. Define mean life time of a hole or and electron.

The electron hole pair created due to thermal agitation woll disappear as a result of recombination.

Thus an average time for which a hole or an electron exist before recombination can be said as the

mean life time of a hole or electron.

34. What is the other name of continuity equation? What does it indicate?

The other name of continuity equation is equation of conservation of charge.

This equation indicates that the rate at which holes are generated thermally just equals the rate at

which holes are lost because of recombination under equilibrium conditions.

35. Define Hall effect?

If a metal or semiconductor carrying current I is placed in a transverse magnetic field B , an electric

field E is induced in the direction perpendicular to both I and B This phenomenon is known as Hall

effect.

36. Give some application of Hall Effect.

i). Hall Effect can be used to measure the strength of a magnetic field in terms of electrical voltage.

ii).It is used to determine whether the semiconductor is p – type or n- type material

iii).It is used to determine the carrier concentration

iv).It is used to determine the mobility.

Page 61: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 61

37. Define the term transition capacitance?

When a PN junction is reverse biased, the depletion layer acts like a dielectric material while P and N

–type regions on either side which has low resistance act as the plates. In this way a reverse biased

PN junction may be regarded as parallel plate capacitor and thus the capacitance across this set up

is called as the transition capacitance.

CT = A / W

Where

CT - transition capacitance

A - Cross section area of the junction

W – Width of the depletion region

38. What is a varactor diode?

A diode which is based on the voltage variable capacitance of the reverse biased p-n junction is said

to be varactor diode. It has other names such as varicaps, voltacaps.

39. Define the term diffusion capacitance.

The diffusion capacitance of a forward biased diode is defined as the rate of change of injected

charge with voltage.

CD = I / VT

Where, Cd – time constant

I – current across the diode

vT – threshold voltage

40. what is recovery time? Give its types.

When a diode has its state changed from one type of bias to other a transient accompanies the

diode response, i.e., the diode reaches steady state only after an interval of time “ tr” called as

recovery time. The recovery time can be divided in to two types such as

(i) forward recovery time

(ii) reverse recovery time

41. What is meant by forward recovery time?

Page 62: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 62

The forward recovery time may be defined as the time interval from the instant of 10% diode voltage to

the instant this voltage reaches 90% of the final value. It is represented as t f r.

42. What is meant by reverse recovery time?

The reverse recovery time can be defined as the time required for injected or the excess minority carrier

density reduced to zero , when external voltage is suddenly reversed.

43. Define storage time.

The interval time for the stored minority charge to become zero is called storage time. It is represented

as t s.

44. Define transition time.

The time when the diode has normally recovered and the diode reverse current reaches reverse

saturaton current I0 is called as transition time. It is represented as t t

45. What are break down diodes?

Diodes which are designed with adequate power dissipation capabilities to operate in the break down

region are called as break down or zener diodes.

46. What is break down? What are its types?

When the reverse voltage across the pn junction is increased rapidly at a voltage the junction breaks

down leading to a current flow across the device. This phenomenon is called as break down and the

voltage is break down voltage. The types of break down are

i) zener break down

ii)Avalanche breakdown

47. What is zener breakdown?

Page 63: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 63

Zener break down takes place when both sides of the junction are very heavily doped and Consequently

the depletion layer is thin and consequently the depletion layer is tin. When a small value of reverse bias

voltage is applied , a very strong electric field is set up across the thin depletion layer. This electric field

is enough to break the covalent bonds. Now extremely large number of free

charge carriers are produced which constitute the zener current. This process is known as zener break

down.

48. What is avalanche break down?

When bias is applied , thermally generated carriers which are already present in the diode acquire

sufficient energy from the applied potential to produce new carriers by removing valence electron from

their bonds. These newly generated additional carriers acquire more energy from the potential and they

strike the lattice and create more number of free electrons and holes. This process goes

on as long as bias is increased and the number of free carriers get multiplied. This process is termed as

avalanche multiplication. Thus the break down which occur in the junction resulting in heavy flow of

current is termed as avalanche break down.

49. How does the avalanche breakdown voltage vary with temperature?

In lightly doped diode an increase in temperature increases the probability of collision of electrons and

thus increases the depletion width. Thus the electrons and holes needs a high voltage to cross the

junction. Thus the avalanche voltage is increased with increased temperature.

50. How does the zener breakdown voltage vary with temperature?

In heavily doped diodes, an increase in temperature increases the energies of valence electrons, and

hence makes it easier for these electrons to escape from covalent bonds. Thus less voltage is sufficient

to knock or pull these electrons from their position in the crystal and convert them in to conduction

electrons. Thus zener break down voltage decreases with temperature.

51. What is a transistor (BJT)?

Transistor is a three terminal device whose output current, voltage and /or power

is controlled by input current.

52. What are the terminals present in a transistor?

Three terminals: emitter, base, collector.

53. What is FET?

FET is abbreviated for field effect transistor. It is a three terminal device with its output characteristics

controlled by input voltage.

Page 64: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 64

54. Why FET is called voltage controlled device?

The output characteristics of FET is controlled by its input voltage thus it is voltage controlled.

55. What are the two main types of FET?

1. JFET 2. MOSFET.

8085 Microprocessor:

1. What is Microprocessor? Give the power supply & clock frequency of 8085?

Ans: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.

2. List few applications of microprocessor-based system.

Ans: 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.

3. What are the functions of an accumulator?

Ans:The accumulator is the register associated with the ALU operations and sometimes I/O operations. It is an integral part of

ALU. It holds one of data to be processed by ALU. It also temporarily stores the result of the operation performed by the ALU.

4. List the 16 – bit registers of 8085 microprocessor.

Ans:Stack pointer (SP) and Program counter (PC).

5. List the allowed register pairs of 8085.

Ans:

Page 65: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 65

B-C register pair

D-E register pair

H-L register pair

11. List out the five categories of the 8085 instructions. Give examples of the instructions for each group.

Ans:

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.

12. Explain the difference between a JMP instruction and CALL instruction.

Ans: 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.

13. Explain the purpose of the I/O instructions IN and OUT.

Ans: The IN instruction 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. The IN & OUT instructions are used only on microprocessor, which use a separate address space for

interfacing.

14. What is the difference between the shift and rotate instructions?

Ans: 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.

15. How many address lines in a 4096 x 8 EPROM CHIP?

Ans: 12 address lines.

16. What are the Control signals used for DMA operation?

Ans:-HOLD & HLDA.

17. What is meant by Wait State?

Page 66: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 66

Ans:-This state is used by slow peripheral devices. The peripheral devices can transfer the data to or from the microprocessor by

using READY input line. The microprocessor remains in wait state as long as READY line is low. During the wait state, the contents

of the address, address/data and control buses are held constant.

18. List the four instructions which control the interrupt structure of the 8085 microprocessor.

Ans:-

DI ( Disable Interrupts )

EI ( Enable Interrupts )

RIM ( Read Interrupt Masks )

SIM ( Set Interrupt Masks )

19. What is meant by polling?

Ans:-Polling or device polling is a process which identifies the device that has interrupted the microprocessor.

20. What is meant by interrupt?

Ans:-Interrupt is an external signal that causes a microprocessor to jump to a specific subroutine.

21. Explain priority interrupts of 8085.

Ans:-The 8085 microprocessor has five interrupt inputs. They are TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR. These interrupts

have a fixed priority of interrupt service. If two or more interrupts go high at the same time, the 8085 will service them on priority

basis. The TRAP has the highest priority followed by RST 7.5, RST 6.5, RST 5.5. The priority of interrupts in 8085 is shown in the

table.

TRAP 1

RST 7.5 2

RST 6.5 3

RST 5.5 4

INTR 5

22. What is a microcomputer?

Ans:-A computer that is designed using a microprocessor as its CPU is called microcomputer.

Page 67: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 67

23. What is the signal classification of 8085

Ans:-All the signals of 8085 can be classified into 6 groups

Address bus

Data bus

Control and status signals

Power supply and frequency signals

Externally initiated signals

Serial I/O ports

24. What are operations performed on data in 8085

Ans:- The various operations performed are

Store 8-bit data

Perform arithmetic and logical operations

Test for conditions

Sequence the execution of instructions

Store data temporarily during execution in the defined R/W memory locations called the stack

25. Steps involved to fetch a byte in 8085

Ans:-

i. The PC places the 16-bit memory address on the address bus

ii. The control unit sends the control signal RD to enable the memory chip

iii. The byte from the memory location is placed on the data bus

iv. The byte is placed in the instruction decoder of the microprocessor and the task is carried out according to the instruction

26. How many interrupts does 8085 have, mention them

Ans:-The 8085 has 5 interrupt signals; they are INTR, RST7.5, RST6.5, RST5.5 and TRAP

27. Basic concepts in memory interfacing

Ans:-The primary function of memory interfacing is that the microprocessor should be able to read from and write into a given

register of a memory chip. To perform these operations the microprocessor should

Page 68: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 68

Be able to select the chip

Identify the register

Enable the appropriate buffer

28. Define instruction cycle, machine cycle and T-state

Ans:-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. Tcycle is defined as one

subdivision of the operation performed in one clock period

29. What is an instruction?

Ans:-An instruction is a binary pattern entered through an input device to command the microprocessor to perform that specific

function

30. What is the use of ALE

Ans:-The ALE is used to latch the lower order address so that it can be available in T2 and T3 and used for identifying the memory

address. During T1 the ALE goes high, the latch is transparent ie, the output changes according to the input data, so the output of the

latch is the lower order address. When ALE goes low the lower order address is latched until the next ALE.

31. How many machine cycles does 8085 have, mention them

Ans:The 8085 have seven machine cycles. They are

Opcode fetch

Memory read

Memory write

I/O read

I/O write

Interrupt acknowledge

Bus idle

32. Explain the signals HOLD, READY and SID

Ans:HOLD indicates that a peripheral such as DMA controller is requesting the use of address bus, data bus and control bus.

READY is used to delay the microprocessor read or write cycles until a slow responding peripheral is ready to send or accept

data.SID is used to accept serial data bit by bit

Page 69: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 69

33. Mention the categories of instruction and give two examples for each category.

Ans:The instructions of 8085 can be categorized into the following five categories

Data transfer Instructions -MOV Rd,Rs STA 16-bit

Arithmetic Instructions -ADD R DCR M

Logical Instructions -XRI 8-bit RAR

Branching Instructions -JNZ CALL 16-bit

Machine control Instructions -HLT NOP

34. Explain LDA, STA and DAA instructions

Ans:LDA copies the data byte into accumulator from the memory location specified by the 16-bit address. STA copies the data byte

from the accumulator in the memory location specified by 16-bit address. DAA changes the contents of the accumulator from binary

to 4-bit BCD digits.

35. Explain the different instruction formats with examples

Ans:The instruction set is grouped into the following formats

One byte instruction -MOV C,A

Two byte instruction -MVI A,39H

Three byte instruction -JMP 2345H

36. What is the use of addressing modes, mention the different types

Ans: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

37. What is the use of bi-directional buffers?

Ans:It is used to increase the driving capacity of the data bus. The data bus of a microcomputer system is bi-directional, so it

requires a buffer that allows the data to flow in both directions.

Page 70: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 70

38. Give the register organization of 8085

Ans:

W(8) Temp. Reg

Z(8) Temp. Reg

B(8) Register

C(8) Register

D(8) Register

E(8) Register

H(8) Register

L(8) Register

Stack Pointer (16)

Program Counter (16)

39. Define stack and explain stack related instructions

Ans:The stack is a group of memory locations in the R/W memory that is used for the temporary storage of binary information

during the execution of the program. The stack related instructions are PUSH & POP

40. Why do we use XRA A instruction

Ans:The XRA A instruction is used to clear the contents of the Accumulator and store the value 00H.

41. Compare CALL and PUSH instructions

Ans:

CALL PUSH

1.When CALL is executed the

microprocessor automatically

stores the 16-bit address of the

instruction next to CALL on the

stack.

1.PUSH The programmer

uses the instruction to save

the contents of the register

pair on the stack

2. When PUSH is executed

Page 71: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 71

2.When CALL is executed the stack

pointer is decremented by two

the stack pointer is

decremented by two

42. What is Microcontroller and Microcomputer

Ans:Microcontroller is a device that includes microprocessor; memory and I/O signal lines on a single chip, fabricated using VLSI

technology. Microcomputer is a computer that is designed using microprocessor as its CPU. It includes microprocessor, memory and

I/O.

43. Define Flags

Ans:The flags are used to reflect the data conditions in the accumulator. The 8085 flags are S-Sign flag, Z-Zero flag, AC-Auxiliary

carry flag, P-Parity flag, CYCarry flag, D7 D6 D5 D4 D3 D2 D1 D0

44. How does the microprocessor differentiate between data and instruction?

Ans:When the first m/c code of an instruction is fetched and decoded in the instruction register, the microprocessor recognizes the

number of bytes required to fetch the entire instruction. For example MVI A, Data, the second byte is always considered as data. If

the data byte is omitted by mistake whatever is in that memory location will be considered as data & the byte after the “data” will be

treated as the next instruction.

45. Compare RET and POP

Ans:

RET POP

1.RET transfers the contents of

the top two locations of the stack

to the PC

2.When RET is executed the SP is

incremented by two

3.Has 8 conditional RETURN

instructions

1.POP transfers the contents of the top

two locations of the stack to the

specified register pair

2. When POP is executed the SP is

incremented by two

3.No conditional POP instructions

Page 72: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 72

46. What is assembler?

Ans: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.

47. What is loader?

Ans:The loader copies the program into the computer‟s main memory at load time and begins the program execution at execution

time.

48. What is linker?

Ans:A linker is a program used to join together several object files into one large object file. For large programs it is more ef ficient to

divide the large program modules into smaller modules. Each module is individually written, tested & debugged. When all the

modules work they are linked together to form a large functioning program.

49. What is interrupt service routine?

Ans: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.

50.What are the various programmed data transfer methods?

Ans: i) Synchronous data transfer

ii) Asynchronous data transfer

iii) Interrupt driven data transfer

56. What are the signals used in input control signal & output control signal?

Ans: Input control signal

STB (Strobe input)

IBF (Input buffer full)

INTR(Interrupt request)

Output control signal

OBF (Output buffer full)

Page 73: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 73

ACK (Acknowledge input)

INTR(Interrupt request)

57. What are the features used mode 2 in 8255?

Ans:The single 8-bit port in-group A is available.

1. The 8-bit port is bi-directional and additionally a 5-bit control port is available.

2. Three I/O lines are available at port C, viz PC2-PC0.

3. Inputs and outputs are both latched.

4. The 5-bit control port C (PC3=PC7) is used for generating/accepting handshake signals for the 8-bit data transfer on port A.

58. What are the modes of operations used in 8253?

Ans:Each of the three counters of 8253 can be operated in one of the following six modes of operation.

1. Mode 0 (Interrupt on terminal count)

2. Mode 1 (Programmable monoshot)

3. Mode 2 (Rate generator)

4. Mode 3 (Square wave generator)

5. Mode 4 (Software triggered strobe)

6. Mode 5 (Hardware triggered strobe)

59. What are the different types of write operations used in 8253?

Ans:There are two types of write operations in 8253

(1) Writing a control word register

(2) Writing a count value into a count register

The control word register accepts data from the data buffer and initializes the counters, as required. The control word register

contents are used for

(a) Initializing the operating modes (mode 0-mode4)

(b) Selection of counters (counter 0- counter 2)

(c) Choosing binary /BCD counters

(d) Loading of the counter registers.

The mode control register is a write only register and the CPU cannot read its contents.

Page 74: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 74

60. Give the different types of command words used in 8259a?

Ans:The command words of 8259A are classified in two groups

1. Initialization command words (ICWs)

2. Operation command words (OCWs)

61. Give the operating modes of 8259a?

Ans:

(a) Fully Nested Mode

(b) End of Interrupt (EOI)

(c) Automatic Rotation

(d) Automatic EOI Mode

(e) Specific Rotation

(f) Special Mask Mode

(g) Edge and level Triggered Mode

(h) Reading 8259 Status

(i) Poll command

(j) Special Fully Nested Mode

(k) Buffered mode

(l) Cascade mode

62. Define scan counter?

Ans: The scan counter has two modes to scan the key matrix and refresh the display. In the encoded mode, the counter provides

binary count that is to be externally decoded to provide the scan lines for keyboard and display. In the decoded scan mode, the

counter internally decodes the least significant 2 bits and provides a decoded 1 out of 4 scan on SL0-SL3.The keyboard and display

both are in the same mode at a time.

63. What is the output modes used in 8279?

Ans: 8279 provides two output modes for selecting the display options.

1.Display Scan

In this mode, 8279 provides 8 or 16 character-multiplexed displays those can be organized as dual 4-bit or single 8-bit display units.

Page 75: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 75

2.Display Entry

8279 allows options for data entry on the displays. The display data is entered for display from the right side or from the left side.

64. What are the modes used in keyboard modes?

Ans: 1. Scanned Keyboard mode with 2 Key Lockout.

2. Scanned Keyboard with N-key Rollover.

3. Scanned Keyboard special Error Mode.

4. Sensor Matrix Mode.

65. What are the modes used in display modes?

Ans:1. Left Entry mode

In the left entry mode, the data is entered from the left side of the display unit.

2. Right Entry Mode.

In the right entry mode, the first entry to be displayed is entered on the rightmost display.

66. What is the use of modem control unit in 8251?

Ans: The modem control unit handles the modem handshake signals to coordinate the communication between the modem and

the USART.

67. Give the register organization of 8257?

Ans: The 8257 perform the DMA operation over four independent DMA channels. Each of the four channels of 8257 has a pair of

two 16-bit registers. DMA address register and terminal count register. Also, there are two common registers for all the channels;

namely, mode set registers and status register. Thus there are a total of ten registers. The CPU selects one of these ten registers using

address lines A0- A3.

68. What is the function of DMA address register?

Ans: Each DMA channel has one DMA address register. The function of this register is to store the address of the starting memory

location, which will be accessed by the DMA channel. Thus the starting address of the memory block that will be accessed by the

device is first loaded in the DMA address register of the channel. Naturally, the device that wants to transfer data over a DMA

channel, will access the block of memory with the starting address stored in the DMA Address Register.

Page 76: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 76

69. What is the use of terminal count register?

Ans: Each of the four DMA channels of 8257 has one terminal count register. This 16-bit register is used for ascertaining that the

data transfer through a DMA channel ceases or stops after the required number of DMA cycles.

70. What is the function of mode set register in 8257?

Ans: The mode set register is used for programming the 8257 as per the requirements of the system. The function of the mode set

register is to enable the DMA channels individually and also to set the various modes of operation.

71. What is interfacing?

Ans: An interface is a shared boundary between the devices which involves sharing information. Interfacing is the process of

making two different systems communicate with each other.

72. List the operation modes of 8255

Ans: a) I.O Mode

i. Mode 0-Simple Input/Output.

ii. Mode 1-Strobed Input/Output (Handshake mode)

iii. Mode 2-Strobed bidirectional mode

b) Bit Set/Reset Mode.

73. What is a control word?

Ans: It is a word stored in a register (control register) used to control the operation of a program digital device.

74. What is the purpose of control word written to control register in 8255?

Ans: The control words written to control register specify an I/O function for each I.O port. The bit D7 of the control word

determines either the I/O function of the BSR function.

75.What is the size of ports in 8255?

Ans:

Port-A : 8-bits

Page 77: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 77

Port-B : 8-bits

Port-CU : 4-bits

Port-CL : 4-bits

76. Distinguish between the memories mapped I/O peripheral I/O?

Ans:

Memory Mapped I/O Peripheral MappedI/O

16-bit device address 8-bit device address

Data transfer between any

general-purpose register and

I/O port.

Data is transfer only between accumulator

and I.O port

The memory map (64K) is

shared between I/O device and

system memory.

The I/O map is independent of the memory

map; 256 input device and 256 output

device can be connected

More hardware is required to

decode 16-bit address

Less hardware is required to decode 8-bit

address

Arithmetic or logic operation

can be directly performed with

I/O data

Arithmetic or logical operation cannot be

directly performed with I/O data

77. What is memory mapping?

Ans: The assignment of memory addresses to various registers in a memory chip is called as memory mapping.

78. What is I/O mapping?

Ans:The assignment of addresses to various I/O devices in the memory chip is called as I/O mapping.

79. What is an USART?

Ans:USART stands for universal synchronous/Asynchronous Receiver/Transmitter. It is a programmable communication

interface that can communicate by using either synchronous or asynchronous serial data.

Page 78: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 78

80.What is the use of 8251 chip?

8251 chip is mainly used as the asynchronous serial interface between the processor and the external equipment.

81. What is 8279?

Ans:The 8279 is a programmable Keyboard/Display interface.

82. List the major components of the keyboard/Display interface.

a. Keyboard section

b. Scan section

c. Display section

d. CPU interface section

83. What is Key bouncing?

Ans: Mechanical switches are used as keys in most of the keyboards. When a key is pressed the contact bounce back and forth

and settle down only after a small time delay (about 20ms). Even though a key is actuated once, it will appear to have been

actuated several times. This problem is called Key Bouncing.

84.Define HRQ?

Ans: The hold request output requests the access of the system bus. In non- cascaded 8257 systems, this is connected with

HOLD pin of CPU. In cascade mode, this pin of a slave is connected with a DRQ input line of the master 8257, while that of the

master is connected with HOLD input of the CPU.

85. What is the use of stepper motor?

Ans: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.

86. What is TXD?

Ans: TXD- Transmitter Data Output This output pin carries serial stream of the transmitted data bits along with other

information like start bit, stop bits and priority bit.

87. What is RXD?

Page 79: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 79

Ans: RXD- Receive Data Input This input pin of 8251A receives a composite stream of the data to be received by 8251A.

88. What is meant by key bouncing?

Ans:Microprocessor must wait until the key reach to a steady state; this is known as Key bounce.

89. What is swapping?

The procedure of fetching the chosen program segments or data from the secondary storage into the physical memory is called

„swapping‟.

90. Write the function of crossbar switch?

Ans: The crossbar switch provides the inter connection paths between the memory module and the processor. Each node of the

crossbar represents a bus switch. All these nodes may be controlled by one of these processors or by a separate one altogether.

91. What is a data amplifier?

Ans: Transceivers are the bi-directional buffers are some times they are called as data amplifiers. They are required to separate

the valid data from the time multiplexed address data signal. They are controlled by 2 signals i.e DEN & DT/R.

92. What is status flag bit?

Ans: The flag register reflects the results of logical and arithmetic instructions. The flag register digits D0, D2, D4, D6, D7 and

D11 are modified according to the result of the execution of logical and arithmetic instruction. These are called as status flag

bits.

93. What is a control flag?

Ans: The bits D8 and D9 namely, trap flag (TF) and interrupt flag (IF) bits, are used for controlling machine operation and

thus they are called control flags.

94. What is instruction pipelining?

Ans: Major function of the bus unit is to fetch instruction bytes from the memory. In fact, the instructions are fetched in

advance and stored in a queue to enable faster execution of the instructions. This concept is known as instruction pipelining.

95. Compare Microprocessor and Microcontroller.

Page 80: Electronics & Microprocessor Lab Manual

Prepared by J.Cyril Robinson Azariah & C.Moorthy Page 80

Ans:

Microprocessor Microcontroller

Microprocessor contains ALU, general purpose

registers, stack pointer, program counter, clock

timing circuit and interrupt circuit.

Microcontroller contains the circuitry

of microprocessor and in addition it

has built- in ROM, RAM, I/O

devices, timers and counters.

It has many instructions to move data between

memory and CPU.

It has one or two instructions to move

data between memory and CPU.

It has one or two bit handling instructions. It has many bit handling instructions.

Access times for memory and I/O devices are more. Less access times for built-in memory

and I/O devices.

Microprocessor based system requires more

hardware.

Microcontroller based system requires

less hardware reducing PCB size and

increasing the reliability.