You are on page 1of 31

What is an An Embedded

System?

Embeddeded System is a specialised computer


system that is a part of a larger system or
machine. Typically it is a microprocessor or
microcontroller running a program stored in a
ROM. the embedded system is dedicated to
specific tasks, design engineers can optimize it
reducing the size and cost of the product and
increasing the reliability and performance.
Fig :Representation of embedded system
MICROCONTROLLER
A microcontroller has a CPU (a microprocessor) in addition to
the fixed amount of RAM, ROM, I/O ports, and timer is all
embedded together on the chip: therefore, the designer cannot
add any external memory, I/O, or timer to it. The fixed amount of
RAM, ROM, and number of I/O ports in microcontrollers make
them ideal for many applications

Companies producing a Microcontroller


Microcontroller Vs
Microprocessor

Microcontrollers
 are for specific tasks.
 embedded in single chip.
 less complexity, less development time, low cost & high stability.
 used for light applications.
Microprocessors
 are for undefined tasks.
 RAM,ROM are external to processor.
 High complexity, high development time, high cost, less stability.
 used for bulky applications.
The 8051
Microcontroller
External Interrupts Block Diagram
Interrupt 4k 128 bytes Timer 1
Control ROM RAM Timer 2

CPU

OSC Bus Serial


4 I/O Ports
Control

P0 P2 P1 P3 TXD RXD
Addr/Data
PIN CONFIGURAION OF AT89C51

Pin Description of AT89C51

Port 0- pin no. from 32 to 39 (P0.0-P0.7)


Port 1- pin no. from 1 to 8 (P1.0-P1.7)
Port 2- pin no. from 21 to 28 (P2.0-P2.7)
Port 3- pin no. from 10 to 17 (P3.0-P3.7)
Pin no. 40 is vcc (+5vdc)
Pin no. 20 is ground (GND)
Pin no. 18 and 19 – XTAL1 AND XTAL2
Pin no. 9– Reset (RST)
Pin no. 29–PSEN (Program store Enable)
Pin no. 30 – ALE (Address Latch Enable)
Pin no. 31 –EA (External Access)
Port 0

 It can be used for input or output.


 To use the pins of port 0 as both input
and output each pin must be connected
externally to a 10 K ohm pull-up
resistor.
 Port 0 is also designated as AD0 - AD7,
allowing it to be used for both address
and data.
Port 0 with pull up resistors
Port 1
 It can be used as input or output.
 This port does not need any pull-up
resistors since it already has pull-up
resistors internally.
 Upon reset, port I is configured as an
input port.
Port 2
 port 2 must be used along with P0 to
provide the 16-bit address for external
memory.
 Port 2 is also designated as A8 - A15,
indicating its dual function.
 P0 provides the lower 8 bits via A0 - A7
 P2 provides bits A8 - A 15 of the address.
Port 3
 Port 3 can be used as input or output.
 P3 does not need any pull-up resistors.
 Port 3 is configured as an input port upon
reset.
 Port 3 has the additional function of
providing some extremely important signals
such as interrupts, serial I/O, timer/counter
and read/write control for external memory.
LED
 A light-emitting diode
(LED) is a
semiconductor diode
 They are
semiconductors diodes
constructed from a
crystalline substance
that emits light when an
electric flows through it.
LED interfacing with microcontroller
VCC
D 1

LED

D 2

LED U ?
40
D 3 3 9 2 1
3 8 P 0 .0 /A D 0 P 2 .0 /A 8 2 2
3 7 P 0 .1 /A D 1 P 2 .1 /A 9 2 3
3 6 P 0 .2 /A D 2 P2 .2 /A 1 0 2 4
LED
3 5 P 0 .3 /A D 3 P2 .3 /A 1 1 2 5
3 4 P 0 .4 /A D 4 P2 .4 /A 1 2 2 6
3 3 P 0 .5 /A D 5 P2 .5 /A 1 3 2 7
D 4
3 2 P 0 .6 /A D 6 P2 .6 /A 1 4 2 8
P 0 .7 /A D 7 P2 .7 /A 1 5
LED 1 1 0
2 P 1 .0 /T 2 P 3 .0 /R XD 1 1
3 P 1 .1 /T 2 -E X P 3 .1 /T XD 1 2
4 P 1 .2 P 3 .2 /IN T O 1 3
D 5
5 P 1 .3 P 3 .3 /IN T 1 1 4
6 P 1 .4 P 3 .4 /T O 1 5
7 P 1 .5 P 3 .5 /T 1 1 6
LED
8 P 1 .6 P 3 .6 /W R 1 7
P 1 .7 P 3 .7 /R D
D 6 19 29
18 XTA L1 P SEN
Y ?
9 XTA L2 30
R ST A L E /P R O G
LED
C R Y STAL 31
E A /V P P
D 7 C ?
C A P N P A T89C 52
20
LED
R 1
R
D 8

LED
PROGRAM TO BURN EVEN AND ODD LED’S

#include<reg51.h>
#include<intrins.h>
#include<delay.h>
void main()
{
while(1)
{
P1=0x55;
Secdelay(1);
P1=~0x55;
Secdelay(1);
}
RESULT OF ABOVE PROGRAM :-
01010101
10101010
POWER SUPPLY
 Power supplies are designed to convert
high voltage AC mains electricity to a
suitable low voltage supply for electronics
circuits and other devices.

 A power supply can by broken down


into a series of blocks, each of which
performs a particular function. For example a
5V regulated supply:
Each of the block has its own function as described below

1. Transformer – steps down high voltage AC mains to low voltage


AC.

2. Rectifier – converts AC to DC, but the DC output is varying.

3. Smoothing – smooths the DC from varying greatly to a small ripple

4. Regulator – eliminates ripple by setting DC output to a fixed voltage


Transformer + Rectifier +
Smoothing + Regulator
SEVEN SEGMENT DISPLAY
 Displaying
alphanumeric
characters

 It comprises seven
independently-
accessible
photoelectrical
segments arranged in
the form shown.
LIQUID CRYSTAL DISPLAY
(LCD)
The Liquid Crystal
Display is used for
graphical and
alphanumeric displays.
LCD pin description
1 6
1 6 G nd
1 5
1 5 V cc
 1 4
1 4 D 7
1 3
1 3 D 6
1 2
1 2 D 5
1 1 D 4
1 1
1 0
1 0 D 3
9
9 D 2
8
8 D 1
7
7 D 0
6 E

3
6
5
5 R / W
4 R S
4 3 2
3 C o ntrast
2
2 V c c
1
1 G n d
Fig. LCD pin discription

1
INTERFACING OF LCD WITH MICROCONTROLLER
KIEL SOFTWARE

 Linker control file


 Map File
 Project Target
 Source File Group
 Toolset
: : µVision2 is used to write and compile the programs
and it transfer the assembly language.
List of components used:
 AT89C52 Microcontroller

 Power supply

 Keypad

 LCD

 Buzzer

 LED
Connection diagram of the project
THANKS......

You might also like