Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Bharatiya Vidya Bhavan’s

Sardar Patel Institute of Technology


Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai-400058-India
(Autonomous College Affiliated to University of Mumbai)
SE-ETRX/EXTC Sub- MC Lab
Name: Kaustubh Suresh Gharat
UCID: 2020100017
Batch: B
Subject: Microcontroller
Experiment no: 1

Aim: See the layout and do the connection of 2 switches and 2 LED in
proteus. Switches should control the delay of blinking of LEDs.
Pressing one switch should increase the delay from 10 ms to
100ms and other switch should decrease the delay from 100 ms to
10 ms.
Software 1. Proteus
used: 2. Keil-uVision

Circuit
Diagram:

1
Bharatiya Vidya Bhavan’s
Sardar Patel Institute of Technology
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai-400058-India
(Autonomous College Affiliated to University of Mumbai)
SE-ETRX/EXTC Sub- MC Lab

Procedur 1) Open Keil uVision5


e: 2) Click on project.
3) Select new micro vision project.
4) Assign the location for the project and name it.
5) Select device: Legacy device database
6) Search for P89V51RD2. 7) Press ok. 8) Right Click on the target.
9) Click on options to create target file.
10) Then Output >> create hex file >>Ok
11) Go in file menu and make a new file.
12) Write the program.
13) Add this existing file of program in Source Group.
14) Click on build target file
15) Now Open the proteus.
16) Double click on the microcontroller and upload the hex file created
17) Press Ok
18) Run the Circuit on Proteus.

2
Bharatiya Vidya Bhavan’s
Sardar Patel Institute of Technology
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai-400058-India
(Autonomous College Affiliated to University of Mumbai)
SE-ETRX/EXTC Sub- MC Lab

Program:

3
Bharatiya Vidya Bhavan’s
Sardar Patel Institute of Technology
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai-400058-India
(Autonomous College Affiliated to University of Mumbai)
SE-ETRX/EXTC Sub- MC Lab

Result: Output waveform (incrementing delay):

Delay is increasing in each case by 10ms.

Output Waveform (Decrementing delay):

Delay is decreasing in each case by 10ms.

4
Bharatiya Vidya Bhavan’s
Sardar Patel Institute of Technology
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai-400058-India
(Autonomous College Affiliated to University of Mumbai)
SE-ETRX/EXTC Sub- MC Lab

Conclusio 1.Thus we have studied the experiment and have learnt about interfacing
n: external I/O devices with the port pins and we have also learnt how to
configure port pins to be used as input output pins respectively.
2. we have also learnt how to use keil and proteus software to check our
program virtually before uploading it into real hardware which makes
debugging more difficult
3. we have also learnt the advantages and disadvantages of writing code in
c programming and assembly respectively
4. P3.2 and P3.3 Pins are used as external interrupt pins

5
Bharatiya Vidya Bhavan’s
Sardar Patel Institute of Technology
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai-400058-India
(Autonomous College Affiliated to University of Mumbai)
SE-ETRX/EXTC Sub- MC Lab
5. Input output port cannot be directly connected to port0 because it does
not have pull ups. But on the other hand, Port1, port 2 and port3 have an
internal pull up.
6. we need to load hex file in the microcontroller for it to work

You might also like