0% found this document useful (0 votes)
4 views7 pages

Lab Report 08-2

The experiment focused on controlling a 7-segment display using Arduino in a Proteus simulation environment, aiming to teach basic Arduino controls, coding, and circuit connections. The Arduino was programmed to display numeric values from 0 to 9 by controlling individual segments of the display, demonstrating successful digital output control. The experiment concluded with a solid understanding of 7-segment displays, Arduino programming, and the utility of Proteus for circuit design and simulation.

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)
4 views7 pages

Lab Report 08-2

The experiment focused on controlling a 7-segment display using Arduino in a Proteus simulation environment, aiming to teach basic Arduino controls, coding, and circuit connections. The Arduino was programmed to display numeric values from 0 to 9 by controlling individual segments of the display, demonstrating successful digital output control. The experiment concluded with a solid understanding of 7-segment displays, Arduino programming, and the utility of Proteus for circuit design and simulation.

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/ 7

Experiment No: 02

Name of the Experiment: Arduino-Based 7-Segment Display Control in Proteus for Numeric
Output

Objective:

 To learn the basic controls of Arduino


 To understand the basic coding of Arduino
 To understand how a 7-segment display works
 To understand the circuit and the connection between Arduino and output
devices
 To understand the various pin configurations of Arduino
 To understand the control of microcontrollers using coding
 To verify the functionality of the circuit and code in a virtual simulation
environment before physical implementation

Proteus Diagram:

Figure 01: Proteus Diagram for 7-segment Display

Arduino Code: The following code is used for the circuit shown in Figure 01.

Code: void setup() {

1
// 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();

six();

seven();

eight();

nine();

void zero() {

digitalWrite(2,HIGH);

digitalWrite(3,HIGH);

digitalWrite(4,HIGH);
digitalWrite(5,HIGH);

digitalWrite(6,HIGH);

digitalWrite(7,HIGH);

2
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);

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);

3
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);

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);

4
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);

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);

5
digitalWrite(5,HIGH);

digitalWrite(6,LOW);

digitalWrite(7,HIGH);

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

Output Figure: The following results were found as output in this experiment.

Figure 02: Showing numerical values in a 7-segment display using Arduino

6
Figure 03: Showing numerical values in a 7-segment display using Arduino

Discussion & Conclusion: The successful operation of the 7-segment display, driven by the
Arduino UNO within the Proteus simulation environment, clearly demonstrated the
fundamental principles of digital output control. The core mechanism involved was the precise
switching of individual segments of the display to form recognizable numeric characters. For
the common anode configuration used, it was imperative that a LOW signal was applied to a
segment's cathode to illuminate it, while a HIGH signal kept it off. In conclusion, all objectives
of this experiment were comprehensively met. The successful interface between an Arduino
UNO and a common anode 7-segment display was achieved within the Proteus simulation. The
Arduino was effectively programmed to sequentially display numeric values from 0 to 9, with
the simulation accurately mirroring the intended behavior. This practical exercise solidified the
understanding of digital output control, the operational principles of 7-segment displays, and
core Arduino programming concepts. Furthermore, the indispensable utility of Proteus as a
versatile tool for electronic circuit design, simulation, and testing was clearly demonstrated.
The foundational knowledge and practical skills acquired during this lab are directly
transferable and highly relevant to future endeavors in embedded systems development,
particularly where numeric data representation is required.

You might also like