SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072
© 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4975
Interfacing Multi-Digit 7-Segment with 8051 Microcontroller
Rohini Rathod1, Debasis Nayak2, Divyansh Vishwakarma3, Krunal Luste4
1Rohini Rathod & Mira Road, Thane, India
2Debasis Nayak & Mira Road, Thane, India
3Divyansh Vishwakarma & Mira Road, Thane, India
4Krunal Luste & Mira Road, Thane, India
1Assistant Professor, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India
2Student, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India
3Student, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India
4Student, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India
---------------------------------------------------------------------***----------------------------------------------------------------------
Abstract - This article is about how to interface multiple
seven segment LED display to an 8051 microcontroller. 7
segment LED display is very popular and essential to display
any type of information/messages. The main problem comes
here that we can't attach more than 4 seven-segment display
to 8051 microcontrollers, so we have overcome this problem
by multiplexing method. In this paper, we have given a brief
overview on the Interfacing of 8051 and discusses of its
method for n-number.
Key Words: Microcontroller; 7-segment interfacing;
Multiplexing; Research Methodology
1. INTRODUCTION
A Microcontroller (MC) is a small and low-cost
microcomputer, which is designed to perform the specific
tasks of embedded systems like displaying microwave’s
information, receiving remote signals, etc. All general
Microcontroller consists of the processor,thememory(RAM,
ROM, EPROM), Serial ports, peripherals (timers, counters),
etc. which are used to interact with things connected to the
chip.
8051 Microcontrollers are designed by Intel in 1981. It is an
8-bit microcontroller. It is built with 40 pins DIP (dual inline
package),4kb of ROM storage and 128 bytes of RAM storage,
Tow 16-bit timer/counters. It consists of are four parallel 8-
bit ports, which are programmable as well as per the
requirement. An on-chip crystal oscillator isintegratedinthe
microcontroller having crystal frequency of 12 MHz [1]. It
consists of Full duplex serial port, 6-source/5-vector
interrupt structurewithtwoprioritylevel,ExtensiveBoolean
processing (single-bit logic) capabilities and 32 bidirectional
and individually addressable I/O lines.
8051 microcontrollers have 4 I/O ports each of 8-bit, which
can be configured as input or output. Hence, total 32
input/output pinsallow themicrocontroller to be connected
with the peripheral devices [1].
2. ARCHITECTURE OF 8051
Fig -1: ARCHITECTURE OF 8051 MICROCONTROLLER
3. PIN-CONFIGURATION
Fig -2: PIN CONFIGURATION OF 8051 AND FUNCTION OF
THEIR PINS
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072
© 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4976
4. INTERFACING 7-SEGMENTS DISPLAYWITH8051
MICROCONTROLLER
Interfacing is the method of connecting/linking one device
with another, especiallya computer or micro-controllerwith
another allowing us to design or adapt the output and input
configurations of the two electronic devices so that they can
work together.
4.1 7-SEGHMENT DISPLAY
A 7-segment display module is an electronic device used to
display numbers and some alphabet. It is made up of seven
led segments. Because of the small size of the led, it is really
easy for a number of them to beconnectedtogethertomakea
unit like 7-segment display [2].
Each led segment has one of its pins brought out of the
rectangular package. Other pins are connected together to a
common terminal. 7-segment display are used to indicate
numerical information. 7-segments displaycandisplaydigits
from 0 to 9 and even we can display few characters like A, B,
C, D, E, F, G, H, etc. They are more popular and have many
more applications.
Fig -3: 7-SEGMENT DISPLAY
4.2 TYPE OF SEVEN SEGMEN
There are two types of 7-segment display
 Common cathode terminal (CC)
 Common anode terminal (CA)
A. COMMON CATHODE(CC)
As the name indicates, its cathode is connected to a common
terminal. Below is the schematic diagram to indicate its
common cathode structure. It should be connected to the
ground while operating the display. If a high voltage is given
to the anode, then it will turn on the corresponding segment
[2].
Fig -4: COMMON CATHODE CONNECTION
B. COMMON ANODE (CA)
In this type, the anode is common. It should be connected to
a high voltage (to the supply through a resistor to limit
current). In order to turn on a particular segment, a ground
level voltage is given to the corresponding pin. Since logic
circuits can sink more current than theycan source,common
anode connection is used most widely [2].
Fig -5: COMMON ANODE CONNECTION
5. DIGIT DRIVE PATTERN
To display the digits on 7 segments,weneedtoglowdifferent
logic combinations of segments. For example, if you want to
display the digit 3 on seven segment then you need to glow
the segments a, b, c, d and g. The below table show you the
Hex decimal values what we need to send from PORT-
2/PORT-1 to Display the digits from 0 to 9 [3].
Fig -6: DIGIT DRIVE PATTERN FOR 8051
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072
© 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4977
6. MULTIPLEXED 7-SEGMENT DISPLAY
If two or more seven segment displays have to be used and
the microcontroller unit does not have enough I/O ports to
accommodate all the input pins of the seven segment display
units. The best method to be adopted in such cases would be
to use a multiplexer. By multiplexing, the number of seven
segment units multiplexed would be using only the seven
output ports and enable pins equal to the number of display
units to display the output. Now, how it is made possible to
use only seven output ports to display output of the number
of seven segment display units at a single time? Theprinciple
behind this is the persistence of vision. Only one unit is
working at a single time and the switchingbetweentheseven
segment display units are made faster so that the onlooker is
not able to recognize the switching [2]. The 7-segment are
connected in parallel as shown in figure-7.
7. CIRCUIT DIAGRAM
Fig -7: CIRCUIT DIAGRAM OF INTERFACING TWO 7-
SEGMENT DISPLAY
8. ALGORITHM
 First initializeall the segmenthexvaluesofthedigits
in an array. Unsigned char ch []
={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F}
 As per the value, switch the digits.
void display (unsigned long int n)
{
led=ch[n/1000];
sw1=1;
sdelay (30);
sw1=0;
led=ch[(n/100) %10];
sw2=1;
sdelay (30);
sw2=0;
led=ch[(n/10) %10];
sw3=1;
sdelay (30);
sw3=0;
led=ch[n%10];
sw4=1;
sdelay (30);
sw4=0;
}
9. PROGRAM/CODE
(NOTE: The given code is for 4-digit 7-segment)
#include<reg51.h>
#define led P0
sbit sw1=P2^0;
sbit sw2=P2^1;
sbit sw3=P2^2;
sbit sw4=P2^3;
unsigned char ch []
={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
void display (unsigned long int);
void sdelay (char);
void sdelay (char d)
{
For (; d>0; d--);
}
void display (unsigned long int n)
{
led=ch[n/1000];
sw1=1;
sdelay (30);
sw1=0;
led=ch[(n/100) %10];
sw2=1;
sdelay (30);
sw2=0;
led=ch[(n/10) %10];
sw3=1;
sdelay (30);
sw3=0;
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072
© 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4978
led=ch[n%10];
sw4=1;
sdelay (30);
sw4=0;
}
void main ()
{
unsigned long int i=1;
while (1)
{
display(i);
if(i==9999)
i=0;
}
}
10. HOW TO OPERATE?
 Initially run the program to the microcontroller.
 Give the connections as per the circuit diagram.
 Make sure that a to g pins of 7 segment are
connected to the P2.0 to P2.6respectivelyinthefirst
circuit and to PORT-0 pins in the second circuit.
 Switch on the supply, you can observe that digits 0
to 9 will display continuouslywith somedelayinthe
first circuit and digits from 0 to 99 will display on 4-
digit 7-segment display in the second circuit.
 Switch of the supply.
11. APPLICATIONS
 Seven segments are widely used in digital clocks to
display the time.
 These are used in electronic meters for displaying
the numerical information.
 Used in Instrument panels.
 Used in digital readout displays
12. LIMITATIONS
 The complexity is increased to display large
information.
 It is not possible to display the symbols on seven
segments.
13. CONCLUSION
Suppose you need a three-digit display connected to the
8051. Each 7-segment display have 8 pins and so a total
amount of 24 pins are to theconnectedtothemicrocontroller
and there will be only 8 pins left with the microcontroller for
other input output applications. Also, the maximum number
of displays that can be connected to the 8051 is limited to 4
because 8051 has only 4 ports. More over three 3 displays
will be ON always and this consumes a considerable amount
of power. All these problems associated with the straight
forward method can be solved by multiplexing in
multiplexing all displays areconnected in paralleltooneport
and only one display is allowed to turn ON at a time, for a
short period. This cycle is repeated for at a fast rate and due
to the persistence of vision of human eye, all digits seems to
glow. The main advantages of this method are:
 Fewer number of port pins are required.
 Consumes less power.
 More number of display units can be interfaced
(maximum 24).
This is way that how it interfaces with the 8051
microcontrollers.
REFERENCES
1
]
1. "OpenLab pro," [Online]. Available:
https://openlabpro.com/.
2
]
2. "Explore Embedded," [Online]. Available:
https://exploreembedded.com/.
3
]
3. "Tutoriaspoint," [Online]. Available:
https://www.tutorialspoint.com/.
4
]
4. admin, "CIRCUITS TODAY," 23 01 2018.
[Online]. Available:
http://www.circuitstoday.com/.
5
]
5. ADMINISTRATOR, "ELECTRONICS HUB," 5
MARCH 2018. [Online]. Available:
https://www.electronicshub.org/.

More Related Content

What's hot

Moving message display
Moving message displayMoving message display
Moving message display
viraj1989
 
A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )
A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )
A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )
Abhinay Potlabathini
 
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderCOMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
Vanitha Chandru
 

What's hot (20)

Stld
StldStld
Stld
 
8085 lab
8085 lab8085 lab
8085 lab
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
 
Moving message display
Moving message displayMoving message display
Moving message display
 
Design and Fabrication of 4-bit processor
Design and Fabrication of  4-bit processorDesign and Fabrication of  4-bit processor
Design and Fabrication of 4-bit processor
 
BCD Counter
BCD CounterBCD Counter
BCD Counter
 
A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )
A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )
A10 microprocessor &amp; microcontrollers ( eee, ece &amp; ecm )
 
Analog to Digital Converter
Analog to Digital ConverterAnalog to Digital Converter
Analog to Digital Converter
 
8255 PPI (programmable Peripheral Interface) mode 0
8255 PPI (programmable Peripheral Interface) mode 08255 PPI (programmable Peripheral Interface) mode 0
8255 PPI (programmable Peripheral Interface) mode 0
 
Microprocessor-Compatible Quadrature Decoder/Counter Design
Microprocessor-Compatible Quadrature Decoder/Counter DesignMicroprocessor-Compatible Quadrature Decoder/Counter Design
Microprocessor-Compatible Quadrature Decoder/Counter Design
 
8255 class
8255 class8255 class
8255 class
 
1205 Ppi 8279
1205 Ppi 82791205 Ppi 8279
1205 Ppi 8279
 
8255 Introduction
8255 Introduction8255 Introduction
8255 Introduction
 
8255 PPI or parallel interface
8255 PPI or parallel interface8255 PPI or parallel interface
8255 PPI or parallel interface
 
8255_Ppi new
8255_Ppi new8255_Ppi new
8255_Ppi new
 
The 8255 PPI
The 8255 PPIThe 8255 PPI
The 8255 PPI
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer
 
7 segment led interfacing with 8051
7 segment led interfacing with 80517 segment led interfacing with 8051
7 segment led interfacing with 8051
 
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderCOMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
 

Similar to IRJET - Interfacing Multi-Digit 7-Segment with 8051 Microcontroller

Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
SANTIAGO PABLO ALBERTO
 
Temperature Controlled Fan Report
Temperature Controlled Fan ReportTemperature Controlled Fan Report
Temperature Controlled Fan Report
Peeyush Pashine
 
108EN Electrical and Electronic scienceDesign, Simulation .docx
108EN Electrical and Electronic scienceDesign, Simulation .docx108EN Electrical and Electronic scienceDesign, Simulation .docx
108EN Electrical and Electronic scienceDesign, Simulation .docx
paynetawnya
 

Similar to IRJET - Interfacing Multi-Digit 7-Segment with 8051 Microcontroller (20)

I0312050058
I0312050058I0312050058
I0312050058
 
5x7 matrix led display
5x7 matrix led display 5x7 matrix led display
5x7 matrix led display
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
LED MATRIX SCROLLING
LED MATRIX SCROLLING LED MATRIX SCROLLING
LED MATRIX SCROLLING
 
Touchpad Monitored Car
Touchpad Monitored CarTouchpad Monitored Car
Touchpad Monitored Car
 
Touchpad Monitored Car
Touchpad Monitored Car Touchpad Monitored Car
Touchpad Monitored Car
 
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
 
Temperature Controlled Fan Report
Temperature Controlled Fan ReportTemperature Controlled Fan Report
Temperature Controlled Fan Report
 
IRJET- Braille Oriented Classroom
IRJET-  	  Braille Oriented ClassroomIRJET-  	  Braille Oriented Classroom
IRJET- Braille Oriented Classroom
 
Introduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light systemIntroduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light system
 
IRJET- Intelligent Car Parking System
IRJET-  	  Intelligent Car Parking SystemIRJET-  	  Intelligent Car Parking System
IRJET- Intelligent Car Parking System
 
K010137378
K010137378K010137378
K010137378
 
Design, Construction and Operation of a 4-Bit Counting Circuit
Design, Construction and Operation of a 4-Bit Counting CircuitDesign, Construction and Operation of a 4-Bit Counting Circuit
Design, Construction and Operation of a 4-Bit Counting Circuit
 
IRJET- Data Acquisition using Tensile Strength Testing Machine
IRJET- Data Acquisition using Tensile Strength Testing MachineIRJET- Data Acquisition using Tensile Strength Testing Machine
IRJET- Data Acquisition using Tensile Strength Testing Machine
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
 
IRJET- Android based Home Automation System with Power Optimization Modes
IRJET-  	  Android based Home Automation System with Power Optimization ModesIRJET-  	  Android based Home Automation System with Power Optimization Modes
IRJET- Android based Home Automation System with Power Optimization Modes
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manual
 
Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310
 
IRJET- Design & Implementation of Black Box in Automobiles System
IRJET-  	  Design & Implementation of Black Box in Automobiles SystemIRJET-  	  Design & Implementation of Black Box in Automobiles System
IRJET- Design & Implementation of Black Box in Automobiles System
 
108EN Electrical and Electronic scienceDesign, Simulation .docx
108EN Electrical and Electronic scienceDesign, Simulation .docx108EN Electrical and Electronic scienceDesign, Simulation .docx
108EN Electrical and Electronic scienceDesign, Simulation .docx
 

More from IRJET Journal

More from IRJET Journal (20)

TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
 
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURESTUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
 
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
 
Effect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil CharacteristicsEffect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil Characteristics
 
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
 
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
 
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
 
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
 
A REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADASA REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADAS
 
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
 
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD ProP.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
 
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
 
Survey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare SystemSurvey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare System
 
Review on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridgesReview on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridges
 
React based fullstack edtech web application
React based fullstack edtech web applicationReact based fullstack edtech web application
React based fullstack edtech web application
 
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
 
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
 
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
 
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic DesignMultistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
 
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
 

Recently uploaded

Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
Kamal Acharya
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
Atif Razi
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answer
 
Furniture showroom management system project.pdf
Furniture showroom management system project.pdfFurniture showroom management system project.pdf
Furniture showroom management system project.pdf
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projection
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdf
 

IRJET - Interfacing Multi-Digit 7-Segment with 8051 Microcontroller

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072 © 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4975 Interfacing Multi-Digit 7-Segment with 8051 Microcontroller Rohini Rathod1, Debasis Nayak2, Divyansh Vishwakarma3, Krunal Luste4 1Rohini Rathod & Mira Road, Thane, India 2Debasis Nayak & Mira Road, Thane, India 3Divyansh Vishwakarma & Mira Road, Thane, India 4Krunal Luste & Mira Road, Thane, India 1Assistant Professor, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India 2Student, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India 3Student, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India 4Student, Dept. of Electronic Engineering, Shree L.R. Tiwari College of Engineering, Maharashtra, India ---------------------------------------------------------------------***---------------------------------------------------------------------- Abstract - This article is about how to interface multiple seven segment LED display to an 8051 microcontroller. 7 segment LED display is very popular and essential to display any type of information/messages. The main problem comes here that we can't attach more than 4 seven-segment display to 8051 microcontrollers, so we have overcome this problem by multiplexing method. In this paper, we have given a brief overview on the Interfacing of 8051 and discusses of its method for n-number. Key Words: Microcontroller; 7-segment interfacing; Multiplexing; Research Methodology 1. INTRODUCTION A Microcontroller (MC) is a small and low-cost microcomputer, which is designed to perform the specific tasks of embedded systems like displaying microwave’s information, receiving remote signals, etc. All general Microcontroller consists of the processor,thememory(RAM, ROM, EPROM), Serial ports, peripherals (timers, counters), etc. which are used to interact with things connected to the chip. 8051 Microcontrollers are designed by Intel in 1981. It is an 8-bit microcontroller. It is built with 40 pins DIP (dual inline package),4kb of ROM storage and 128 bytes of RAM storage, Tow 16-bit timer/counters. It consists of are four parallel 8- bit ports, which are programmable as well as per the requirement. An on-chip crystal oscillator isintegratedinthe microcontroller having crystal frequency of 12 MHz [1]. It consists of Full duplex serial port, 6-source/5-vector interrupt structurewithtwoprioritylevel,ExtensiveBoolean processing (single-bit logic) capabilities and 32 bidirectional and individually addressable I/O lines. 8051 microcontrollers have 4 I/O ports each of 8-bit, which can be configured as input or output. Hence, total 32 input/output pinsallow themicrocontroller to be connected with the peripheral devices [1]. 2. ARCHITECTURE OF 8051 Fig -1: ARCHITECTURE OF 8051 MICROCONTROLLER 3. PIN-CONFIGURATION Fig -2: PIN CONFIGURATION OF 8051 AND FUNCTION OF THEIR PINS
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072 © 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4976 4. INTERFACING 7-SEGMENTS DISPLAYWITH8051 MICROCONTROLLER Interfacing is the method of connecting/linking one device with another, especiallya computer or micro-controllerwith another allowing us to design or adapt the output and input configurations of the two electronic devices so that they can work together. 4.1 7-SEGHMENT DISPLAY A 7-segment display module is an electronic device used to display numbers and some alphabet. It is made up of seven led segments. Because of the small size of the led, it is really easy for a number of them to beconnectedtogethertomakea unit like 7-segment display [2]. Each led segment has one of its pins brought out of the rectangular package. Other pins are connected together to a common terminal. 7-segment display are used to indicate numerical information. 7-segments displaycandisplaydigits from 0 to 9 and even we can display few characters like A, B, C, D, E, F, G, H, etc. They are more popular and have many more applications. Fig -3: 7-SEGMENT DISPLAY 4.2 TYPE OF SEVEN SEGMEN There are two types of 7-segment display  Common cathode terminal (CC)  Common anode terminal (CA) A. COMMON CATHODE(CC) As the name indicates, its cathode is connected to a common terminal. Below is the schematic diagram to indicate its common cathode structure. It should be connected to the ground while operating the display. If a high voltage is given to the anode, then it will turn on the corresponding segment [2]. Fig -4: COMMON CATHODE CONNECTION B. COMMON ANODE (CA) In this type, the anode is common. It should be connected to a high voltage (to the supply through a resistor to limit current). In order to turn on a particular segment, a ground level voltage is given to the corresponding pin. Since logic circuits can sink more current than theycan source,common anode connection is used most widely [2]. Fig -5: COMMON ANODE CONNECTION 5. DIGIT DRIVE PATTERN To display the digits on 7 segments,weneedtoglowdifferent logic combinations of segments. For example, if you want to display the digit 3 on seven segment then you need to glow the segments a, b, c, d and g. The below table show you the Hex decimal values what we need to send from PORT- 2/PORT-1 to Display the digits from 0 to 9 [3]. Fig -6: DIGIT DRIVE PATTERN FOR 8051
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072 © 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4977 6. MULTIPLEXED 7-SEGMENT DISPLAY If two or more seven segment displays have to be used and the microcontroller unit does not have enough I/O ports to accommodate all the input pins of the seven segment display units. The best method to be adopted in such cases would be to use a multiplexer. By multiplexing, the number of seven segment units multiplexed would be using only the seven output ports and enable pins equal to the number of display units to display the output. Now, how it is made possible to use only seven output ports to display output of the number of seven segment display units at a single time? Theprinciple behind this is the persistence of vision. Only one unit is working at a single time and the switchingbetweentheseven segment display units are made faster so that the onlooker is not able to recognize the switching [2]. The 7-segment are connected in parallel as shown in figure-7. 7. CIRCUIT DIAGRAM Fig -7: CIRCUIT DIAGRAM OF INTERFACING TWO 7- SEGMENT DISPLAY 8. ALGORITHM  First initializeall the segmenthexvaluesofthedigits in an array. Unsigned char ch [] ={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F}  As per the value, switch the digits. void display (unsigned long int n) { led=ch[n/1000]; sw1=1; sdelay (30); sw1=0; led=ch[(n/100) %10]; sw2=1; sdelay (30); sw2=0; led=ch[(n/10) %10]; sw3=1; sdelay (30); sw3=0; led=ch[n%10]; sw4=1; sdelay (30); sw4=0; } 9. PROGRAM/CODE (NOTE: The given code is for 4-digit 7-segment) #include<reg51.h> #define led P0 sbit sw1=P2^0; sbit sw2=P2^1; sbit sw3=P2^2; sbit sw4=P2^3; unsigned char ch [] ={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F}; void display (unsigned long int); void sdelay (char); void sdelay (char d) { For (; d>0; d--); } void display (unsigned long int n) { led=ch[n/1000]; sw1=1; sdelay (30); sw1=0; led=ch[(n/100) %10]; sw2=1; sdelay (30); sw2=0; led=ch[(n/10) %10]; sw3=1; sdelay (30); sw3=0;
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 03 | Mar 2020 www.irjet.net p-ISSN: 2395-0072 © 2020, IRJET | Impact Factor value: 7.34 | ISO 9001:2008 Certified Journal | Page 4978 led=ch[n%10]; sw4=1; sdelay (30); sw4=0; } void main () { unsigned long int i=1; while (1) { display(i); if(i==9999) i=0; } } 10. HOW TO OPERATE?  Initially run the program to the microcontroller.  Give the connections as per the circuit diagram.  Make sure that a to g pins of 7 segment are connected to the P2.0 to P2.6respectivelyinthefirst circuit and to PORT-0 pins in the second circuit.  Switch on the supply, you can observe that digits 0 to 9 will display continuouslywith somedelayinthe first circuit and digits from 0 to 99 will display on 4- digit 7-segment display in the second circuit.  Switch of the supply. 11. APPLICATIONS  Seven segments are widely used in digital clocks to display the time.  These are used in electronic meters for displaying the numerical information.  Used in Instrument panels.  Used in digital readout displays 12. LIMITATIONS  The complexity is increased to display large information.  It is not possible to display the symbols on seven segments. 13. CONCLUSION Suppose you need a three-digit display connected to the 8051. Each 7-segment display have 8 pins and so a total amount of 24 pins are to theconnectedtothemicrocontroller and there will be only 8 pins left with the microcontroller for other input output applications. Also, the maximum number of displays that can be connected to the 8051 is limited to 4 because 8051 has only 4 ports. More over three 3 displays will be ON always and this consumes a considerable amount of power. All these problems associated with the straight forward method can be solved by multiplexing in multiplexing all displays areconnected in paralleltooneport and only one display is allowed to turn ON at a time, for a short period. This cycle is repeated for at a fast rate and due to the persistence of vision of human eye, all digits seems to glow. The main advantages of this method are:  Fewer number of port pins are required.  Consumes less power.  More number of display units can be interfaced (maximum 24). This is way that how it interfaces with the 8051 microcontrollers. REFERENCES 1 ] 1. "OpenLab pro," [Online]. Available: https://openlabpro.com/. 2 ] 2. "Explore Embedded," [Online]. Available: https://exploreembedded.com/. 3 ] 3. "Tutoriaspoint," [Online]. Available: https://www.tutorialspoint.com/. 4 ] 4. admin, "CIRCUITS TODAY," 23 01 2018. [Online]. Available: http://www.circuitstoday.com/. 5 ] 5. ADMINISTRATOR, "ELECTRONICS HUB," 5 MARCH 2018. [Online]. Available: https://www.electronicshub.org/.