314324
314324
To ensure that the Diploma Level Technical Education constantly matches the latest requirements of
technology and industry and includes the all-round personal development of students including social
concerns and to become globally competitive, technology led organization.
MISSION
To provide high quality technical and managerial manpower, information and consultancy services to the
industry and community to enable the industry and community to face the changing technological and
environmental challenges.
QUALITY POLICY
We, at MSBTE, are committed to offer the best in class academic services to the students and institutes to
enhance the delight of industry and society. This will be achieved through continual improvement in
management practices adopted in the process of curriculum design, development, implementation
evaluation and monitoring system along with adequate faculty development Programs.
CORE VALUES
Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO 9001:2015) (ISO/IEC 27001:2013)
Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO 9001:2015) (ISO/IEC 27001:2013)
4th Floor, Government Polytechnic Building, 49, Kherwadi, Bandra (East), Mumbai - 400051.
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
Seal of the
Institute
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Preface
The primary focus of any engineering laboratory/field work in the technical education system is to
develop the much needed industry relevant competencies and skills. With this in view, MSBTE embarked
on this innovative ‘K’ Scheme curricula for engineering diploma programmes with outcome- based
education as the focus and accordingly, a relatively large amount of time is allotted for the practical work.
This displays the great importance of laboratory work, making each teacher, instructor and student realize
that every minute of the laboratory time needs to be effectively utilized to develop these outcomes, rather
than doing other mundane activities. Therefore, for the successful implementation of this outcome-based
curriculum, every practical has been designed to serve as a ‘vehicle’ to develop this industry identified
competency in every student. The practical skills are difficult to develop through ‘chalk and duster’ activity
in the classroom situation. Accordingly, the ‘K’ scheme laboratory manual development team designed the
practicals to focus on the outcomes, rather than the traditional age old practice of conducting practicals to
‘verify the theory’ (which may become a byproduct along the way).
This laboratory manual is designed to help all stakeholders, especially the students, teachers and
instructors to develop in the student the predetermined outcomes. It is expected from each student that at
least a day in advance, they have to thoroughly read through the concerned practical procedure that they
will do the next day and understand the minimum theoretical background associated with the practical.
Every practical in this manual begins by identifying the competency, industry relevant skills, course
outcomes and practical outcomes which serve as a key focal point for doing the practical. The students will
then become aware about the skills they will achieve through the procedure shown there and necessary
precautions to be taken, which will help them to apply in solving real-world problems in their professional
life.
This manual also provides guidelines to teachers and instructors to effectively facilitate student-
centered lab activities through each practical exercise by arranging and managing necessary resources in
order that the students follow the procedures and precautions systematically ensuring the achievement of
outcomes in the students.
The electrical diploma holder has to work in industry as a technical person in middle level
management. He/she has to work as production, maintenance, testing engineer in various domain like power
generation, transmission, distribution, traction etc. and has to deal with different electrical measurements.
He/she also has to deal with advanced, automated and sophisticated equipment that are used in modern
techniques. While performing the above task he/she has to measure different electrical and electronic
parameters with testing, therefore he/she must require the skills for these measurements and a broad idea of
different meters and equipment. Equipment may contain digital and microcontroller based embedded
systems, and this course is intended to develop the skills to maintain and solve the application problems
related to measurement, control and automation based on microcontrollers.
Although best possible care has been taken to check for errors (if any) in this laboratory manual,
perfection may elude us as this is the first edition of this manual. Any errors and suggestions for
improvement are solicited and highly welcome.
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) i
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Programme Outcomes (POs) and Program Specific Outcomes (PSOs) to be achieved through
Practicals of this Course
Following programme outcomes are expected to be achieved through the practical of the course.
PO1: Basic and Discipline specific knowledge: Apply knowledge of basic mathematics, science and
engineering fundamentals and engineering specialization to solve the broad based Electrical engineering
problems.
PO2: Problem analysis: Identify and analyze well-defined Electrical engineering problems using codified
standard methods.
PO3: Design/ development of solutions: Design solutions for well-defined technical problems and assist
with the design of Electrical systems components or processes to meet specified needs.
PO4: Engineering Tools, Experimentation and Testing: Apply modern Electrical engineering tools and
appropriate technique to conduct standard tests and measurements.
PO5: Engineering practices for society, sustainability and environment: Apply appropriate Electrical
technology in context of society, sustainability, environment and ethical practices.
PO6: Project Management: Use Electrical engineering management principles individually, as a team
member or a leader to manage projects and effectively communicate about well- defined engineering
activities.
PO7: Life-long learning: Ability to analyze individual needs and engage in updating in the context of
Electrical technological changes.
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) ii
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
The following industry relevant skills of the competency ‘Use digital electronics and
microcontroller based systems’ are expected to be developed in the students by undertaking the
laboratory work in this practical manual.
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) iii
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Sr.
Title of the Practical CO 1 CO 2 CO 3 CO 4 CO 5
No.
Verification of the truth table of AND, OR, NOT gates
1.
using ICs. ✔ - - - -
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) iv
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Sr.
Title of the Practical CO 1 CO 2 CO 3 CO 4 CO 5
No.
Assembly language program (ALP) to perform division of
16.
8-bit data, take the input data from port 2 & display the - - ✔ ✔ -
output data on port 0
Assembly language program to transfer data from source
17.
to destination location of internal data memory.
- - ✔ ✔ -
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) v
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Guidelines to Teachers
1. Teacher should provide the guideline with demonstration of practical to the students with all features.
2. Teacher shall explain prior concepts to the students before starting of each practical.
3. Involve students in the performance of each experiment.
4. Teacher should ensure that the respective skills and competencies are developed in the students after the
completion of the practical exercise.
5. Teachers should give opportunities to students for hands-on experience after the demonstration.
6. Teacher is expected to share the skills and competencies to be developed in the students.
7. Teacher may provide additional knowledge and skills to the students even though not covered in the
manual but are expected of the students by the industry.
8. Finally give practical assignments and assess the performance of students based on tasks assigned to
check whether it is as per the instructions.
9. Teacher is expected to refer complete curriculum document and follow guidelines for implementation
10. At the beginning of the practical, which is based on the simulation, teacher should make the students
acquainted with any simulation software environment.
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) vi
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Content Page
List of Practicals and Progressive Assessment Sheet
Dated
Sr. Page Date of Date of Assessment Remarks
Title of the practical sign. of
No. No. performance submission marks (25) (if any)
teacher
Verification of the truth table of
1.* AND, OR, NOT gates using ICs 1
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) vii
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Dated
Sr. Page Date of Date of Assessment Remarks
Title of the practical sign. of
No. No. performance submission marks (25) (if any)
teacher
Assembly language program
(ALP) to perform multiplication
15.* of 8-bit data, take the input data 125
from port1 and display the output
data on port 2
Assembly language program
(ALP) to perform division of 8-bit
16.* data, take the input data from port 132
2 & display the output data on
port 0
Assembly language program to
transfer data from source to
17.* 139
destination location of internal
data memory.
Assembly language program to
18. transfer data from source to 147
destination location of external
data memory.
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) viii
Digital Electronics And Microcontroller Applications (314324)
______________________________________________________________________________________________
Dated
Sr. Page Date of Date of Assessment Remarks
Title of the practical sign. of
No. No. performance submission marks (25) (if any)
teacher
Assembly language program to
25.* 194
get a rolling display on port 2.
Interfacing of 7-segment
display with 8051 to give
28. 216
output as decimal number
from 0 to 9.
Total
______________________________________________________________________________________________
Maharashtra State Board of Technical Education (‘K’ Scheme) ix
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
Practical No.1: Verification of the truth table of AND, OR, NOT gates using ICs.
I Practical Significance
Logic gates are the basic building block of all types of digital systems. There are few basic logical
operations performed a number of times in digital systems like computers or control systems. The
basic operations which are performed are AND, OR and NOT. Knowledge of functions of logic
gates will help the students to build the digital circuits.
Figure 1.5 Part numbering scheme for 74XX00 series Logic ICs
The part numbers for 7400-series logic devices often use the following designators:
Manufacturer - This code normally consists of two letters and is a code normally used by a given
manufacturer. SN is one used by Texas Instruments. Other manufacturers have their own codes that
they place here.
Temperature range - This is indicated by these two figures. 74 indicates 0°C to 70°C commercial
and 54 military: -55°C to +125°C. For most applications the 74XX series is perfectly acceptable
and this series will be found in consumer devices.
Logic series - This is the sub-family. 7400 for example is the basic series, but there are many others.
Device - This indicates the device function / type. For example devices with 04 are hex inverters,
etc. They are common across all sub-families.
Package code - This is the package suffix. It is necessary to refer to the manufacturer's data sheets
as these codes vary between manufacturers.
For example-
VII Actual Circuit diagram used in laboratory with related equipment rating-
A) Suggestive Circuit diagram-
NOT Operation-
Figure 1.8 Circuit diagram to verify truth table of NOT operation using IC 7404.
AND Operation-
Figure 1.9 Circuit diagram to verify truth table of AND operation using IC 7408.
OR Operation-
Figure 1.10 Circuit diagram to verify truth table of OR operation using IC 7432
IX Precautions to be followed
1. Ensure proper earthing to the equipment.
2. Ensure the power switch is in ‘off’ condition initially.
3. Ensure proper settings of the power supply before use.
4. Switch off the power after completion of the practical.
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition, then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of all ICs used.
5. Make the connections as per the logic diagram given in Figure 1.8.
6. Apply logic inputs and verify the truth table for each gate by observing LED status for output.
7. Measure the output voltage with the help of a digital multimeter.
8. Write the reading in each observation table.
9. Repeat the process for all logic gates by making the connections as shown in Figure 1.9 and 1.10.
XI
XII Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
3. 1 0
4. 1 1
XV Result(s)
……………………………………………………………………………………………………….
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 8
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 9
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
Practical No.2: Building of AND, OR, NOT gates using NAND gate.
I Practical Significance
NAND gate is actually a combination of two logic gates: AND gate followed by NOT gate. So its output is
a complement of the output of an AND gate. This gate can have a minimum of two inputs; output is always
one. By using only NAND gates, it is possible to realize all logic functions: AND, OR, NOT, X-OR, X-
NOR, NOR. So this gate is also called universal gate
NAND gate as NOT gate: A NOT produces complement of the input. It can have only one input, tie the
inputs of a NAND gate together. Now it will work as a NOT gate.
VII Actual Circuit diagram used in laboratory with related equipment rating-
A) Suggestive Circuit diagram-
AND Gate:
Figure 2.5 Logic diagram and IC Circuit diagram to verify AND operation using NAND
gate IC 7400.
OR Gate:
Figure 2.6 Logic diagram and IC Circuit diagram to verify OR operation using NAND gate
IC 7400.
NOT Gate:
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
1. 0 0
2. 0 1
3. 1 0
4. 1 1
Table 2: Verification of the truth table of NOT gates using NAND (Universal) Gate IC.
1. 0
2. 1
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
2. Design digital circuit for EX-OR and EX-NOR Gates using NAND gates only.
3. Identify the IC number which is compatible for IC 7400 (NAND Gate IC), Write the part
numbering and specifications of that IC.
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
Practical No.3: Building of AND, OR, NOT gates using NOR gate.
I Practical Significance
NOR gate is actually a combination of two logic gates: OR gate followed by NOT gate. So its output is a
complement of the output of an OR gate. This gate can have a minimum of two inputs; output is always one.
By using only NOR gates, we can realize all logic functions: AND, OR, NOT, X-OR, X-NOR, NAND. So
this gate is also called as universal gate
AND Gate:
Figure 3.5 Logic diagram and IC Circuit diagram to verify AND operation using NOR
gate IC 7402.
OR Gate:
Figure 3.6 Logic diagram and IC Circuit diagram to verify OR operation using NOR
gate IC 7402.
NOT Gate:
Figure 3.7 Logic diagram and IC Circuit diagram to verify NOT operation using NOR gate IC
7402.
Maharashtra State Board of Technical Education (‘K’ Scheme) 22
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
IX Precautions to be followed
1. Ensure proper earthing to the equipment.
2. Ensure the power switch is in ‘off’ condition initially.
3. Ensure proper settings of the power supply before use.
4. Switch off the power after completion of the practical.
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of all ICs used.
5. Make the connections as per the logic diagram given in Figure 3.5.
6. Apply logic inputs and verify the truth table for each gate by observing LED status for output.
7. Measure the output voltage with the help of a digital multimeter.
8. Write the reading in each observation table.
9. Repeat the process for all logic functions by making the connections as shown in Figure 3.6 and 3.7.
XI Resources used
Sr. No. Name of Resource Specification Quantity
1
2
3
4
5
6
7
8
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
Table 1: Verification of the truth table of AND, OR gates using NOR (Universal) Gate IC.
2. 0 1
3. 1 0
4. 1 1
Table 2: Verification of the truth table of NOT gates using NOR (Universal) Gate IC.
2. 1
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
Maharashtra State Board of Technical Education (‘K’ Scheme) 26
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
Practical No.4: Building of Half adder and Half subtractor using Boolean
expressions.
I Practical Significance
Adder and subtractor are the combinational logic circuits used to perform basic arithmetic
operations like addition and subtraction of two binary digits. They are used in ALUs of computers
and other kinds of processors. They are also used in other parts of the processor to calculate
addresses, table indices, and increment and decrement operations. Half adder and subtractor can be
used only for two bit addition and subtraction respectively.
So, Half adder circuit contains an Ex-OR gate to get Sum output. To get Carry output, input A
and input B are given to the AND gate.
So, Half subtractor circuit contains an Ex-OR gate to get Difference output. To get Borrow output,
input A is inverted and then input B and inverted A input is given to the AND gate.
VII Actual Circuit diagram used in laboratory with related equipment rating-
A) Suggestive Circuit diagram-
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of all ICs used.
5. Make the connections as per the circuit diagram given in Figure 4.5 for Half adder and
figure 4.6 for Half subtractor respectively.
6. Apply logic inputs and verify the truth table for half adder as well as half subtractor by
observing LED status for output.
7. Write the reading in each observation table.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
1. 0 0
2. 0 1
3. 1 0
4. 1 1
1. 0 0
2. 0 1
3. 1 0
4. 1 1
XIV Result(s)
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………….
Maharashtra State Board of Technical Education (‘K’ Scheme) 35
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
Practical No.5: Building of Full adder and full subtractor using Boolean
expressions.
I Practical Significance
Digital computers perform a variety of information tasks. Among the functions encountered are the
various arithmetic operations. The most basic arithmetic operation is the addition or subtraction of
binary digits. A binary adder-subtractor is a combinational circuit that performs the arithmetic
operations of addition and subtraction with binary numbers. They are used in ALUs of many
computers and other kinds of processors. In this practical, students will build a circuit of full adder
and full subtractor to perform addition and subtraction of 3 bits.
So, Full adder circuit contains two 2-input Ex-OR gates (IC 7486) to get Sum output and three 2-
input AND gates (IC 7408) and two 2-input OR gates (IC 7432) to get Carry output.
So, Full subtractor circuit contains two 2-input Ex-OR gates (IC 7486) to get Difference output and
one NOT gate ( IC 7404), three 2-input AND gates (IC 7408) and two 2-input OR gates (IC 7432)
to get Borrow output.
Figure 5.5 Pin out of the ICs required for connecting the circuit
VII Actual Circuit diagram used in a laboratory with related equipment rating-
Note: Pin No. 3 and Pin No. 4 of IC 7432 are shorted to make 3 input OR gate and Pin No. 3 and Pin
No. 4 of IC 7486 are shorted to make 3 input Ex-OR gate.
Figure 5.6 Full adder circuit
Note: Pin No. 3 and Pin No. 4 of IC 7432 are shorted to make 3 input OR gate and Pin No. 3 and Pin
No. 4 of IC 7486 are shorted to make 3 input Ex-OR gate.
Figure 5.7 Full subtractor circuit
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition, then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of all ICs used.
5. Make the connections as per the circuit diagram given in Figure 5.5 for Full adder and figure 5.6 for
Full subtractor respectively.
6. Apply logic inputs and verify the truth table for Full adder as well as Full subtractor by observing
LED status for output.
7. Write the reading in each observation table.
XI Resources used
XIV Result(s)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 44
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
I Practical Significance
In most of the electronic systems, the digital data is available on more than one line. It is necessary
to route this data over a single line. Under such circumstances we require a circuit which selects
one of the many inputs at a time. This circuit is a multiplexer (MUX), which has many inputs, one
output and some select inputs. After verification of the truth table of the multiplexer, students can
improve hands-on skills to use multiplexers and can understand where and how the multiplexer is
used and how the multiplexer improves the reliability of the digital system as it reduces the number
of external wired connections.
IX Precautions to be followed
1. Ensure proper earthing to the equipment.
2. Ensure the power switch is in ‘off’ condition initially.
3. Ensure proper settings of the power supply before use.
4. Switch off the power after completion of the practical.
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of the IC used.
5. Make the connections as per the circuit diagram given in Figure 6.3.
6. Apply logic inputs at data inputs and select inputs and verify the truth table for 8:1 multiplexer by
observing LED status for output at pin no.5 and complementary output at pin no. 6.
7. Write the reading in each observation table.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
Inputs Outputs
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVI Conclusion and recommendation
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
I Practical Significance
A demultiplexer (or demux) is a device taking a single input signal and selecting one of many data-
output-lines, which is connected to the single input. An electronic demultiplexer can be considered
as a single-input, multiple-output switch. Demultiplexers are mainly used in Boolean function
generators and decoder circuits. After verification of the truth table of demultiplexer, students can
improve hands-on skills and can understand where and how to use demultiplexers.
Figure 7.4 Logic diagram and truth table of 1:4 demultiplexers of IC 74155
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition, then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of the IC used.
5. Make the connections as per the circuit diagram given in Figure 7.6.
6. Apply logic inputs at data inputs and select inputs. Verify the truth table for the first 1:4 demultiplexer
of IC74155 by observing LED status for outputs.
7. Write the reading in each observation table.
8. Repeat the procedure for the second 1:4 demultiplexer and 1:8 multiplexer of IC74155 by making the
connections as shown in figure 7.7 and 7.8.
9. Write the reading in each observation table.
XI Resources used
Inputs
Outputs
Select Inputs Strobe Data
B A 1C 1Y0 1Y 1 1Y 2 1Y
3
X X 1 X
0 0 0 1
0 1 0 1
1 0 0 1
1 1 0 1
X X X 0
Inputs
Outputs
Select Inputs Strobe Data
B A 2Y 0 2Y1 2Y 2 2Y 3
X X 1 X
0 0 0 0
0 1 0 0
1 0 0 0
1 1 0 0
X X X 1
Inputs Outputs
Strobe
Select Inputs or
Data 0 1 2 3 4 5 6 7
C B A 2Y 0 2Y 1 2Y 2 2Y 3 1Y 0 1Y 1 1Y 2 1Y 3
X X X 1
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
XIV Result(s)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 63
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 64
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Practical No.8: Testing the function of RS flip flop using NAND Gate.
I Practical Significance
The flip flop is a one bit memory cell that stores one bit of information. The data available in
memory can be used for further operation. The flip flops are used as registers in microcontrollers
or processors. It is also used in random access memory, binary counters, delay elements and bounce
elimination switches. As NAND gate is an universal gate RS flip-flop can be designed using NAND
gates only. By doing this practical students can improve their psychomotor skills and can understand
the concept of changing the output state by changing the input signals and clock signal condition
applied to the sequential logic circuits.
Inputs Outputs
Remark
S R Qn+1
0 0 Qn No Change
0 1 0 1 Reset
1 0 1 0 Set
1 1 ? ? Forbidden State
VII Actual Circuit diagram used in a laboratory with related equipment rating-
Inputs Outputs
Remark
S R Qn+1
0 0
0 1
1 0
1 1
XIV Result(s)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 71
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
……………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVIII References-
1. http://vlabs.iitkgp.ac.in/dec/exp8/exp8a/exp8p1.html
2. https://de-iitr.vlabs.ac.in/exp/truth-tables-flip-flops/procedure.html
3. https://drive.google.com/file/d/1GNCefxZBGZA56B3wstcOfBdXNLswKi_Y/view
4. https://www.electronics-tutorials.ws/sequential/seq_1.html
I Practical Significance
The limitation of SR flip flop is overcome in JK flip flop. Forbidden state which is undefined state
in SR flip flop is eliminated in JK flip flop. In JK flip flop when J=K=1, the output is in toggle state,
which is uncertain if clock input changes its state and J and K inputs remain at logic high for a
longer period than clock pulse period, this situation is called Race around condition. To avoid the
problem of race around condition the JK flip flop in Master and slave mode is used.
0 0 Qn No Change
0 1 0 1 Reset
1 0 1 0 Set
1 1 Qn Toggle state
IC7476- IC7476 is a Dual Master-slave JK flip-flop IC. It has two negative edge triggered JK flip-
flops with active low preset and clear inputs. Preset (PR) input should be low to set the output Q
(logic level 1). Clear (CR or CLR) input should be low to clear the output Q (logic level 0).
Figure 9.6 IC-7476 Dual Master-slave JK flip-flop with Preset and Clear inputs
VII Actual Circuit diagram used in a laboratory with related equipment rating-
IX Precautions to be followed
1. Ensure proper earthing to the equipment.
2. Ensure the power switch is in ‘off’ condition initially.
3. Ensure proper settings of the power supply before use.
4. Switch off the power after completion of the practical.
Maharashtra State Board of Technical Education (‘K’ Scheme) 76
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of the IC used.
5. Study the pin diagram of IC 7476 carefully.
6. Make the connections as per the circuit diagram given in Figure 9.7.
7. Apply logic inputs to J and K inputs and verify the truth table of JK flip-flop as per the theoretical
output.
8. Write the reading in each observation table.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
Table 1: Verification of the truth table of Master Slave JK Flip-flop using IC 7476
XIV Result(s)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVIII References-
1. https://www.alldatasheet.com/datasheet-pdf/pdf/50913/FAIRCHILD/7476.html
2. https://www.futurlec.com/74/IC7476.shtml
3. https://www.electronics-tutorials.ws/sequential/seq_2.html
4. https://nptel.ac.in/courses/108105132
5. https://drive.google.com/file/d/1YYEvVpB0-6xcmaJT1_eO9m8jacFBjTfW/view
6. https://de-iitr.vlabs.ac.in/exp/truth-tables-flip-flops/theory.html
Practical No.10: Construction and testing the functionality of D flip flop using IC 7476.
I Practical Significance
IC 7476 is a 16 pin dual negative edge triggered JK flip-flop IC. It can be used as D or T type flip-
flops. D flip-flops are the basic building blocks of registers. D flip flop can be designed using JK or
SR flip flop.
Figure 10.2 IC-7476 Dual Master-slave JK flip-flop with Preset and Clear inputs
Maharashtra State Board of Technical Education (‘K’ Scheme) 81
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
Input Output
Remark
D Qn+1
0 0 1 Reset
1 1 0 Set
VII Actual Circuit diagram used in a laboratory with related equipment rating-
IX Precautions to be followed
1. Ensure proper earthing to the equipment.
2. Ensure the power switch is in ‘off’ condition initially.
3. Ensure proper settings of the power supply before use.
4. Switch off the power after completion of the practical.
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition, then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of the IC used.
5. Study the pin diagram of IC 7476 carefully.
6. Make the connections to convert JK flip flop to D flip flop as per the circuit diagram given in Figure
10.5.
7. Apply logic input to D input and verify the truth table of D flip-flop as per the theoretical output.
8. Write the reading in each observation table.
XI Resources used
6
7
8
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
XIII Observation Table
Table 1: Verification of the truth table of D Flip-flop using IC 7476
XIV Result(s)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVI Conclusion and recommendation
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 86
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVIII References-
1. https://www.alldatasheet.com/datasheet-pdf/pdf/50913/FAIRCHILD/7476.html
2. https://www.futurlec.com/74/IC7476.shtml
3. https://www.electronics-tutorials.ws/sequential/seq_2.html
4. https://nptel.ac.in/courses/108105132
5. https://drive.google.com/file/d/1YYEvVpB0-6xcmaJT1_eO9m8jacFBjTfW/view
Practical No.11: Construction and testing the functionality of T flip flop using IC
7476.
I Practical Significance
IC 7476 is a 16 pin dual negative edge triggered JK flip-flop IC. It can be used as D or T type flip-
flops. D Flip-Flop (Delay Flip-Flop) is used to provide time delay. They are basic building blocks
of Shift Registers T Flip-Flop (Toggle Flip-Flop) is used in counters. It can also be used as a
frequency divider. T flip flop can be designed using JK flip flop but it can not be designed by using
SR flip flop.
Figure 11.2 IC-7476 Dual Master-slave JK flip-flop with Preset and Clear inputs
Sr.
No. Jn Kn Clk Qn
1. 0 1 X X X 1 0
2. 1 0 X X X 0 1
3. 1 1 0 0 X Previous Output
4. 1 1 X X 0 Previous Output
5. 1 1 1 0 ↓ 1 0
6. 1 1 0 1 ↓ 0 1
7. 1 1 1 1 ↓ Toggle
Input Output
Remark
T Qn+1
0 Qn Previous state output
1 Qn Toggle state output
VII Actual Circuit diagram used in a laboratory with related equipment rating-
IX Precautions to be followed
1. Ensure proper earthing to the equipment.
2. Ensure the power switch is in ‘off’ condition initially.
3. Ensure proper settings of the power supply before use.
4. Switch off the power after completion of the practical.
X Procedure
1. Identify pin configuration of the ICs and test the ICs on the IC tester.
2. If the IC is faulty then keep it in the proper e-waste bin.
3. If the IC is in OK condition then mount it on the breadboard or the trainer kit.
4. Connect pin 14 to Vcc = +5V and pin 7 to ground = 0V of the IC used.
5. Study the pin diagram of IC 7476 carefully.
6. Make the connections to convert JK flip flop to T flip flop as per the circuit diagram given in Figure
11.7.
7. Apply logic input to T input and verify the truth table of T flip-flop as per the theoretical output.
8. Write the reading in each observation table.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
………………………………………………………………………………………………………..
1. 0 1 X X 1 0
2. 1 0 X X 0 1
3. 1 1 0 X Previous output
4. 1 1 X 0 Previous output
Qn
5. 1 1 0 ↓
(Previous O/p)
6. 1 1 1 ↓ Qn
(Toggle state)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 94
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 95
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVIII References-
1. https://www.alldatasheet.com/datasheet-pdf/pdf/50913/FAIRCHILD/7476.html
2. https://www.futurlec.com/74/IC7476.shtml
3. https://www.electronics-tutorials.ws/sequential/seq_2.html
4. https://nptel.ac.in/courses/108105132
5. https://drive.google.com/file/d/1YYEvVpB0-6xcmaJT1_eO9m8jacFBjTfW/view
Figure 12.1 Pin diagram of IC-7476 Dual Master-slave JK flip-flop with Preset and Clear
inputs
Sr.
No. Jn Kn Clk Qn
1. 0 1 X X X 1 0
2. 1 0 X X X 0 1
3. 1 1 0 0 X Previous Output
4. 1 1 X X 0 Previous Output
5. 1 1 1 0 ↓ 1 0
6. 1 1 0 1 ↓ 0 1
7. 1 1 1 1 ↓ Toggle
Figure 12.3 Circuit diagram of 4-bit ripple counter using JK flip-flops (IC 7476)
Figure 12.4 Circuit diagram (connection diagram) of 4-bit ripple counter using IC 7476
B) Actual Setup diagram-
Input Output
Sr.No.
No. of clock pulses Q3 Q2 Q1 Q0 Decimal Equivalent
XIV Result(s)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 101
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
XV Interpretation of results
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVI Conclusion and recommendation
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
Maharashtra State Board of Technical Education (‘K’ Scheme) 102
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
XVIII References-
1. https://www.alldatasheet.com/datasheet-pdf/pdf/50913/FAIRCHILD/7476.html
2. https://www.futurlec.com/74/IC7476.shtml
3. https://nptel.ac.in/courses/108105132
4. https://drive.google.com/file/d/1hduygINHF4OACUnwUKUzxvuwKLONLpjh/view
Keil IDE:
Keil is 8051 development tool which includes a text Editor, Assembler Debugger, linker, Simulator,
C-complier, hex converter, locator and some in-built features like logic analyzer to observe various
waveforms. It also includes terminal emulator. Keil supports all 8051 derivatives and valuable tool
for embedded software development.
4. “Select device for Target Target-1” window will open. It displays a list of manufacturers of
microcontrollers.
5. Double click on ATMEL or INTEL, list of supported microcontrollers gets displayed. Select
80C51AH from INTEL or AT89C51 (or as per the target board) for ATMEL then click ok.
6. Click file pull down menu. Select new, a text editor window will open. Save this file in a same
folder where project was stored. Give extension as .ASM or. A51.
7. On left hand project work space window will display Target1 and Source group1.
Right click on source group; Add files to source group 1.
8. Select file type as asm source file. Now all .asm file Name will be displayed. Select appropriate
file, click ADD and close.
9. Project work space window will display ‘Target 1’ and ‘Source group 1’ with added file name.
10. Type assembly language program. End with END directive. Save the file periodically.
11. Right click on source group, click on Build target or press F7.
12. Output window will display the errors if any. If there are some errors, then remove the errors
and repeat from step number 12 until no errors.
This step is optional for the experiments which need only simulation method to observe the results.
To start the simulation. Click on Debug pull down. Then select start/Stop debug session
On start of debug session, project window will display all internal registers of 8051 and their contents.
To execute the program step by step, go no clicking on “step over” button.
Observe the logic levels of port pins, timers, interrupt etc, by clicking on Peripherals and select
appropriate.
Execute the program step by step and observe the logic levels on port pins.
Observe the serial communication by clicking VIEW pull down and select serial window-1 Option.
Addition
Sample program: Write and execute a Student activity:
program to add data 40H and 30H and Write a program to add two 8-bit numbers.
store result in 35H internal memory Assume numbers are stored in the Internal
memory locations 30H and 31H store result at
32H.
Algorithm: Algorithm:
1. Get first number in accumulator
2. Get second number in R0
3. Add both numbers
4. Store the result in internal memory
location 35H
5. Stop
Flowchart: Flowchart
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
Check rules / syntax of assembly programming.
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select 80c51AH 0r AT89C51.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output on the project window. It will display all internal registers of 8051
and their contents.
11. Note the contents of the registers/memory in observation table.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
Sr. Data stored in Register/ Memory Result after execution Status of flags
No. for the operation
1
2
3
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
XVI Conclusion and recommendation
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. http://www.circuitstoday.com/getting-started-with-keil-uvision
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
4. https://electronicsforyou.in/8051-program-for-addition-of-two-16-bit-numbers/
Subtraction can be done by taking the two`s complement of the number to be subtracted
(subtrahend), and adding it to another number (minuend). Register A is the destination address for
the subtraction. All addressing modes may be used for source address.
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
Check rules / syntax of assembly programming.
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select 80c51AH 0r AT89C51.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output on the project window. It will display all internal registers of 8051
and their contents.
11. Note the contents of the registers/memory in observation table.
Subtraction
Sample program: Write and execute a program to Student activity:
subtract data 50H and 20H and store result in 25H Write a program to subtract two 8-bit
internal memory numbers. Assume numbers are stored in
the Internal memory locations 40H and
41H store result at 42H.
Algorithm: Algorithm:
1. Get first number in accumulator
2. Get second number in R0
3. Perform subtraction of two numbers
4. Store the result in internal memory location
25H
5. Stop
Flowchart: Flowchart
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
..........................................................................................................................................................................
..........................................................................................................................................................................
...................…………………………………………………………………………………………………
………………………………………………………………………………………………………………
……………………………………………………..........................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
……………………………………………………..........................................................................................
1. http://www.circuitstoday.com/getting-started-with-keil-uvision
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
8051 microcontrollers have 4 I/O ports i.e. port 0, port 1, port 2 and port 3 each of 8-bit, which can
be configured as input or output. Hence, total 32 input/output pins allow the microcontroller to be
connected with the peripheral devices.
Pin configuration: The pin can be configured as 1 for input and 0 for output as per the logic state.
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
Check rules / syntax of assembly programming.
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select 80c51AH 0r AT89C51.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output on the project window. It will display all internal registers of 8051
and their contents.
11. Note the contents of the registers/memory in observation table.
Multiplication
Sample program: Write and execute a Student activity:
program to multiply data 04H and 02H and Write a program to multiply two 8-bit numbers.
store result in 35H internal memory Assume numbers are stored in the Internal
memory locations 40H and 41H store
LSB_result at 42H and MSB_result at 43H.
Algorithm: Algorithm:
1. Get first number in accumulator
2. Get second number in B.
3. Multiply both numbers
4. Store the LSB result in internal memory
location 35H.
5. Store the LSB result in internal memory
location 35H.
6. Stop
Take the input data from port and display the output data on other port.
Sample program 2: Write and execute a Student activity: Write a program to take the input
program to Take the input data from port1 data from port1 and display the output data on
and display the output data on port 2. port 2 and port 3.
Algorithm: Algorithm:
1. Define port 1 as input port.
2. Define port 2 as output port.
3. Read port 1 data into accumulator
4. Send accumulator data to port 2.
Maharashtra State Board of Technical Education (‘K’ Scheme) 127
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
5. Repeat the program from step 3.
6. Stop
Flowchart: Flowchart
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIII Observation Table
Sr. Data stored in Register/ Memory Result after execution Status of flags
No. for the operation
1
2
3
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
XVI Conclusion and recommendation
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
XVII Practical related questions
Note: Below given are few sample questions for reference. Teacher must design more
suchquestions to ensure the achievement of identifies CO.
1. Write assembly program to receive data from port 1, determine whether bit 2 is high, and then
send the number FFH to port 3
2. Write length in byte and oscillator period required to execute MUL AB instruction.
3. MUL A, R1 is these a valid 8051 instructions? Explain your answer.
4. Write code to send 55H to ports P1 and P2.
Maharashtra State Board of Technical Education (‘K’ Scheme) 129
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
..........................................................................................................................................................................
..........................................................................................................................................................................
...................…………………………………………………………………………………………………
………………………………………………………………………………………………………………
……………………………………………………..........................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
……………………………………………………..........................................................................................
1. http://www.circuitstoday.com/getting-started-with-keil-uvision
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
8051 microcontrollers have 4 I/O ports i.e. port 0, port 1, port 2 and port 3 each of 8-bit, which can
be configured as input or output. Hence, total 32 input/output pins allow the microcontroller to be
connected with the peripheral devices.
Pin configuration: The pin can be configured as 1 for input and 0 for output as per the logic state.
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select 80c51AH 0r AT89C51.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output on the project window. It will display all internal registers of 8051
and their contents.
11. Note the contents of the registers/memory in observation table.
Division
Sample program: Write and execute a program Student activity:
to divide data 09H by 02H and store result in Write a program to divide two 8-bit numbers.
35H and 36H internal memory Assume numbers are stored in the Internal
memory locations 40H and 41H store Quotient
at 42H and Remainder result at 43H.
Algorithm: Algorithm:
1. Get first number in accumulator
2. Get second number in B.
3. Divide content of A by content of B
4. Store the result (Quotient) in internal memory
location 35H.
5. Store the result (Remainder) in internal memory
location 36H.
6. Stop
Take the input data from port and display the output data on other port.
Sample program: Write and execute a Student activity: Write a program to take the
program to Take the input data from port 2 input data from port 2 and display the output
and display the output data on port 0. data on port 1 and port 3.
Algorithm: Algorithm:
Flowchart: Flowchart:
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1.Write length in byte and oscillator period required to execute DIV AB instruction.
2.DIV A, R1 is these a valid 8051 instructions? Explain your answer.
3.Write assembly code to convert hexadecimal number to decimal.
4.Write assembly code to toggle the bits of ports P3 continuously.
[Space for Answers]
...…………………………………………………………………………………………………….........…
………………………………………………………………………………………………………………
……………………………………………………………………………………………………....………
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
………………………………………………………………………………..................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
................................…………………………………………………………………………………………
…………………………………………………………………………………………………………..……
……………………………………………………………………………………………………………..…
……………………………………………………………………………………………………………..…
……………………………………………………………………………………………………………..…
…………………………………………………………………………………...……………………..……
………………………………………………………………………………………………………..………
………………………………………………………………………………………………………………
…………………………………………………..............................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
.....................…………………………………………………………………………………………………
………………………………………………………………………………………………………………
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
..........................................................................................................................................................................
1. http://www.circuitstoday.com/getting-started-with-keil-uvision
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
The block transfer is the process of transfer the content of group of memory location from source
address to destination address, after block transfer content of destination replace by new contents.
MEMORY WINDOW:
Before execution:
D:0x50H: 22 AB 3D 44 55
D:0X60H: 00 00 00 00 00
After execution:
D:0x50H: 22 AB 3D 44 55
D:0X60H: 22 AB 3D 44 55
IX Precautions to be followed
Check rules / syntax of assembly programming.
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select AT89C51 or 80c51AH.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output on the project window. It will display all internal registers of 8051
and their contents.
11. Note the contents of the registers/memory in observation table.
Data transfer
Sample program: Write and execute a program Student activity: Write and execute a
to transfer five data bytes of internal memory program to transfer ten data bytes of
location from 50H to 60H onwards. internal memory location from 20H to 30H
onwards.
Algorithm: Algorithm:
1. Start
2. Initialize memory pointer as a source.
3. Initialize memory pointer as a destination.
4. Initialize counter.
5. Move the content of first location in to
accumulator.
6. Move the content of accumulator to first
destination location.
7. Increment source location.
Flowchart: Flowchart
XI Resources used
Sr. Name of Resource Specifications Quantity
No.
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. http://www.keil.com
2. https://en.wikipedia.org/wiki/Intel_MCS-51
Mnemonic Operation
MOVX A, @Ri In this operation, it will copy the contents of the external address in Ri to A.
MOVX A, @DPTR Copy the contents of the external address pointed by DPTR to A.
MOVX @Ri, A Copy data from A to the external address in Ri
MOVX DPTR, A Copy data from A to the external address pointed by DPTR.
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
Check rules / syntax of assembly programming.
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select 80c51AH 0r AT89C51.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output on the project window. It will display all internal registers of 8051
and their contents.
11. Note the contents of the registers/memory in observation table.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
Source Destination
Memory Memory
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. http://www.keil.com
2. https://en.wikipedia.org/wiki/Intel_MCS-51
Performance Weightage
Indicators
Process Related: 15 Marks 60 %
1 Use of IDE tools for programming 10%
2 Coding and Debugging ability 20%
3 Observations and recording 20%
4 Follow ethical practices 10%
Product Related: 10 Marks 40%
5 Correctness of algorithm/ Flow chart 20%
6 Relevance of output of the problem definition 15%
7 Timely Submission of report, Answer to sample questions 05%
Total (25 Marks) 100 %
The block exchange is the process of transfer the content of group of memory location from source
address to destination address and vice versa, after block exchange content of source and destination
memory replace by new contents.
MEMORY WINDOW:
Before execution:
D:0x50H: 01 02 03 04 05
D:0X60H: 06 07 08 09 10
After execution:
D:0x50H: 06 07 08 09 10
D:0X60H: 01 02 03 04 05
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select 80c51AH 0r AT89C51.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output on the project window. It will display all internal registers of 8051
and their contents.
11. Note the contents of the registers/memory in observation table.
Data exchange
Sample program: Write and execute a Student activity: Write and execute a program
program to exchange five data bytes of to exchange five data bytes of internal memory
internal memory location from 50H to 60H location from 20H to 30H onwards.
onwards.
Algorithm: Algorithm:
1. Start
2. Initialize memory pointer as a source.
3. Initialize memory pointer as a destination.
4. Initialize counter.
5. Move the content of location in to
accumulator.
6. Exchange with destination memory
7. Move the content of accumulator to first
source location.
Maharashtra State Board of Technical Education (‘K’ Scheme) 155
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
8. Increment source location.
9. Increment destination location.
10. Decrement iteration count and if not zero
jump to step 5.
10. Stop
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. http://www.keil.com
2. https://en.wikipedia.org/wiki/Intel_MCS-51
Practical No.20: Assembly language program to find smallest number from the
given data bytes stored in internal / external data memory locations.
I Practical Significance
Finding smallest and largest number in a given array is common operation used in many algorithms
and applications such as data searching and sorting. This practical will help the students to develop
skills to compare numbers in an array.
Both of these instructions are used in to find the largest/smallest number program.
To find smallest number is the process of comparing content of group of memory location, after finding
smallest number result is placed in the memory.
MEMORY WINDOW:
Before execution:
D:0x40H: 22 AB 3D 44 55
D:0X50H: 00 00 00 00 00
After execution:
D:0x40H: 22 AB 3D 44 55
D:0X50H: 22 00 00 00 00
Sample program: Write ALP to find smallest Student activity: Write ALP to find smallest
number from the given FIVE bytes stored in number from the given TEN bytes stored in
internal memory locations 40H onwards and internal memory locations 50H onwards and
store the result in location 50H. store the result in location 60H.
Algorithm: Algorithm:
1. Initialize source pointer R0 to 40H.
2. Initialize byte counter.
3. Load Accumulator with largest one byte
number.
4. Move the contents of source location to B
register.
5. Compare the two numbers.
6. If number is less then next number then
go to step 8.
7. Replace number with next number which
is largest.
8. Increment memory pointer to read next
number in the array.
9. Decrement byte counter by 1.
10. If byte counter is not zero go to step 4.
11. Store the result.
12. Stop
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select AT89C51 0r 80c51AH.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output in the register/memory.
11. Note down the readings in observation table
XI Resources used
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. http://www.circuitstoday.com/getting-started-with-keil-uvision
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
Practical No.21: Assembly language program to find largest number from the given
data bytes stored in internal / external data memory locations.
I Practical Significance
Finding smallest and largest number in a given array is common operation used in many algorithms
and applications, such as finding the maximum value in a data set or arranging the numbers in
ascending and descending order. This practical will help the students to develop skills to use the
compare and loop instructions.
To find largest number is the process of comparing content of group of memory location, after finding
largest number result is placed in the memory.
MEMORY WINDOW:
Before execution:
D:0x40h: 22 AB 3D 44 55
D:0x50h: 00 00 00 00 00
After execution:
D:0x40h: 22 AB 3D 44 55
D:0x50h: AB 00 00 00 00
Sample program: Write ALP to find largest Student activity: Write ALP to find
number from the given FIVE bytes stored in largest number from the given TEN
internal memory locations 40H onwards and store bytes stored in internal memory
the result in location 50H. locations 50H onwards and store the
result in location 60H.
Algorithm: Algorithm:
1. Initialize source pointer R0 to 40H.
2. Initialize byte counter of 5 bytes.
3. Load Accumulator with smallest one byte number.
4. Move the contents of source location to B register.
5. Compare the two numbers.
6. If number is greater then next number then go to
step 8.
7. Replace number with next number which is
smallest.
8. Increment memory pointer to read next number in
the array.
9. Decrement byte counter by 1.
10. If byte counter is not zero go to step 4.
11. Store the result.
12. Stop
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select AT89C51 0r 80c51AH.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
Maharashtra State Board of Technical Education (‘K’ Scheme) 171
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
10. Observe the output in the register/memory.
11. Note down the readings in observation table
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select AT89C51 0r 80c51AH.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output in the register/memory.
11. Note down the values of external memory location in the observation table.
Sample program: Write ALP for arranging Student activity: Write ALP for arranging
FIVE numbers in ascending order stored in TEN numbers in ascending order stored in
external memory location 3000H. external memory location 4000H.
Algorithm: Algorithm:
1. Initialize comparison or pass counter
2. Initialize memory pointer DPTR to read
number from array
3. Initialize byte counter
4. Read numbers from the array
5. Compare two numbers.
6. If number <=next number, then go to step
9.
7. Interchange or swap numbers.
8. Increment memory pointer to read next
number from array.
9. Decrement byte counter by one.
10. If word counter is not equal to zero, then
go to step 2.
11. Stop
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. https://electronicsforyou.in/8051-program-to-arrange-numbers-in-ascending-order/
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
IX Precautions to be followed
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select AT89C51 0r 80c51AH.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output in the register/memory.
11. Note down the values of external memory location 3000H in the observation table.
Sample program: Write ALP for arranging Student activity: Write ALP for arranging
FIVE numbers in descending order stored in TEN numbers in descending order stored in
external memory location 3000H. external memory location 4000H.
Algorithm: Algorithm:
1. Initialize comparison or pass counter
2. Initialize memory pointer to read number
from array
3. Initialize byte counter
4. Read numbers from the array
5. Compare two numbers.
6. If number >=next number, then go to step
9.
7. Interchange or swap numbers.
8. Increment memory pointer to read next
number from array.
9. Decrement byte counter by one.
10. If word counter is not equal to zero, then
go to step 2.
11. Stop
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. http://www.keil.com
2. https://en.wikipedia.org/wiki/Intel_MCS-51
Practical No.24: Assembly language program MASK and SET particular bit of
given register using 1) bit addressable instructions 2) Logical
instructions.
I Practical Significance
Source code that does bit manipulation makes use of the bitwise operations: AND, OR, XOR, NOT,
and possibly other operations analogous to the Boolean operators; there are also bit shifts and
operations to count ones and zeros, find high and low one or zero, set, reset and test bits, extract and
insert fields, mask and zero fields, gather and scatter bits to and from specified bit positions or fields.
Most microcontrollers frequently deal with bits of data rather than bytes. This practical will help the
students to develop skills to understand how to access single bit instructions.
Program explanation
Initial Value: MOV A, #0FFH loads the accumulator with 0xFF.
Mask to Clear a Bit: ANL A, #0FBH uses the AND logical instruction to clear the 3rd bit.
The mask 0xFB (1111 1011) has all bits set to 1 except the 3rd bit.
Mask to Set a Bit: ORL A, #10H uses the OR logical instruction to set the 5th bit. The mask 0x10
(0001 0000) has the 5th bit set to 1.
VII Actual Circuit diagram used in laboratory with related equipment rating.
Note: This practical is based on Integrated Design Environment (IDE) software, not required
circuit diagram.
Maharashtra State Board of Technical Education (‘K’ Scheme) 188
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
IX Precautions to be followed
Check rules / syntax of assembly programming.
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select AT89C51 0r 80c51AH.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output in the register/memory/ Input output port.
11. Note the contents of the registers/memory/Input output port in observation table.
Sample program: Write assembly program to Student activity: Write assembly program to
Mask (clear) the 3rd bit of accumulator and set Mask (clear) the 3rd bit of Port 1 and set the
the 5th bit of accumulator 5th bit of Port 1
Algorithm: Algorithm:
1. Start of program
2. Load accumulator with a sample value, say
0xFF
3. Clear 3rd bit of accumulator (make it 0)
FBH = 1111 1011
4. Set 5th bit of accumulator (make it 1)
10H = 0001 0000
5. End of program
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
I Practical Significance
The 8051 microcontrollers have 4 input and output ports each of 8-bit. Ports can be configured as
input or output. Ports exchange the data and signals with external devices. This practical will help
the students to develop skills to handle I/O function for exchanging data and signals between
external devices and a microcontroller.
IX Precautions to be followed
X Procedure
Write Program
1. Start Keil by double clicking on Keil icon.
2. Create a new project.
3. Select device for Target.
4. Double click on ATMEL or INTEL and select AT89C51 0r 80c51AH.
5. Type the program in text editor and save as .asm or .a51.
Compile the Program
6. Right click on source group and build the target.
7. Check for any errors in the output window and remove if any.
Run, Debug the Program
8. Click on Debug and start simulation and start/stop debug session.
9. Run the program step by step.
10. Observe the output in the register/memory/Input output port.
11. Note the contents of the registers/memory/Input output port in observation table.
Sample program: Write assembly program to Student activity: Write assembly program to
get a rolling display on port 2. get a rolling display on port 1 and port 2
simultaneously.
Algorithm: Algorithm:
1. Start of program
2. Initialize Port 2 with the first LED-ON
3. Call delay subroutine for visible shifting effect
4. Rotate data left
5. Output to Port 2
6. Jump back to start of the main loop to continue
rolling
7. Call delay subroutine
8. Outer loop counter
9. Inner loop counter
10. Decrement R1 until it's zero
11. Decrement R2 until it's zero
12. Return from subroutine
13. End of program
Flowchart
XI Resources used
Sr. Name of Resource Specifications Quantity
No.
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
Performance Weightage
Indicators
Process Related: 15 Marks 60 %
1 Use of IDE tools for programming 10%
2 Coding and Debugging ability 20%
3 Observations and recording 20%
4 Follow ethical practices 10%
Product Related: 10 Marks 40%
5 Correctness of algorithm/ Flow chart 20%
6 Relevance of output of the problem definition 15%
7 Timely Submission of report, Answer to sample questions 05%
Total (25 Marks) 100 %
Practical No.26: Interfacing of LED and switch with 8051 to turn ON / OFF the LED.
I Practical Significance
Switch and LED are the basic examples of input and output device used in Industrial or domestic
appliances. This practical will help the students to develop skills to interface LED and switch to
microcontroller.
When the switch is OFF (not pressed), the input to pin P2.0 is a HIGH pulse (1).
When the switch is ON (pressed), the input to pin P2.0 is a LOW pulse (0).
Switch is interfaced using a negative logic with a 10k ohm pull-up resistor.
Sample program: Write and execute assembly Student activity: Write and execute
program to read the status of key and turn on assembly program to turn on 8 LEDs
LED connected to port pin of microcontroller connected to port 2 when switch is
and turn off after some delay. pressed.
Algorithm:
Algorithm:
1. Initialize port pin P0.0 as input pin
2. Make LED off initially
3. Monitor the status of switch
4. If switch is closed then turn ON the LED.
Maharashtra State Board of Technical Education (‘K’ Scheme) 203
DIGITAL ELECTRONICS AND MICROCONTROLLER APPLICATIONS (314324)
5. Add some delay
6. Turn OFF the LED
7. Repeat from step 3
Flowchart: Flowchart
VII Actual Circuit diagram used in laboratory with related equipment rating.
IX Precautions to be followed
Check rules / syntax of assembly programming.
X Procedure
1. Write algorithm for given problem.
2. Draw flowchart for the same.
3. Develop assembly program using Keil IDE or any other relevant software tool.
4. Debug program on IDE.
5. Execute program on IDE.
6. Create hex file for the program.
7. Download hex code in EPROM/Flash memory of microcontroller.
8. Interface Switch and LED to microcontroller as per circuit diagram shown in Figure 26.3
9. Press switch and observe LED On/Off status.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. http://www.circuitstoday.com/getting-started-with-keil-uvision
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
Practical No.27: Interfacing of RELAY with 8051 to turn ON / OFF the LED.
I Practical Significance
In Industrial applications low power devices microcontrollers drive relays are used to control
electrical loads beyond their direct drive capability. Relays are used wherever it is necessary to
control a high power or high voltage circuit with a low power circuit, especially when isolation is
desirable. This practical will help the students to develop skills to interface relay to microcontroller
and turn it ON and OFF.
VII Actual Circuit diagram used in laboratory with related equipment rating.
IX Precautions to be followed
X Procedure
Flowchart: Flowchart
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
..........................................................................................................................................................................
..........................................................................................................................................................................
...................…………………………………………………………………………………………………
……………………………………………………..........................................................................................
..........................................................................................................................................................................
……………………………………………………..........................................................................................
..........................................................................................................................................................................
……………………………………………………..........................................................................................
..........................................................................................................................................................................
……………………………………………………..........................................................................................
1. https://en.wikipedia.org/wiki/Relay
2. https://en.wikipedia.org/wiki/Intel_MCS-51
Fig 28.1 Common Anode Seven segment display and pin configuration
LED segment is ON for logic ‘0’ (Ground) and OFF for logic ‘1’ (+5V).
VII Actual Circuit diagram used in laboratory with related equipment rating.
IX Precautions to be followed
X Procedure
1. Write algorithm for given problem.
2. Draw flowchart.
3. Develop assembly program using Integrated Development Environment (Keil IDE) or any other
relevant software tool.
4. Debug program on IDE.
5. Execute program on IDE.
XI Resources used
Sr. Name of Resource Specifications Quantity
No.
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. https://en.wikipedia.org/wiki/Seven-segment_display
2. https://en.wikipedia.org/wiki/Intel_MCS-51
Performance Weightage
Indicators
Process Related: 15 Marks 60 %
1 Use of IDE tools for programming 10%
2 Coding and Debugging ability 20%
3 Identifying components on developer kit 20%
4 Follow ethical practices. 10%
Product Related: 10 Marks 40%
5 Correctness of algorithm/ Flow chart 20%
6 Relevance of output of the problem definition 15%
7 Timely Submission of report, Answer to sample questions 05%
Total (25 Marks) 100 %
Rs=1 -data register RW=1 -reading from LCD. EN= high to low (Logic ‘1’ delay
Rs=0 -command RW=0 -writing to LCD. Logic ‘0’) for use LCD module.
Pin Pin
Function Name Function Name
No No
6 Sends data to data pins when a Enable(E) 14 8-bit data pins DB7
high to low pulse is given
VII Actual Circuit diagram used in laboratory with related equipment rating.
1. LCD panel is made up of glass avoid applying strong pressure on to the surface of display area.
2. Ensure proper connection then only give electric supply to circuit.
X Procedure
1. Write algorithm for given problem.
2. Draw flowchart for the same.
3. Develop assembly program using Integrated Development Environment (IDE) or any other relevant
software tool.
4. Debug program on IDE.
5. Execute program on IDE.
6. Create hex file for the above program.
7. Interface LCD display to microcontroller as per circuit diagram shown in Fig 29.2
8. Download hex code in EPROM/Flash memory of microcontroller
9. Observe output on LCD display and note it in observation Table
Sample program: Develop and execute ALP to Student activity: Develop and execute
display “uC AT89c51" on first line of LCD. ALP to display “MSBTE” on first line of
LCD.
Algorithm: Algorithm:
1.Define control signals RS, RW and EN for LCD
2.Make LCD connected port as an output port.
3.Initialize LCD by sending commands.
4.Load DPTR with program memory address.
5.Set register as counter R2 =10 (decimal) for to
display “uC AT89c51"
6.Clear Accumulator
7.Read ASCII from code memory into Accumulator.
8.Send code to output port where LCD is connected.
Flowchart: Flowchart
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
1. https://en.wikipedia.org/wiki/Liquid-crystal_display
2. http://www.keil.com
3. https://en.wikipedia.org/wiki/Intel_MCS-51
Practical No.30: Interfacing of stepper motor with 8051 microcontroller and write
ALP to rotate stepper motor in clockwise and anti-clockwise
direction at given angles.
I Practical Significance
Different field applications require precise positioning, repeatability of movement in clockwise and
anticlockwise direction with good accuracy. Stepper motors are controlled by microcontrollers in
such areas like in computer peripherals, Business machines, process control and for making robots.
This practical will help the students to develop skills to interface stepper motor to 8051 and rotate
in clockwise and anticlockwise direction.
Table 30.1 Stepper Motor Step Angles Table 30.2 Two Coil Excitation Full Step Sequence
Frame 1: The top electromagnet (1) is turned on, Frame 2: The top electromagnet (1) is turned
attracting the nearest teeth of the gear-shaped off, and the right electromagnet (2) is
iron rotor. With the teeth aligned to energized, pulling the teeth into alignment
electromagnet 1, they will be slightly offset from with it. This results in a rotation of 1.8° in this
right electromagnet (2). example.
Frame 3: The bottom electromagnet (3) is Frame 4: The left electromagnet (4) is
energized; another 1.8° rotation occurs. energized, rotating again by 1.8°. When the top
electromagnet (1) is again enabled, the rotor
will have rotated by one tooth position; since
there are 50 teeth, it will take 200 steps to make
a full rotation in this example.
VII Actual Circuit diagram used in laboratory with related equipment rating.
IX Precautions to be followed
1. Use always driver circuit while interfacing stepper motor to microcontroller.
2. Check rules / syntax of assembly programming.
X Procedure
1. Write algorithm for given problem.
2. Draw flowchart for the same.
3. Develop assembly program using Integrated Development Environment (IDE) or any other relevant
software tool.
4. Debug program on IDE.
5. Execute program on IDE.
6. Create hex file for the above program.
7. Download hex code in EPROM/Flash memory of the microcontroller.
8. Interface stepper motor to microcontroller as per circuit diagram shown in fig 30.1
9. Observe rotation of stepper motor and record in observation Table.
Sample program: Develop assembly language Student activity:
program to rotate stepper motor in clockwise Develop assembly program for stepper motor
direction by 1800. Assume step angle 1.8° to rotate 90° in anticlockwise direction using
rotate instruction. Assume step angle 1.8°
Algorithm: Algorithm:
1. Make the Port used to Interface stepper
motor as an output port.
2. Set register as counter R2 =25 for 100 steps
i.e.180° rotation.
3. Set register as counter R3= 4 for full step
code
4. Initialize pointer to table which is in code
memory i.e. DPTR.
5. Clear accumulator.
6. Read data from code memory.
7. Send code to stepper motor.
8. Increment DPTR to access next memory
location code.
9. Decrement R3 and check for zero. Is counter
R3=0? NO- go to step 5 else go to next.
10. Decrement R2 and check for zero. Is counter
R2=0? NO- go to step 3 else go to next.
11. Stop.
XI Resources used
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XIV Result(s)
………………………………………………………………………………………………………..
.……………………………………………………………………………………………………….
..………………………………………………………………………………………………………
………………………………………………………………………………………………………..
XV Interpretation of results
………………………………………………………………………………………………………..
.........………………………………………………………………………………………………….
………………………………………………………………………………………………………..
……......................................................................................................................................................
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………