Sie sind auf Seite 1von 10

Page |1

Electronics and Communication


department
Embedded system (UEC608)

Project Report (Task #1)


JANUARY, 2018

Submitted By: Submitted To:


Jalsoor Singh (101506076) Mr. Sukhwinder Kumar
Jaskaranvir Singh (101506078)
Jatin Soni (101506081)
Kumud Jain (101506089)
Jaiveer Singh (401506010)
Page |2

INDEX

CONTENT Page
Number

OBJECTIVE 3

INTRODUCTION 3

BLOCK DIAGRAM 5

CIRCUIT DIAGRAM 6

PROGRAM CODE 7

SIMULATION RESULTS (Snapshots of live project) 8

CONCLUSION 9
Page |3

OBJECTIVE

A.Write an ARM assembly language program to interface


three seven segment displays and hence design a clock
that count minutes.

B. Write an ARM assembly language program to find the


sum of the elements of an array where the concept of
pointer is used to access the elements of an array.
Page |4

INTRODUCTION
A)
SEVEN SEGMENT DISPLAY

A seven-segment display (SSD), or seven-segment indicator, is a form of


electronic display device for displaying decimal numerals that is an alternative
to the more complex dot matrix displays.
Seven-segment displays are widely used in digital clocks, electronic meters,
basic calculators, and other electronic devices that display numerical
information.
The 7-segment display, also written as “seven segment display”, consists of
seven LEDs (hence its name) arranged in a rectangular fashion as shown. Each
of the seven LEDs is called a segment because when illuminated the segment
forms part of a numerical digit (both Decimal and Hex) to be displayed. An
additional 8th LED is sometimes used within the same package thus allowing
the indication of a decimal point, (DP) when two or more 7-segment displays
are connected together to display numbers greater than ten.
Page |5

Code1:

#include”lpc214.h”
#include”delay.h”
int main()

{
int a, b, c, d, e;
unsigned char arr[] = {0xbf, 0x86, 0xdb, 0xcf, 0xe6, 0xed, 0xfd, 0x87, 0xff, 0xef};

IODIRO = 0xffffffff;

while(1)
for(a=0; a<=9;a++)
{
for(b=0; b<=9;b++)
{
for(c=0; c<=9;c++)
{

for(d=0; d<=9;d++)
{
for(e=0; e<=50;e++)
{
IOCLRO =0xFFFFFFFF;
IOSETO = arr[d]<<16 | 0x0100;
delay_ms(3);

IOCLRO = 0xFFFFFFFF;
IOSETO = arr[c]<<16 | 0x0200;
delay_ms(3);
Page |6

IOCLRO = 0xFFFFFFFF;
IOSETO = arr[b]<<16 | 0x0400;
delay_ms(3);

IOCLRO = 0xFFFFFFFF;
IOSETO = arr[a]<<16 | 0x0800;
delay_ms(3);

}
}
}
}
}
}
Page |7

B)

Flow Chart:
Page |8

Code2:
area prog,code,readonly
entry
main
ldr r1,value1
ldr r2,value2
mov r3,#0
loop
ldrb r5,[r1],#1
add r3,r3,r5
cmp r1,r2
bne loop
area prog,data,readonly
value1 dcd &00009000
value2 dcd &0000900A
end
Page |9

Output:

Figure 1: Code

Figure 2: Memory Map


P a g e | 10

Figure 3: Registers

Conclusion: We gave the starting address of array as 0x00009000 and


ending address of array as 0x0000900a. It had 10 elements which were all 1
byte.

In the end we used post indexing to add all the elements of the array using
pointer scheme and stored the result in register R5. It was the sum of first 10
numbers which in Hexadecimal turns out to be 37.

Das könnte Ihnen auch gefallen