Sei sulla pagina 1di 35

SEMINAR

ON
EMBEDDED SYSTEM
EMBEDDED SYSTEM
v
vAn Embedded System employs a combination of hardware & software (a
“computational engine”) to perform a specific function.

vIt is part of a larger system that may not be a “computer works in a reactive
and time-constrained environment.
v
vEmbedded system means the processor is embedded into that application.

vAn embedded product uses a microprocessor or microcontroller to do one


task only.
v
vIn an embedded system, there is only one application software that is
typically
burned into ROM.
v
vExample : printer, keyboard, video game player
 
v
MICROPROCESSOR ( MPU )
A microprocessor is a general-purpose digital computer,
popularly known as a “computer on a chip” is in no sense
a complete digital computer.

Microprocessor consists of
van arithmetic and logical unit (ALU),
va program counter (PC),
va stack pointer (SP),
vsome working registers,
va clock timing circuit.
CPU Data Bus
General-
Purpose
Micro-
processor I/O Serial
Port COM
RAM ROM Timer Port
MICROCONTROLLER
vA typical microcontroller, is a “true computer on a
chip”.
v The design incorporates all of the features found
in
microprocessor(CPU, ALU, PC, SP, and registers).
v It also added the other features needed to make a
complete
computer: ROM, RAM, parallel I/O , serial I/O,
counters, and clock
circuit.
CPU RAM ROM

A single
Serial chip
I/O COM
Port Timer Port
THE CENTRAL PROCESSING UNIT :
vThe central processing unit (CPU) does all the
computing:
•Fetches,
•Decodes,
•Executes program instructions and
•Directs the flow of data to and from memory.
v
vThe CPU performs the calculations required by
program instructions and places the results of these
calculations, if required, into memory space.
Comparison of the RISC and CISC
architecture
CISC
Emphasis on hardware RISC
Emphasis on software
Includes multi-clock Single-clock,
complex instructions reduced instruction only
Memory-to-memory: Register to register:
"LOAD" and "STORE" "LOAD" and "STORE"
incorporated in instructions are independent instructions
Small code sizes, Low cycles per second,
high cycles per second large code sizes
Transistors used for storing Spends more transistors
complex instructions on memory registers
PIN DIAGRAM OF P89C51RD2
PIN DESCRIPTION OF P89C51RD2
VCC:
Pin 40 provides supply voltage to the chip . The voltage
source is + 5 Volts .

GND:
Pin 20 is the ground .

XTAL1 and XTAL2:


The 8051 has an on chip oscillator but requires an
external clock to run it . Most often a quartz crystal
oscillator is connected to inputs XTAL1 ( pin 19 ) and XTAL2
( pin 18 ). The quartz crystal oscillator connected to XTAL1
and XTAL2 also needs two capacitors of 30 pf value . One
side of each capacitor is connected to the ground . Speed
refers to the maximum oscillator frequency connected to
XTAL . When the 8051 is connected to a crystal oscillator
is powered up we can observe the frequency on the XTAL2
pin using the oscilloscope .
RST:
Pin 9 is the RESET pin . It is an input and is active high .
Upon applying a high pulse to this pin the
microcontroller well reset and terminate all activities .
This is often referred to as a power on reset . Activating
a power on reset will cause all values the registers to
be lost . It will set program counter to all 0s .

PSEN:
This is an output pin . PSEN stands for “ program store
enable ”. In an 8031 based system in which an external ROM
holds the program code , this pin is connected to the OE
pin of the ROM .
 
ALE:
ALE stands for “ address latch enable . It is an output pin
and is active high . When connecting an 8031 to external
memory , port 0 provides both address and data .
Pins of I / O Port
•Port 0 ( pins 32-39 ): P0 ( P0.0 ~ P0.7 )
•Port 1 ( pins 1-8 ) : P1 ( P1.0 ~ P1.7 )
•Port 2 ( pins 21-28 ): P2 ( P2.0 ~ P2.7 )
•The 8051 has four I/O ports
•Port 3 ( pins 10-17 ): P3 ( P3.0 ~ P3.7 )
•Each port has 8 pins.
•Named P0.X ( X=0,1,...,7 ) , P1.X, P2.X, P3.X
•Ex : P0.0 is the bit 0 ( LSB ) of P0
•Ex : P0.7 is the bit 7 ( MSB ) of P0
•These 8 bits form a byte.
•Each port can be used as input or Output
(bidirectional)
Port 0 with Pull - Up
Resistors
Vcc
10
K
P0.0
DS5000 P0.1

Port 0
P0.2
8751 P0.3
8951 P0.4
P0.5
P0.6
P0.7
74LS373
PSEN OE
ALE 74LS37 OC
G
P0 . 0 3 A0
D
P0 . 7 A7

D0
D7
EA

P2 . 0 A8
P2 . 7 A15

8051 ROM
ALE PIN
ØWhen ALE = 0 , P0 provides data D0 - D7 .
Ø

ØWhen ALE = 1 , P0 provides address A0 - A7 .


Ø

ØThe reason is to allow P0 to multiplex


address
and data .
Ø

ØThe ALE pin is used for de - multiplexing


the
address and data by connecting to the
G pin of
the 74LS373 latch .
Comparison of the 8051 Family
Members

Feature 8051 8052 8031


ROM (program
space in bytes) 4K 8K 0K

RAM (bytes) 128 256 128

Timers 2 3 2

I/O pins 32 32 32

Serial port 1 1 1

Interrupt sources 6 8 6
DIFFERENT TOOLS REQUIRED

ØKEIL MICROVISION 3.0 (COMPILER)


Ø FLASH MAGIC
ØWINDOWS XP
Ø8051 PROGRAMMING TOOL
ØSUPPLY
Ø8051 EMBEDDED MODULE
Programming Tool : Keil compiler

1 . Double Click on the icon


present
on the desktop.

:
2. The following window will be
popped-up
3. Go to the project & click on new
project
4.Make a folder on desktop & give file
name.
5.When you click on the save button,
following window opens
6. Select Philips &P89c51rd2xx
7. Then select NO on the pop-up
given below.
8. Then make a New File
9. Write or copy your gsm code there &
save it with extension .c or .asm
depending on your coding
10. Go to target & then source group,
right click on there & click on the
option add files to the project.
11. Select your asm or c file which
You want to add
12.Go to the option for target,
click on output &tick on
create hex file option
13. Now build target.
(Click on the pointed option)
14. It will show you 0 errors & 0 warning on
Output Window.

↑↑
dow13

After performing all these steps the chip will be


configured through Flash Magic .Let us hand on the
steps of chip configuration through Flash
Magic………
How to use ECE FLASH
1. Double Click on the icon present on the
desktop.

ECE Flash icon


2. The following window will be displayed

Browse to select desired file


3. Click flash and then Ok
Program in C for 8051 to glow
LEDS one by one
#include<reg51.h>
void delay(void)
{
int i;
for (i=0;i<30000;i++);
}
void main()
{
P0=0x01;
delay();
P0=0x02;
delay();
P0=0x04;
delay();
P0=0x08;
delay();
P0=0x10;
delay();
P0=0x20;
delay();
P0=0x40;
delay();
P0=0x80;
delay();
}
THANK YOU !
For listening me
attentively

Potrebbero piacerti anche