Академический Документы
Профессиональный Документы
Культура Документы
1. Introduction
to Embedded
System
7. Interrupts,
Delays, and
Semaphores
with ChibiOS
6. ChibiOS
Real Time
Operating
System
2. The
Human and
Physical
Interfaces
Embedded
System and
Applications
BNF 30603
5. Real Time
Operating
System
4. Interrupts,
Delays, and
Multitasking
3. Serial
Interfaces,
Timer, Data
Acquisition and
Manipulation
A
microprocessor
Operating
System
Networking
unit
A
computer
has..
Large memory
RAM, ROM, HDD
I/O
units
5
unrecognizable
Embedded systems are everywhere
Millions units are produced yearly for various purposes, vs millions
of desktop units
The observation that the number of transistors in a dense integrated circuit doubles
approximately every two years. The observation is named after Gordon E. Moore,
the co-founder of Intel and Fairchild Semiconductor.
10
11
HOME
OFFICE AND
COMMERCE
MOTOR CAR
Washing machine
Photocopier
Door mechanism
Fridge
Checkout machine
Brake system
Burglar alarm
Printer
Engine control
Microwave oven
Scanner
In-car entertainment
Central heating
controller
Climate control
Source: tech.ubm.com
13
GENERAL PURPOSE
EMBEDDED
Differentiating features:
Speed (need not be fully predictable)
Software compatibility
Cost (e.g. RM3k vs RM5k per laptop)
Differentiating features:
Power
Cost (e.g. RM100 vs RM200)
Size
Speed (must be predictable)
14
MicroP
A chip that contains only the
processor need other chips to
make a working system
More flexible
Can have very few I/O or many I/O
devices using the same processor
Used as general-purpose processor
when large embedded software has
to be located in the external
memory chips
MicroC
A chip that contains all the
components of a computer
processor, memory, I/O
Less flexibility
Less component count
Less powerful
Used when a small or part of the
embedded software has to be
located in the internal memory and
when on-chip functional units such
as interrupt-handler, timer, etc. are
required
15
Connected to
physical
environment
through sensors
and actuators
Have to be dependable
Reliability will not fail
Maintainability can repair
Availability reliable + maintainable
Safety fail, will not cause any harm
Security secured data
Reactive systems
Idle
N
Input?
Y
Execute
task
Dedicated towards a
certain application
extra program
makes the system
less dependable
Dedicated user
interface push
buttons, pedals,
steering wheels
COMMON CHARACTERISTICS
OF EMBEDDED SYSTEMS
Hybrid systems
include analog
and digital parts
cost
Real-time constraints
Hard
Soft
Firm
Have to be
efficient
energy
codesize
runtime
weight
16
1. Hard RTS
Failure to meet even a single deadline may lead to complete catastrophic
system failure
2. Soft RTS
Performance is degraded but not destroyed by failure to meet responsetime constraint
3. Firm RTS
Few missed deadlines will not lead to total failure, but missing more than
a few may lead to complete or catastrophic system failure
17
Example:
1. Air Traffic Control: a service provided by ground-based controllers who direct
aircraft on the ground and through controlled airspace, and can provide advisory
services to aircraft in non-controlled airspace. The primary purpose of ATC
worldwide is to prevent collisions, organize and expedite the flow of traffic, and
provide information and other support for pilots.
2. Car Engine Management Control
3. Pacemaker: a small device that's placed in the chest or abdomen to help control
abnormal heart rhythms. This device uses electrical pulses to prompt the heart
to beat at a normal rate.
4. Fire Alarm System
18
Example:
1. Automatic Washing machine
2. Air-conditioning
3. CD Player
19
Example:
1. Music Sound System in the computer
2. Door Bell Ringing System
20
Find two examples of hard, soft and firm real-time embedded system in:
1. Automotive
2. Home Appliances
3. Industrial Automation / Food Industry
4. Medical System
21
Unit cost: the monetary cost of manufacturing each copy of the system, excluding NRE cost.
NRE cost (Non-Recurring Engineering cost): The monetary cost of designing the system. Once the system
is designed, any number of units can be manufactured without incurring any additional design cost
(hence the term non-recurring).
Size: the physical space required by the system, often measured in bytes for software, and gates or
Power: the amount of power consumed by the system, which determines the lifetime of a battery, or
the cooling requirements of the IC, since more power means more heat.
22
23
with human user and possibly interact with an external system via
network
Input devices sensors for measurement or data entry devices for
human interaction
Output devices - displays or alarms, and motors or actuators for the
physical system
24
25
26
Allows numeric or
alphanumeric information
to be entered.
It is widely used in
photocopiers, burglar
alarms, central heating
controllers.
Arranged in a 4 3
Reading a keypad with a microcontroller port (a) Flow diagram (b) Outputs for keypad
28
There are eight LEDs in the digit (including the decimal point), but instead of 16
connections being needed, only nine is enough, one for each segment and one for the
common connection. The actual pin connections in the example shown lie in two rows, at
the top and bottom of the digit. There are 10 pins in all, with the common anode or
cathode taking two pins.
30
31
position sensing
Some of Derbots sensors and actuators
32
Light-dependent
resistors (LDR)
made from a piece of exposed
semiconductor material. When light
falls on it, it creates holeelectron
pairs in the material, which improve
the conductivity. When light is
removed, the holeelectron pairs
recombine and conductivity falls. The
overall effect is that as illumination
increases, the LDR resistance falls.
33
Optical methods are very useful in sensing objects and surfaces. In one
The reflective optical sensor (a) Principle of operation (b) Electrical connection
34
time taken for the echo to return is measured; from this a distance can be
calculated.
35
signals are at voltage levels which are recognized by it as being either Logic
0 or Logic 1
These voltage levels are usually defined by logic family, for example TTL
(Transistor Transistor
Semiconductor)
Logic)
or
CMOS
(Complementary
Metal
Oxide
When one device is connected to another, and each is supplied by the same
voltage and is of the same logic family, then it is usually safe to assume that logic
levels will be safely and reliably transferred
However, if signals are generated from a non-logic source, e.g. a sensor, or if they
have been received over a long communication link, or have been subject to
interference, then it may be that they are not correctly interpreted by the
36
receiver
37
Different forms of signal corruption. (a) Spikes in signal, potentially harmful to device input.
(b) Spikes in signal. (c) Excessively slow edges. (d) DC offset in signal
38
39
40
41
Simple DC Switching
Only very small electrical loads, like LEDs, can be driven
directly by a microcontroller port bit. Larger loads, drawing
beyond 10 or 20 mA, or powered from a voltage higher than
the logic supply voltage, need to be interfaced via power
switching devices
Transistor switches provide an easy way of switching DC loads
MOSFET and bipolar
42
Simple DC Switching
43
44
Serial Interfaces
SPI, I2C, USART, USB
Timer
Data Acquisition and Manipulation
46