Beruflich Dokumente
Kultur Dokumente
0403334
PCs
Laptops
Mainframes
Servers
Single-functioned
Executes a single program, repeatedly.
Tightly-constrained
Low cost, low power, small, fast, etc.
Design Constraints
Limited Power.
Most embedded systems operate within battery operated
equipment.
Limited Memory.
An embedded system is constrained to a finite and small
amount of memory.
Real-Time.
Most embedded systems are used in a control function.
They are expected to sense the real-time status of the
system in which they are housed and produce real-time
responses.
Advantages of Microprocessor-based
Processor
Memory
Provide storage for the software and data.
Peripherals
Software
What is a Microcontroller ?
A processor core.
Data and program memory.
Serial and parallel I/O.
Timers.
External and internal interrupt handling
mechanism.
10
In addition,
its has some
interfaces to
the outside
world in the
form of busses.
What is missing?
Memory and the peripherals.
11
Too much.
For the limited applications intended, this system has too
much of everything.
Meaning too expensive.
12
Money.
The system requires parts that cost too much money.
Size.
All of the additional functionality requires space.
Power.
We will need power to run all of these chips and devices.
Heat.
Power = heat.
Operating inside another system may not afford us good
heat dissipation.
Efficiency.
Are we really utilizing all of these features and
functionalities?
13
The microcontroller
operates on data that
is fed in through its
serial or parallel input
ports controlled by
the software stored
in the on-chip
memory.
14
15
Memory Considerations
16
17
Example of a PC program
MAIN:
mov AH, 9
; Program start
; Print message
int 021h
xor AL, AL
int 21h
; of 0
18
LCD_INIT proc
setb B_LCDONOFF
; LCD Display On
clr B_LCDCURSOR
; Cursor Off
clr B_LCDBLINK
; No Blinking
;
call IO_LCDEN_LO
call l?p1
call l?p1
call l?p1
call l?p1
call LCD_DMOD
call LCD_CLEAR
; Clear Display
call LCD_WAIT
mov a,#00000110b
call LCD_IOC
mov D_LCDPOS,#000h
ret
; Return To Caller
;
call LCD_IOC
mov r3,#0ffh
; R3 = ff
mov r2,#0ffh
; R2 = ff
; Loop
djnz r2,l?p2
ret
; Return To Caller
endproc
19
Microprocessor (P):
Designed to perform as a CPU in a microcomputer
system.
The instruction set is arranged to allow code and
large amounts of data to be moved between the
P and the external memory and registers.
Operations on not less than four bits.
Microcontroller (C):
Designed to operate with minimum of external
circuitry.
Simple instruction set (255 instructions).
Operations possible on single bits !
20
21
Evolution of microcontrollers
22
Compatibility
Opcodes and binaries are the SAME for all 80x51 variants.
Multi-sourced
Over 12 manufacturers, hundreds of varieties.
Constant improvements
Improvements in silicon/design increase speed and power
annually.
23
Desired
functionality
General-purpose
processor
Embedded Systems Design
total = 0
for i = 1 to N loop
total += M[i]
end loop
Application-specific
processor
Dr. Bassel Soudan
Single-purpose
processor
24