0% found this document useful (0 votes)
51 views43 pages

Institute Vision: To Shape Electronics & Telecommunication Engineers To Be Professionally and Socially Competent

Here are the steps to write an 8051 program to add two 8-bit numbers stored at two memory locations and observe the result at specified location: 1. Define the memory locations to store the operands (numbers to be added) and the result: Operand1 equ 50h Operand2 equ 51h Result equ 52h 2. Load the operands into the accumulator: MOV A, Operand1 ADD A, Operand2 3. Store the result back to the result memory location: MOV Result, A 4. Similarly for subtraction: 1. Define the memory locations: Operand1 equ 50h Operand2 equ 51

Uploaded by

FARHAAN. A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views43 pages

Institute Vision: To Shape Electronics & Telecommunication Engineers To Be Professionally and Socially Competent

Here are the steps to write an 8051 program to add two 8-bit numbers stored at two memory locations and observe the result at specified location: 1. Define the memory locations to store the operands (numbers to be added) and the result: Operand1 equ 50h Operand2 equ 51h Result equ 52h 2. Load the operands into the accumulator: MOV A, Operand1 ADD A, Operand2 3. Store the result back to the result memory location: MOV Result, A 4. Similarly for subtraction: 1. Define the memory locations: Operand1 equ 50h Operand2 equ 51

Uploaded by

FARHAAN. A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INSTITUTE VISION

To be an organization with potential for excellence in engineering and management for the
advancement of society and humankind.

INSTITUTE MISSION

1. To excel in academics, practical engineering, management and to commence research


endeavours.

2. To prepare students for future opportunities.

3. To nurture students with social and ethical responsibilities.

VISION OF DEPARTMENT

To shape Electronics & Telecommunication engineers to be professionally


and socially competent.

MISSION OF DEPARTMENT

1. To aim for excellence in teaching learning process and analytical thinking.

2. To conduct skill development programs in order to become industry ready.

3. To impart students with social and moral education.


2

Excelsior’s Education Society

K. C. COLLEGE OF ENGINEERING

AND MANAGEMENT STUDIES AND RESEARCH


THANE(EAST).

This is to certify that Mr. / Ms. __________________________________


of Semester Branch Roll No.

has performed and successfully completed all the practical’s in the subject
of for the
academic year 20 to 20 as prescribed by University of Mumbai.

DATE :-

------------------------
Internal Examiner Practical Incharge

Head of Department External Examiner

COLLEGE SEAL
3
Program Outcomes

Engineering Graduates will be able to:

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex engineering
problems.

2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated Conclusions using first principles of
mathematics, natural sciences, and engineering sciences.

3. Design/development of solutions: Design solutions for complex engineering problems


and design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.

4. Conduct investigations of complex problems: Use research-based knowledge and


research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.

5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.

6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.

7. Environment and sustainability: Understand the impact of the professional engineering


solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.

8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.

9. Individual and team work: Function effectively as an individual, and as a member or


leader in diverse teams, and in multidisciplinary settings.

10. Communication: Communicate effectively on complex engineering activities with the


engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.

11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.

12. Life-long learning: Recognize the need for and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological change.
Department of Electronics and Telecommunication
Subject: Microcontrollers & Class: S.E/Sem IV
Applications Laboratory

ECL601 Course outcome


At the end of the course student will be able to
ECL401.1 Understand different development tools required to develop
microcontroller based systems.
ECL401.2 Write assembly language programs for arithmetic and logical
operations, code conversion & data transfer operations.
ECL401.3 Write assembly language programs for general purpose I/O,
Timers & Interrupts.

ECL401.4 Interface & write programs for Input and Output devices

ECL401.5 Develop microcontroller-based Applications.


8

RUBRICS OF PRACTICAL

Rubrics Max

Marks 15–12 12-9 9-6 6-0


Description
Weight

Successful OUTPUT Few errors in the

Implementation completion with correct not OUTPUT Incorrect


5 accurate OUTPUT
(R1) precise (3-2)
OUTPUT (2-0)
(4-3)
(5-4)

Understand Understand

Understanding
experiment and experiment but Improper No
(R2)
5 drawn correct CONCLUSION CONCLUSION CONCLUSION
CONCLUSION less accurate (3-2) (2-0)
(5-4) (4-3)

Punctuality and Submission Submission after Submission after Submission after

three weeks or
discipline 5 within a week a week two weeks
more
(R3) (5-4) (3-2) (3-2)
(2-0)
TABLE OF CONTENTS
Sr. Name of Experiment Date of Date of Pg Grade Sign
No Performance Submission No.

1 Download and Installation of Edsim


51simulator.
Perform basic Programming.
A] Write an 8051 program to add two 8 bit
numbers stored at two memory locations
andobserve the result at specified
2 location.
B] Write an 8051 program to subtract two 8
bitnumbers stored at two memory locations
and observe the result at specified location.
A] Write an 8051 program to multiply two 8-
bitnos. stored at two different memory
3 locations&observe the result at specified
locations.
B] Write an 8051 program to divide two 8-
bit nos. stored at two different memory
location &observe the result in ACC. and
remainder in Bregister
4 Write a program to perform logical operations
on numbers stored on memory locations or by
Immediate and direct addressing mode.

Download and Installation of Edsim51


5 simulator. Perform basic Programming
Write an 8051program to transfer block of
data from internal memory 50h to 60h.
Assume blocksize.

6 Write an 8051program to generate square


wave.
7 Write an 8051program to generate triangular
wave and observe the result at specified
location.
8
Interfacing of 8051 with stepper motor
9 Display of personal individua name on LCD
Display.
1 Innovative experiments: Interface PIR sensor
0 with Arduino on Tinkercad

1
1 Mini project based on any application related
to 8051 or ARM7 can be implemented.
1 Presentation of Mini-Project and video of
2 mini-Project
Total Grade / Marks :-

Avg. marks of Experiments Avg. marks of Assignments


(A) (B) Total
Marks

(A+B)

Obtained Out of Obtained Out of

_______________________________ ____________________

Practical Incharge Date


EXPERIMENT NO. 2(A) & (B)

AIM: - A] Write and 8051 program to add two 8-bit numbers stored at two memory
locations and observe the result at specified location.
B] Write and 8051 program to sub two 8-bit numbers stored at two memory locations
and observe the result at specified location.

Lab Outcome: -
Write programs for 8051 microcontrollers.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 2A

AIM:- A] Write an 8051 program to add two 8-bit numbers stored at two memory locations and observe
the result at specified location.

APPARATUS: - PC, EDSIM 51 SIMULATOR, JAVA

THEORY: -

In this program, we perform the addition of two 8-bit numbers which is an arithmetic
operation. Thus we use A and B registers which are directly connected to ALU. In this
program the two 8- bit numbers are stored in these registers. Then using ADD instruction
weadd the data of register A and data of register B and check the result.
ORG 00H is the starting address of the program.
Giving the values as #0FFH and #00H initializes the ports as input and output ports
respectively.
R1 register is initialized to 0 so as to store any carry produced during the sum.
MOV B, P0 moves the value present in P0 to the B register.
MOV A, P1 moves the value present in P1 to Accumulator.
ADD AB adds the values present in Accumulator and B register and stores the result in
Accumulator.

PROGRAM:

ASM ORG 3000

MOV A, #22H

MOV B, #26H

ADD A,B

SJMP 3005

STEPS TO BE FOLLOWED:

1. Connect the power supply and switch ON the power button.

2. Press A to write a program in a Assembly language.

3. ASM ORG 3000.

4. Press. [CODE]
5. To set break point, press ‘T’. (i.e., to end address) [Enter two times]

6. To enable break point press ‘ E’ enter 2 times.

7. To execute press ‘G’. (enter)

8. To see result, press ‘R’.

9. To see result in another Register press spacebar.

RESULT:-

CONCLUSION:- With the help of 8051 Microcontroller LCD Kit we have performed the 8-bit
addition and observed the result in Accumulator and Register B .
EXPERIMENT NO. 2B

AIM: - B] Write an 8051 program to subtract two 8 bitnumbers stored at two memory locations and
observe the result at specified location.

APPARATUS: - 8051 kit.

THEORY: -
In this program, we perform the addition of two 8-bit numbers which is an arithmetic operation.

Thus, we use A and B registers which are directly connected to ALU. In this program the two 8-

bitnumbers are stored in these registers. Then using SUBB instruction, we subtract the data of

registerA and data of register B and check the result.

PROGRAM:

ASM ORG 3000

MOV A, #22H

MOV R0, #11H

SUBB A, R0

SJMP 3005

STEPS TO BE FOLLOWED:

1. Connect the power supply and switch ON the power button.

2. Press A to write a program in a Assembly language.

3. ASM ORG 3000.

4. Press. [CODE]

5. To set break point, press ‘T’. (i.e., to end address) [Enter two times]

6. To enable break point press ‘ E’ enter 2 times.


7. To execute press ‘G’. (enter)

8. To see result, press ‘R’.

9. To see result in another Register press spacebar.

RESULT:-

CONCLUSION: With the help of 8051 Microcontroller LCD Kit we have performed the 8-bit
addition and observed the result in Accumulator and Register B .
EXPERIMENT NO. 3(A) & (B)

AIM:- AIM: - A] Write and 8051 program to multiply two 8-bit numbers stored at
two memory locations and observe the result at specified location.
B] Write and 8051 program to divide two 8-bit numbers stored at two memory
locations and observe the result at specified location.

Lab Outcome: -
Write programs for 8051 microcontrollers.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 3A

AIM:- Write an 8051 program to multiply two 8-bit nos. stored at two different memory locations&observe the
result at specified locations.

APPARATUS: 8051 kit .

THEORY:-

In this program, we perform the multiplication of two 8-bit numbers which is an


arithmetic operation. Thus, we use A and B registers which are directly connected to
ALU. In this program two 8-bit numbers are stored in 9000H memory address and
9001H memory address which are pointed by data pointer and further moved into A
and B registers and multiplied by using MUL instruction. The result is stored in
register A which is moved to 9002H and 9003H.

PROGRAM:

ASM ORG 3000

MOV A, #12H

MOV B, #3H

MUL A, B

SJMP 3005

STEPS TO BE FOLLOWED:

1. Connect the power supply and switch ON the power button.

2. Press A to write a program in a Assembly language.

3. ASM ORG 3000.

4. Press. [CODE]

5. To set break point, press ‘T’. (i.e., to end address) [Enter two times]

6. To enable break point press ‘ E’ enter 2 times.

7. To execute press ‘G’. (enter)


8. To see result, press ‘R’.

9. To see result in another Register press spacebar.

RESULT:-

CONCLUSION:- With the help of 8051 Microcontroller LCD Kit we have performed the 8-bit
multiplication and observed the result in Accumulator and Register B
EXPERIMENT NO. 3B

AIM: -Write an 8051 program to divide two 8-bit nos. stored at two different
memory location & observe the result in accumulator and remainder in B register..

APPARATUS: -8051 kit, Opcode sheet.

THEORY: -

In this program, we perform the division of two 8-bit numbers which is an arithmetic
operation. Thus, we use A and B registers which are directly connected to ALU. In
this program two 8-bit numbers are stored in 9301H and 9302H memory address
which are pointed by data pointer and further moved into A and B registers. Then
using DIV instruction we divide data of register A by register B and check the result
(quotient stored in accumulator and remainder if any will be stored in B register).

PROGRAM:

ASM ORG 3000

MOV A, #24H

MOV B, #06H

DIV A, B

SJMP 3005

STEPS TO BE FOLLOWED:

1. Connect the power supply and switch ON the power button.

2. Press A to write a program in a Assembly language.

3. ASM ORG 3000.

4. Press. [CODE]

5. To set break point, press ‘T’. (i.e., to end address) [Enter two times]

6. To enable break point press ‘ E’ enter 2 times.

7. To execute press ‘G’. (enter)

8. To see result, press ‘R’.


9. To see result in another Register press spacebar.

RESULT :-

CONCLUSION :- With the help of 8051 Microcontroller LCD Kit we have performed the 8-bit
addition and observed the result in Accumulator and Register B .
EXPERIMENT NO. 4

AIM: - Write a program to perform logical operations on numbers stored on memory


locations or by Immediate and direct addressing mode.

Lab Outcome: -

Write programs for 8051 microcontrollers.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 4
AIM:- WAP to perform logical operations of numbers stored on memory location or by Immediate and
Direct addressing mode.

APPARATUS:- 8051 kit .

THEORY:-

ANL:

The AND instructions compare the bits in the source and the destination operand and then store the result in
the accumulator after performing the AND operation.
Performs the AND operation on the data stored in the accumulator and the register Rn. The result is then
stored in the accumulator(e.g., A, Rn)
Uses the data stored in the register as an address and performs the AND operation on the data stored at that
address and the accumulator. The result is then stored in the accumulator(e.g., A, @Rn)

ORL:

The OR instructions compare the bits in the source and the destination operand and then store the result in
the accumulator after performing the OR operation.
Performs the OR operation on the data given by the programmer and the accumulator. The result is then
stored in the accumulator(e.g., A, #data)
Performs the OR operation on the data stored at the given address and the accumulator. The result is then
stored at the given address(e.g., Address, A)

XRL:

These instructions compare the bits in the source and the destination operand and then store the result in the
accumulator after performing the XOR operation.
Performs the XOR operation on the data stored at the given address and the data given by the programmer.
The result is then stored at the given address(e.g., Address, #data)
Performs the XOR operation on the data stored at the given address and the accumulator. The result is then
stored at the given address(e.g., Address, A)
RESULT:-

[ANL, ORL, XRL]

CONCLUSION:- Logical operations of numbers stored on memory location or by Immediate and Direct
addressing mode using EdSim.
EXPERIMENT NO. 5
AIM:- Write an 8051program to transfer block of data from internal
memory 50h to 60h. Assume block size.

Lab Outcome: -

Write programs for 8051 microcontrollers.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 5

AIM:- Write an 8051program to transfer block of data from internal memory 50h to
[Link] blocksize.

APPARATUS: EdSim.

THEORY: -

Initialize SP with an immediate data #90H. Initialize the pointer i.e DPTR
#9320H. Block of numbers are stored at location 9320H. Initialize the register
R0=0AH as the counter. Clear the internal memory address 29H & take first number
in accumulator. Compare the number with the lowest number. Start comparison with
every number. If number is greater than number in accumulator, carry will be
generated. Take that number in accumulator. If they are equal check for zero flag. It
will be zero, if it is less same number will remain in accumulator. Check for every
number. It continues till count tends to 0. Once count is 0, program stops, and
largest number is available.
PROGRAM:
MOV R0, #60H

MOV R1, #90H

MOV R3, #08H

BACK: MOV A, @R0

MOV @R1, A

INC R0

INC R1

DJNZ R2, BACK

END
RESULT :-

CONCLUSION :- Transferring of block of data from internal memory 50h to 60h


is done using Immediate instruction.
EXPERIMENT NO. 6

AIM:- Write an 8051program to generate square wave and observe the result at
specified location.

Lab Outcome: -

Write programs for 8051 microcontrollers.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 6

AIM:- Write an 8051program to generate square wave and observe the result at specified location.

APPARATUS:- PC, EDSIM 51 SIMULATOR, JAVA

THEORY :-

A timer can be generalized as a multi-bit counter which increments/decrements itself on receiving a


clock signal and produces an interrupt signal up on roll over. When the counter is running on the processor’s
clock , it is called a “Timer”, which counts a predefined number of processor clock pulses and generates a
programmable delay. When the counter is running on an external clock source (may be a periodic or
aperiodic external signal) it is called a “Counter” itself and it can be used for counting external events.
While designing delay programs in 8051, calculating the initial value that has to be loaded in to TH and TL
registers forms a very important thing. Let us see how it is done.
• Assume the processor is clocked by a 12MHz crystal.
• That means, the timer clock input will be 12MHz/12 = 1MHz.
• That means, the time taken for the timer to make one increment = 1/1MHz = 1uS.
• For a time delay of “X” uS the timer has to make “X” increments.
• 2^16 = 65536 is the maximum number of counts possible for a r.16 bit timer.
• Let TH be the value value that has to be loaded to TH register and TL be the value that has to be
loaded to TL register.

Program:-
ORG 0000H

MOV TMOD,#20H

MOV TH1,#1AH

MAIN:CPL P1.3

ACALL DELAY

SJMP MAIN

DELAY:SETB TR1

AGAIN:JNB TF1,AGAIN

CLR TR1

CLR TF1

RET

END
RESULT:-
OUTPUT OF SQAURE WAVE:

CONCLUSION:- Generation of square wave is performed using EdSim and the output is seen on DAC
Scope.
EXPERIMENT NO. 7

AIM: - Write an 8051program to generate triangular wave and observe the


result at specified location.

Lab Outcome: -
Write programs for 8051 microcontrollers.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 7

AIM:- Write an 8051program to generate triangular wave and observe the result at specified location.

APPARATUS:- PC, EDSIM 51 SIMULATOR, JAVA

THEORY:-
A timer can be generalized as a multi-bit counter which increments/decrements itself on receiving a
clock signal and produces an interrupt signal up on roll over. When the counter is running on the processor’s
clock , it is called a “Timer”, which counts a predefined number of processor clock pulses and generates a
programmable delay. When the counter is running on an external clock source (may be a periodic or
aperiodic external signal) it is called a “Counter” itself and it can be used for counting external events.
While designing delay programs in 8051, calculating the initial value that has to be loaded in to TH and TL
registers forms a very important thing. Let us see how it is done.
• Assume the processor is clocked by a 12MHz crystal.
• That means, the timer clock input will be 12MHz/12 = 1MHz.
• That means, the time taken for the timer to make one increment = 1/1MHz = 1uS.
• For a time delay of “X” uS the timer has to make “X” increments.
• 2^16 = 65536 is the maximum number of counts possible for a r.16 bit timer.
• Let TH be the value value that has to be loaded to TH register and TL be the value that has to be
loaded to TL register.

PROGRAM:-
CLR P0.7

MOV A, #00H

UP:INC A

MOV P1,A

CJNE A,0FFH,UP

DOWN: DEC A

MOV P1,A

CJNE A,#00H,DOWN

SJMP UP

END
RESULT:-

OUTPUT OF TRIANGULAR WAVE:

CONCLUSION:- Generation of triangular wave is performed using EdSim and the output is seen on DAC
Scope.
EXPERIMENT NO. 8

AIM: - Interfacing of 8051 with stepper motor.

Lab Outcome: -

Design an application using microcontroller.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 8

AIM:- Interfacing of 8051 with stepper motor

APPARATUS:- PC, EDSIM 51 SIMULATOR, JAVA

THEORY (Program):-

A Stepper Motor or a step motor is a brushless, synchronous motor which divides a full rotation into a
number of steps. Unlike a brushless DC motor which rotates continuously when a fixed DC voltage is
applied to it, a step motor rotates in discrete step angles. The Stepper Motors therefore are manufactured
with steps per revolution of 12, 24, 72, 144, 180, and 200, resulting in stepping angles of 30, 15, 5, 2.5, 2,
and 1.8 degrees per step. The stepper motor can be controlled with or without feedback. Stepper motors
work on the principle of electromagnetism. There is a soft iron or magnetic rotor shaft surrounded by the
electromagnetic stators. The rotor and stator have poles which may be teethed or not depending upon the
type of stepper. When the stators are energized the rotor moves to align itself along with the stator (in case
of a permanent magnet type stepper) or moves to have a minimum gap with the stator (in case of a variable
reluctance stepper). This way the stators are energized in a sequence to rotate the stepper motor.

PROGRAM:-
MOV TMOD, #50H ; put timer 1 in event counting mode
SETB TR1 ; start timer 1

MOV DPL, #LOW(LEDcodes) ; | put the low byte of the start address of the
; | 7-segment code table into DPL

MOV DPH, #HIGH(LEDcodes) ; put the high byte into DPH

CLR P3.4 ;|
CLR P3.3 ; | enable Display 0
again:
CALL setDirection ; set the motor's direction
MOV A, TL1 ; move timer 1 low byte to A
CJNE A, #10, skip ; if the number of revolutions is not 10 skip next instruction
CALL clearTimer ; if the number of revolutions is 10, reset timer 1
skip:
MOVC A, @A+DPTR ; | get 7-segment code from code table - the index into
the table is
; | decided by the value in A
; | (example: the data pointer points to the start of the
; | table - if there are two revolutions, then A will contain two,
; | therefore the second code in the table will be copied to A)

MOV C, F0 ; move motor direction value to the carry


MOV ACC.7, C ; and from there to ACC.7 (this will ensure Display 0's decimal
point
; will indicate the motor's direction)

MOV P1, A ; | move (7-seg code for) number of revolutions and motor direction
; | indicator to Display 0
JMP again ; do it all again

setDirection:
PUSH ACC ; save value of A on stack
PUSH 20H ; save value of location 20H (first bit-addressable
; location in RAM) on stack
CLR A ; clear A
MOV 20H, #0 ; clear location 20H
MOV C, P2.0 ; put SW0 value in carry
MOV ACC.0, C ; then move to ACC.0
MOV C, F0 ; move current motor direction in carry
MOV 0, C ; and move to LSB of location 20H (which has bit address 0)

CJNE A, 20H, changeDir ; | compare SW0 (LSB of A) with F0 (LSB of 20H)


; | - if they are not the same, the motor's direction needs to be reversed

JMP finish ; if they are the same, motor's direction does not need to be changed
changeDir:
CLR P3.0 ;|
CLR P3.1 ; | stop motor

CALL clearTimer ; reset timer 1 (revolution count restarts when motor direction
changes)
MOV C, P2.0 ; move SW0 value to carry
MOV F0, C ; and then to F0 - this is the new motor direction
MOV P3.0, C ; move SW0 value (in carry) to motor control bit 1
CPL C ; invert the carry

MOV P3.1, C ; | and move it to motor control bit 0 (it will therefore have the opposite
; | value to control bit 1 and the motor will start
; | again in the new direction)
finish:
POP 20H ; get original value for location 20H from the stack
POP ACC ; get original value for A from the stack
RET ; return from subroutine

clearTimer:
CLR A ; reset revolution count in A to zero
CLR TR1 ; stop timer 1
MOV TL1, #0 ; reset timer 1 low byte to zero
SETB TR1 ; start timer 1
RET ; return from subroutine

LEDcodes: ; | this label points to the start address of the 7-segment code table which is
; | stored in program memory using the DB command below
DB 11000000B, 11111001B, 10100100B, 10110000B, 10011001B, 10010010B, 10000010B,
11111000B, 10000000B, 10010000B
RESULT:-

CONCLUSION:- Rotation of stepper motor was observed on the EdSim.


EXPERIMENT NO. 9

AIM: - Display of personal individual name on LCD Display.

Lab Outcome: -

Design an application using microcontroller.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 10

AIM: - Innovative experiments: Interface PIR sensor with Arduino on Tinkercad

Lab Outcome: -
Design an application using microcontroller.

Date of Performance: -

Date of Submission: -

Implementation Understanding Punctuality & Discipline Total Marks


(05) (05) (05) (15)

_________________________________________________

Practical Incharge
EXPERIMENT NO. 10
AIM:- Innovative experiments: Interface PIR sensor with Arduino on Tinkercad

APPARATUS:- Thinker Cad

THEORY:-

All objects, including the human body, at temperatures above absolute zero (0 Kelvin / -273.15 °C) emit
heat energy in the form of infrared radiation. The hotter an object is, the more radiation it emits. This
radiation is not visible to the human eye because it is emitted at infrared wavelengths. The PIR sensor is
specifically designed to detect such levels of infrared radiation.

A PIR sensor consists of two main parts:

1. A pyroelectric sensor, which you can see in the image below as a round metal with a rectangular
crystal in the centre.

2. A special lens called a Fresnel lens which Focuses the infrared signals on the pyroelectric sensor.

RESULT:-

CONCLUSION:- With the help of ThinkerCad interfacing of PIR sensor with Ardunio is done and we see
that as the switch is turned on the led glows.

You might also like