0% found this document useful (0 votes)
5 views8 pages

MTE-Lab-002

The experiment aims to teach students how to interface a 7-segment display with an Arduino UNO using the Proteus simulation platform, enhancing their understanding of digital outputs and microcontroller programming. The successful simulation demonstrates the correct functioning of the hardware and software, showcasing how programmed signals control the display. This foundational exercise prepares students for more complex embedded systems in mechatronics engineering.

Uploaded by

hello.tasnimul
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)
5 views8 pages

MTE-Lab-002

The experiment aims to teach students how to interface a 7-segment display with an Arduino UNO using the Proteus simulation platform, enhancing their understanding of digital outputs and microcontroller programming. The successful simulation demonstrates the correct functioning of the hardware and software, showcasing how programmed signals control the display. This foundational exercise prepares students for more complex embedded systems in mechatronics engineering.

Uploaded by

hello.tasnimul
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
You are on page 1/ 8

[1]

Objectives:

The aim of this experiment is to understand the working principle of a 7-segment


display and how to interface it with a microcontroller, specifically the Arduino UNO,
using the Proteus simulation platform. This task introduces students to digital display
systems, enhances their microcontroller programming skills, and strengthens their
understanding of how digital outputs can be controlled programmatically. Through
simulation, the experiment eliminates the limitations and risks associated with physical
prototyping, allowing for a safe and efficient learning environment. Furthermore, the
exercise is designed to promote familiarity with Proteus software, an essential tool for
embedded system design and circuit simulation, which is vital in mechatronics
engineering education and industry applications.

Proteus Diagram:

The Proteus diagram for this experiment includes an Arduino UNO board and a
common cathode 7-segment display component. Each of the seven segments labeled a
through g is connected to designated digital output pins on the Arduino board (pins 2
to 8). These connections are critical as they allow the microcontroller to individually
activate or deactivate segments to form the desired numeric output. The common
cathode pin of the display is connected to the ground, enabling proper current flow
through the selected segments. Resistors may also be included in the simulation to limit
current through each segment, preventing potential damage. This setup is essential for
understanding how binary control signals from a microcontroller can produce a
readable numeric output through segment illumination. Creating and verifying the
schematic in Proteus helps ensure the correctness of logical design before actual
hardware implementation, making this an invaluable step in embedded system
development.
[2]

Fig. 01: Interfacing a 7-Segment Display with Arduino

in Proteus Simulation.
[3]

Upon successfully running the simulation in Proteus, the 7-segment display lights up to
show the number '7', as programmed in the Arduino code. This output confirms that the
logic and electrical connections are functioning correctly, and the intended behavior is
achieved. The simulation visually demonstrates how microcontroller output pins can
manipulate the display through precise digital signals. By illuminating specific
segments (a, b, and c), the number '7' is represented on the display, validating both the
hardware configuration and the program logic. This process not only tests the circuit
design but also reinforces the importance of code accuracy and debugging in digital
electronics. It provides students with a hands-on opportunity to relate software
commands to hardware actions without needing physical components.

Arduino Code:
void setup() {
// put your setup code here, to run once:
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
zero();
one();
two();
three();

four();
five();
[4]

six();
seven();
eight();
nine();
}
void zero() {
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,LOW);

delay(1000);
}

void one(){
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);

delay(1000);
}

void two() {
digitalWrite(2,HIGH);
[5]

digitalWrite(3,HIGH);
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
delay(1000);
}

void three() {
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);

digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
delay(1000);
}

void four() {
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);

digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(1000);
[6]

void five() {
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(1000);
}

void six() {
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(1000);
}

void seven() {
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,LOW);
[7]

digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
delay(1000);
}

void eight() {
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);

digitalWrite(8,HIGH);
delay(1000);
}

void nine() {
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);

digitalWrite(8,HIGH);
delay(1000);
}
[8]

Conclusion:

In conclusion, the lab experiment on interfacing a 7-segment display with an Arduino


in Proteus simulation successfully illustrates the fundamentals of digital output control
in embedded systems. It highlights the synergy between software and hardware by
showcasing how programmed signals can drive a visual output device. The use of
Proteus not only simplifies the testing phase but also enhances students’ skills in
schematic design, simulation, and logical debugging. This experiment serves as a
foundational step in learning complex output systems such as LCDs, multiplexed
displays, and GUI-based control panels. Moreover, it lays the groundwork for
developing more sophisticated embedded applications in mechatronics engineering,
where clear understanding and precise implementation of both hardware and software
are indispensable.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy