Embedded Systems Introduction
Embedded Systems Introduction
PRESENTED BY
NALAJAM.REKHA,
RA1412031010006
SYSTEM DEFINITION
A way of working, organizing or performing one or many tasks
EMBEDDED SYSTEM
DEFINITIONS
An embedded system is a system that has software
or tasks
Provides a mechanism to let the processor run each
process as per scheduling and to do context-switch
between the various processes (threads or tasks)
RTOS sets the rules during execution of application
processes to enable finishing of a process within the
assigned time interval and with assigned priority.
Real-Time
Clock
Algorithms for
Digital Control
Data Logging
Interface
Engineering
System
Remote
Monitoring System
Database
Data Retrieval
and Display
Operators
Console
Operator
Interface
Display
Devices
Real-Time Computer
PRODUCT SPECIFICATION
R&D engineers want to incorporate everything:
Time and resource
specification
Engineers, however, should be involved in some customer
tours
CPIF Cost Plus Incentive-Fee (Contract)
Listening to the customer is good
HARDWARE/SOFTWARE PARTITIONING
Embedded design usually involves hardware and software
Hardware utilizes Micro-processors, Micro-controllers and
ALGORITHM
Steps required to implement a design
Combination of hardware components and software
components
Hardware/software partitioning also involves the how it is
partitioning the algorithm (software only, hardware only,
combination)
Iteration is common
Hardware team
Simulation tools to model performance
Software team
Running code benchmarks on self contained systems (evaluation
boards)
Convenient development environment until the hardware arrives!
HARDWARE/SOFTWARE INTEGRATION
Special tools and methods to manage the complexity
Process of integrating h/w and s/w requires debugging and
discovery
Real-time nature of embedded systems leads to highly
complex, non-deterministic behavior
Can only be analyzed as it occurs
DESIGN CYCLE
application
Real time operations Defines the ways in which the
system works, reacts to the events and interrupts,
schedules the system functioning in real time and
executes by following a plan to control the latencies
and to meet the deadlines
ISSUES
Not as simple as we think (see figure)
Much iteration and optimization
Defects can force you back to beginning
To overcome performance issues:
Rewrite algorithm
Design custom hardware
Speed up processor
New processor
CHALLENGES
Does it really work?
Is the specification correct?
Does the implementation meet the spec?
How do we test for real-time characteristics?
How do we test on real data?
MICRO PROCESSOR
MICRO CONTROLLER
DATA BUS
CPU
General
Purpose
Micro
processor
RAM
ROM
I/O
PORT
TIM
ER
CPU
RAM
I/O
Timer Serial
COM
Port
SERI
AL
COM
PORT
ADDRESS BUS
ROM
bus and 16-bit address bus. The 16 bit address bus can
address a 64K( 216) byte code memory space and a
separate 64K byte of data memory space. The 8051
has 4K on-chip read only code memory and 128 bytes
of internal Random Access Memory (RAM)
The EA' (External Access) pin is used to control the internal or external memory
access.
The signal 0 is for external memory access and signal 1 for internal memory
access.
The PSEN' (Program Store Enable) is for reading external code memory when it
provide 16 bit external address bus to access the external memory. The ALE
multiplexes the P0:
1 for latching address on P0 as A0-A7 in the 16 bit address buss, 0 for latching
P0 as data I/O.
P0.x is named ADx because P0 is multiplexed for Address bus and Data bus at
computer operations.
It fetches instructions from the code memory into the instruction
Register (IR),
analyzes the opcode of the instruction, updates the PC to the
location of next instruction,
fetches the oprand from the data memory if necessary, and finally
performs the operation in the Arithmetic-Logic Unit (ALU) within
the CPU.
8051 ARCHITECTURE
PORTS
PORT P1 (Pins 1 to 8): The port P1 is a port dedicated for
general I/O purpose. The other ports P0, P2 and P3 have dual
roles in addition to their basic I/O function.
PORT P0 (pins 32 to 39): When the external memory access
is required then Port P0 is multiplexed for address bus and
data bus that can be used to access external memory in
conjunction with port P2. P0 acts as A0-A7 in address bus and
D0-D7 for port data. It can be used for general purpose I/O if
no external memory presents.
PORT P2 (pins 21 to 28): Similar to P0, the port P2 can also
play a role (A8-A15) in the address bus in conjunction with
PORT P0 to access external memory.
MEMORY
The 8051 code(program) memory is read-only, while the data
code memory space and data memory space begin at location 0x00
for internal or external memory.
In this model, the data memory and code memory use separate maps
only first 128 bytes are available for general use by the
programmer.
The first 128 bytes of RAM (from 0x00 to 0x7F) are called the
direct memory, and can be used to store data.
The lowest 32 bytes of RAM are reserved for 4 general register
banks. The 8051 has 4 selectable banks of 8 addressable 8-bit
registers, R0 to R7.
The second 128 bytes are used to store Special Function
Registers (SFR) that C51 program can configure and control the
ports, timer, interrupts, serial communication, and other tasks.
STRUCTURE OF RAM
address 0x80 to 0xFF. This area consists of a series of memorymapped ports and registers.
All 8051 CPU registers, I/O ports, timers and other architecture
components are accessible in 8051 C through SFRs
They are accessed in normal internal RAM (080H 0FFH) by
8051 C.