Professional Documents
Culture Documents
Date: 19-11-2020
Aim: Interface the Seven segment with ARM7 microprocessor with the
necessary embedded C programming
Equipment Required:
1. Personal Computer
2. Keil IDE
3. Proteus 8.0 Professional software
Theory:
7 segment displays are among the simplest display units to display the numbers
and characters. It is generally used to display numbers and has brighter illumination and
simpler construction than dot matrix display. And because of brighter illumination, the output
can be viewed from larger distance than LCD.
Common Cathode
In this all the Negative terminals (cathode) of all the 8 LEDs are connected together
(see diagram below), named as COM. And all the positive terminals are left alone or
connected to the microcontroller pins. If we use microcontroller we set logic HIGH to
illuminate the particular and set LOW to turn OFF LED.
Seven Segment Layout:
0 0111111 3F
1 0000110 06
2 1011011 5B
3 1001111 4F
4 1100110 66
5 1101101 6D
6 1111101 7D
7 0000111 07
8 1111111 7F
9 1001111 67
Program:
#include<lpc214x.h>
int main(){
unsigned char No[11]={0x3F,0x06,0x5B,0x4f,0x66,0x6D,0x7D,0x07,0x7F,0x67};
PINSEL0=0X00000000;
IO0DIR=0X0000000FF;
for(int i=0;No[i]!=0;i++){
IO0CLR=0X000000FF;
IOSET0=No[i];
for(int j=0;j<=1000000;j++);
}
return 0;
}
keil-Program:
proteus-Output:
Inference:
Its mandatory to clear the previous 7-segment data before loading new data, as these
segments are shared among these data. From this experiment I had learnt how to generate
continuous incrementation of numbers from 0 to 9. In this experiment the loop is infinity it
print continuously with a delay.
Result: