Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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.
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 .
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 .
Ø
Timers 2 3 2
I/O pins 32 32 32
Serial port 1 1 1
Interrupt sources 6 8 6
DIFFERENT TOOLS REQUIRED
:
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