0% found this document useful (0 votes)
62 views25 pages

01 2ESD-lec1

- The document discusses embedded systems design and provides definitions and features of embedded systems. It describes how an embedded system typically includes hardware and software components with a microcontroller at its core. The microcontroller follows a stored program, has memory to store the program and data, and input/output ports to interact with external devices. Examples of microcontrollers like the PIC 16F84 and its architecture are also outlined.

Uploaded by

amar amar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views25 pages

01 2ESD-lec1

- The document discusses embedded systems design and provides definitions and features of embedded systems. It describes how an embedded system typically includes hardware and software components with a microcontroller at its core. The microcontroller follows a stored program, has memory to store the program and data, and input/output ports to interact with external devices. Examples of microcontrollers like the PIC 16F84 and its architecture are also outlined.

Uploaded by

amar amar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Embedded Systems Design

(630414)

Lecture 1
Introduction to Embedded Systems
Prof. Kasim M. Al-Aubidy
Computer Eng. Dept.
Definition of an E.S.
• It is a system whose principal function is not computational, but
which is controlled by a computer embedded within it.

• The word embedded implies that:


- It lies inside the overall system, hidden from view forming an
integral part of a greater whole.
- The user may be unaware of the computer existence.
- The computer is usually purpose designed, on at least customized,
for the single function of controlling its system.
• According to this definition: a P.C. is not an embedded system !!
• E.S.s are found across industry and commerce, in machine control,
factory automation, robotics, most modern domestic applications
such as washing machines, dishwashers, ovens, central heating….
The list has almost no end and it continues to grow.
Features Of The E.S.s
1. The embedded computer is made up of H/W & S/W. The design
attention has shifted to some extent towards s/w development.
2. The computer must be able to respond to I/ps as they happen
and make response within the time frame set by the controlled
system.
3. System interconnection: possibility of interaction with other
systems as shown in the figure.
 with the advent of the internet, a generation of internet-
compatible ES is emerging.
4. Reliability: E.S. designer must develop a good grasp of
reliability issues, and how a reliable system can be achieved.
This implies good design procedure in both H/W & S/W,
coupled with systematic testing and commissioning.
5. The Market-Place: the market is very competitive. The
challenge is increased greatly by very rapid advances of
technology. This lays the stress on excellent design and
development strategy.

 An E.S. is a microcontroller-based, s/w driven, reliable, real-time


control system, automation, or human, or network interactive,
operating on diverse physical variable and in diverse
environments, and sold into a competitive and cost-conscious
market.
The Microprocessor
• A μP is a simple computer on a single chip. It follows a
sequence of instructions known a program.

• A simple μP-based system has:


1. the μP.
2. A section of memory to store the program, (ROM)
3. Another section to store temporary data, (RAM)
4. Some I/O ports to contact with the outside world.
5. Buses to interconnect these elements.
A. Von Neumann Structure B. Harvard Structure

Prog. Memory
Prog. Memory
Address Bus
Address Data Bus

CPU Address Bus


CPU
Data
Data Bus

Data Memory & Data Memory &


Peripherals Peripherals
The Microcontroller
• It is a particular type of µP, used in E.S. environment, optimized to perform
control Functions, for the lowest cost and at the smallest size possible.
• Microcontroller Characteristics:
1. Direct interface to significant number of sensors & actuators.
2. High level of integration, with many peripheral devices included “on-chip”.
3. Physically small
4. Simple program & data storage requirements.
5. Ability to operate in the real-time environment.
6. An instruction set optimized for the embedded environment;
7. ( compact code, limited arithmetic, addressing capability, strong in bit
manipulation).
8. Ability to work ( operate ) in high & low temp. or high electromagnetic
radiation.
9. Low power capability.
Features Of General-
General-Purpose µC
• Every µC is different & each has its own unique combination of
core and peripherals.
• The core is the element that remains constant for the whole family
built around it.
• Interconnection to the outside world is through a number of
parallel and serial ports.
• A counter/timer is available for event counting, or to measure or
generate timing intervals.
• There are a huge number of different µC.s now on the markets.
Examples:
Program Parallel Parallel
1- The PIC 16F84: Memory Port Port
This device is very
small and low cost,
Data Counter Parallel
and used for some
Memory Timer Port
of the simplest
E.S.s
Serial
Serial
Core Port
Port
2- The 80C552:
Microcontroller Diagram
It is complex device and
costly, rich in peripheral and 3- The 68HC05 & 68HC08:
with extensive memory These devices lie in complexity
addressing capability between PIC & 80C552 µC.s.
The PIC Microcontroller
PICs are now one of the fastest moving families in the 8-bit area.
WHY??
• They run very fast.
• The family is growing at a tremendous rate.
• Microchip Inc. has a special interest in making this controller size
as attractive as possible.
• They are simpler, cheaper and smaller than most devices.
• PICs have made themselves particularly attractive to the student &
low-budget developer.
• Development tools (h/w & s/w) are cheap & available.
• Microchip offers five closely related families of µC.s.
• ((SEE TABLE 1.2)).
16F
16 F84 Microcontroller:
• Its 13-bit address, can address 8 K words.
• Its 13- bit instruction word.
• Actual program memory: 1 K words.
• RAM: 68 Locations of 8-bit ( file registers )
• Data bus: 8-bit.
• It has 2 parallel ports (port A: 5-bit & port B: 8-bit)
• It has ONE 8-bit counter/timer (TMRØ)
SUMMARY
• The E.S. is a sophisticated system consisting of several H/W &
S/W components.
• The E.S. processor can be:
- A general-purpose processor chosen from number of processors,
microcontrollers, embedded processors & DSPs.
- An application specific instruction processor (ASIP) designed for
specific application on ULSI chip.
- A multiprocessor unit can be used for a sophisticated embedded
system.
• E.S. embeds (locates) a s/w image in the ROM. The image
consists of the following:
- Boot up Program.
- Initialization data.
- Strings for an initial screen display.
- Programs for the multiple tasks that the system performs.
- RTOS kernel.
• A µP is used when large embedded s/w is to be located in the
external memory chips.
• A µC is used when a small part of the Embedded s/w has to be
located in internal memory & when the on-chip functional units,
like interrupt-handler, port, timer, ADC & PWM are needed.
• An embedded processor is used when fast processing, fast context
switching & atomic ALU ops are all needed.
• A DSP is used when signal-processing functions need to be
processed fast.
• Multiple processors are used when a single processor does not
meet
Classification Of E.S.s
E.S.s can be classified into 3 types:
1. Small – scale E.S.s:
these systems are designed with a single 8-bit, or
16-bit microcontroller.
- They have little h/w & s/w complexities and involve board-level
design.
- They may even be battery operated.
- An editor & assembler specific to the µC are used.
- C – language is used for developing these systems.
- Commonly used microcontrollers: PIC 16F8X, 8051, 6805.
2. Medium – scale E.S.s:
These systems are designed with a single or few 16-bit or
32-bit microcontroller or DSPs or RISCs.
- They have both h/w& s/w complexities.
- Programming tools: RTOS, source code eng. Tool, simulator, debugger &
Integrated Development Environment (IDE).
- Commonly used microcontrollers: 80X86, 68HC11XX.
3. Sophisticated E.S.s:
These systems have enormous h/w & s/w complexities and may need
scalable processors or configurable processors & PLAs.
- They are used for applications that need h/w & s/w co-design & integration
in the final system.
- Development tools may not be available at a reasonable cist or may not be
available at all. In some cases, a compiler might have to be developed for
these systems.
- Commonly used microcontrollers: Intel80960, ARM7, MPC604.
Microcontroller Architecture
• Architecture  internal hardware arrangement. As shown in the block diagram,
it has two parts:
- The Program Execution section.
- Register processing section.
• The PIC architecture  Harvard Architecture, where the program and data are
accessed separately. This arrangement increases overall program execution
speed.
• The Program Execution Section contains: Program Memory, IR, Control Logic.
This section store, decode & execute the program.
• The Register Processing section has: special registers used to set up the
processor operations, Data registers to store the current data, Port registers for
I/O, and the ALU to process the data.
• The timing & control block co-ordinate the operation of the two parts as
determined by the program instructions and respond to external control inputs.
• Program Memory:
µC.s are designed for prototyping and system implementation. The control
program is normally stored in
non-volatile ROM. Recently, µC.s have flash ROM are more suitable for
learning programming & prototyping.

• Program Counter (PC):


- The PC is a register which keeps track of the program sequence by
storing the address of the instruction currently being used.
- The Pc is automatically loaded with ZERO when the chip is powered up
or reset, since the default start address of the program is usually ZERO.
- In the PIC 16XXXX chips the PC is file register 2.
- PIC 16XXXX devices use address 004 to store interrupt vector if
interrupts are to be used. In this case, the main program should not
located at address ZERO, instead a JUMP to a higher address should be
placed there.
• The Stack:
It is a temporary PC store. When a subroutine is executed, a
stack register temporarily stores the current address, so that it can
be recovered at a later point in the program.
It is called a Stack, because the addresses are stored to the PC
in the reverse order to which they were stored, i.e. “LIFO”.

• IR & Decoder:

The IR holds the instruction code from program memory. The


instruction is decoded by the instruction decoder, which is a CL
cct sets up the processor control lines as required.
• Timing & Control:
- this sequential logic cct provides overall control of the PIC.
- A crystal oscillator provides an accurate, fixed frequency
clock signal to drive the program sequence.
((NOTE: PIC 16XXXX chips can operate at any frequency
up to 20MHZ)).
- The RESET i/p can restart the program at any time by
clearing the PC to ZERO.
- Interrupts: are signals generated externally or internally,
which force a change in the sequence of operations.
NOTE: If an interrupt source is active in the PIC 16XXXX,
the program will start at address 004H, where the
sequence “Interrupt Service Routine (ISR)” or a jump
instruction must be stored.
• Working Register:
- It holds the data that the µC. Is working on at the current time. It is
similar to the ACC in µPs.
- The working register is the only register that is not located in the
main register block and is accessed by name “w” not by number.

• ALU:
- It is a CLC which takes one or two input binary words and combines
them to produce an arithmetic or logical results.

• Port Registers:
- Input & output in a µC. Are achieved by simply reading or writing a
port data register.
- If a port register is initialized for o/p, the data moved to that register is
immediately available at the pins of the chip.
- in the PIC 16F84A, there are two ports (A&B):
* Port A: has 5 Pins  it is mapped (addressed) as SFR5.
* Port B: has 8 pins  it is addressed as SFR6.
• Special Function Registers (SFRs):
- These registers provide dedicated program control registers
and processor status bits.
- In the PIC, the PC, Port registers, and spare registers are
SFRs, and are mapped as part of this block.

You might also like