Professional Documents
Culture Documents
Embedded System Project
Embedded System Project
For
Micro Project
Embedded System
(22532)
Diploma Programme: - Industrial Electronics
Maharashtra State
Board of Technical Education, Mumbai
Subject:
Embedded System
Done by:
7 segment LED display is very popular and it can display digits from 0 to 9 and quite a few
characters like A, b, C, ., H, E, e, F etc. Knowledge about how to interface a seven segment
display to a micro controller is very essential in designing embedded systems.
A seven segment display consists of seven LEDs arranged in the form of a squares ‘8’ slightly
inclined to the right and a single LED as the dot character. Different characters can be
displayed by selectively glowing the required LED segments. Seven segment displays are of
two types, common cathode and common anode. In common cathode type , the cathode of
all LEDs are tied together to a single terminal which is usually labelled as ‘com‘ and the
anode of all LEDs are left alone as individual pins labelled as a, b, c, d, e, f, g & h (or dot) . In
common anode type, the anodes of all LEDs are tied together as a single terminal and
cathodes are left alone as individual pins. The pin out scheme and picture of a typical 7
segment LED display is shown in the image below.
1.0Rationale
The circuit diagram for multiplexing 2 seven segment displays to the 8051 is shown
below.
The Proteus Design Suite is a proprietary software tool suite used primarily for electronic
design automation. The software is used mainly by electronic design engineers and
technicians to create schematics and electronic prints for manufacturing printed circuit
boards.
Keil MicroVision is a free software which solves many of the pain points for an embedded
program developer. This software is an integrated development environment (IDE), which
integrated a text editor to write programs, a compiler and it will convert your source code to
hex files too.
2.0Course Outcomes Addressed:
Seven segment displays are used to indicate numerical information. Seven segments display
can display digits from 0 to 9 and even we can display few characters like A, b, C, H, E, e, F,
etc. These are very popular and have many more applications. So, in this project, I’ll show
you how a 7 Segment Display works by interfacing 7 Segment Display to 8051
Microcontroller
.
Code for 7 Segment Display Interfacing with 8051 Microcontroller (AT89S52)
#include<reg51.h>
void msdelay(unsigned int time) // Function for creating delay in milliseconds.
{
unsigned i,j ;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}
void main()
{
unsigned char no_code[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};
//Array for hex values (0-9) for common anode 7 segment
int k;
while(1)
{
for(k=0;k<10;k++)
{
P2=no_code[k];
ms_delay(100);
}
}
}
We have created ms_delay function to provide the delay in milliseconds, this delay is usually
provided in any microcontroller program so that microcontroller can complete its internal
operation.
Then we have created an array of the hex codes for 0 to 9 and finally we have sent the hex
codes to the port 2, which is connected to common anode 7 segment. So in this way the
numbers are shown on the 7 segment display.
Now we have only 4 ports in microcontroller and what if we want to show the data in more
than four 7 segments?? To solve this problem, multiplexing technique comes into picture.
We need to multiplex multiple 7.
7.0 Skill Developed / learning out of this Micro-Project
We got the knowledge about how the circuit works according to the program loaded on
the connected computer.
We got the knowledge about microcontroller pin configuration and their working.
We learned about practical implementation of required aim.
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