UNIT 1 FUNDAMENTALS OF EMBEDDED
SYSTEMS
Structure
1.0 Introduction
1.1 Objectives
1.2 Embedded System: An Introduction
1.2.1 Components of an Embedded System
1.2.2 Block Diagram and Characteristics of an Embedded System
1.2.3 Classification of an Embedded System
1.3 Embedded Operating System 1.3.1 Classification of an Embedded Operating System
1.3.2 Characteristics of an Embedded Operating System
1.4 Requirements and Specification in Embedded System 10
1.5 Programming Languages for Embedded System and Classification 12
1.5.1 Hardware Languages
1.5.2 VHDL V/s Verilog
1.6 Selected Embedded System applications 14
1.6.1 Washing Machine
1.62. Digital Sound Recorder
1.7 Summary 19
1.8 Answers/Solutions 19
1.9 Further Readings and References 19
1.0 INTRODUCTION
Embedded systems are basic electronic devices used to control, monitor or assist the
operation of equipment, machinery or a plant. The choice of word “embedded”
reflects the fact that these are integral part of the system. Uses of embedded system in
our real life are increasing day by day. Children need such systems to play video
games and to operate chocolate vending machine, Housewives need embedded
systems for microwave, TV, music system, and other system appliances.
In this unit you will learn about basics of embedded system: its uses, its components,
its basic requirements in terms of Hardware and Software and support of
Programming Languages. We will also highlight some application of embedded
system in our real life scenario at the end of this unit.
1.1 OBJECTIVES
After going through this unit, you will be able to:
• define embedded operating system;
• identify Basic Requirements and its Specification;
• explain Design methodology;
• describe the use of programming languages in embedded system; and
5
State of the Art Practices in
Information Technology
• list the use of applications of Embedded System.
1.2 EMBEDDED SYSTEM: AN INTRODUCTION
An embedded device can range from a relatively simple product for ex. a toaster to
complex mission critical applications such as those used in avionics. A typical
embedded device will have both hardware and software components. The hardware
could be micro components such as embedded microprocessor or microcontroller.
Microcontroller is relatively small, has a onchip memory, an I/O controller and other
supported modules to do processing and controlling tasks. The software consists of
applications that perform dedicated tasks and may run on Real time operating system
which will be explained later in this unit.
Embedded System may be either an independent system or a part of a large system. It
is specialized computer system but not a general purpose workstation like a desktop or
a computer. Such kind of systems is housed on a single microprocessor board with
programs which are stored in ROM (Read Only Memory). Embedded system is
usually a compact, portable and mass produced electronic devices. In the early days,
embedded systems were designed using microprocessors like 8085. But nowadays, we
are using a wide range of processors from other manufacturers.
Before we want to the basic of an embedded system, we should see a wide range of its
applications. In fact, almost all modern electronic devices use some sort of embedded
system technology inside them and we always come across such devices: DVD
players, air conditioners, printers, attendance machines, handphone, digital camera,
ATM machines, we will see some examples of embedded system in section 1. Now it
is time to give a proper definition.
Definitions: “Embedded Systems are devices which are used to control, monitor or
assist the operation of an equipment, machinery or plant”. The term “control”
defines the main function of Embedded System because their purpose is to control an
aspect of a physical system such as pressure, temperature and so on. Also the term
“monitor” defines the progress of activities.
Where do we use Embedded Systems? From several examples listed earlier these
systems are extremely common in the home, vehicle and the workplace.
• At Home: Washing Machines, dishwashers, ovens, central heating system,
burglars alarms, etc.
• In Motor Vehicle: Engine management, security (locking or antitheft
devices), air conditioning, brakes, radio etc.
• In Industry & Commerce: Machine control, factory automation, robotics,
electronic commerce office equipments.
1.2.1 Components of an Embedded System
An embedded system has three main components : Hardware, Software and time
operating system
i) Hardware
6
Fundamentals of
• Power Supply Embedded Systems
• Processor
• Memory
• Timers
• Serial communication ports
• Output/Output circuits
• System application specific circuits
ii) Software: The application software is required to perform the series of tasks.
An embedded system has software designed to keep in view of three constraints:
• Availability of System Memory
• Availability of processor speed
• The need to limit power dissipation when running the system continuously in
cycles of wait for events, run , stop and wake up.
iii) Real Time Operating System: (RTOS) It supervises the application software
and provides a mechanism to let the processor run a process as per scheduling and
do the switching from one process (task) to another process.
1.2.2 Block Diagram and Characteristics of an Embedded System
Embedded systems are executed by a microcontroller, which communicates with the
sensors and actuators. It means that a user of an embedded system is not able to
change the functionality of the system through modifying or replacing the software
because it is kept in ROM.
Embedded System
Microcontroller
Actuator
Sensors
s
Input Output
Figure 1: Embedded System
Figure 1 shows basic components used in Embedded System are as follows:
• Microcontroller: It monitors and controls the environment.
• Sensors: It collects data from environment through input devices.
• Actuators: It displays the system's status through output devices.
• Timer: It provides response within a certain time frame.
Characteristics of Embedded System
7
State of the Art Practices in
Information Technology
Some of important Characteristics of embedded system are:
1) Embedded Systems are designed to do some specific task i.e., it is not a general
purpose kind of a system.
2) Software for Embedded Systems are stored in ROM or flash memory.
3) Knowledge about behavior at design time can be used to minimize resources and
to maximize robustness.
4) Embedded Systems provide low power consumption in many situations.
1.2.3 Classification of an Embedded System
Embedded system can be classified as:
• Standalone Embedded System: It is built using a specialized communication
processor, memory a number of network access interfaces (known as network
ports), and special software that implements logic for sending information from
one device to another device.
• Real Time Embedded System: A realtime embedded system usually monitors
the environment where the embedded system is installed. This kind of system is
required to respond in time to a request. Examples of realtime embedded systems
are aircraft engine control systems, nuclear monitoring systems and medical
monitoring equipment.
• Network Appliances: Network appliances are a new class of embedded
systems that in addition to traditional realtime processing must support a broad
and changing array of network protocols.
• Mobile Embedded System: Mobile Embedded Systems usually are simple,
batterypowered systems with resource limitations. In some situations, their
batteries lifetime becomes a prim issue.
1.3 EMBEDDED OPERATING SYSTEM
An embedded operating system (EOS) is a system software that manages all the other
programs and devices in an embedded system. It normally guarantees a certain
capability within a specified storage size and time constraint as well as with
application programs. Its structure is very similar to a structure of a normal operating
system however mainly differentiated by some factors such as type of preinstalled
device, functional limits, taking designed job only. It also normally has boot loader,
OS kernel, required device drivers, file systems for the user data and so forth.
At their core, embedded operating systems contain some of the same software
components used on larger operating systems, such as windows and Linux etc. larger
operating systems (OS), embedded operating systems deals with task switching,
scheduling of tasks, memory allocation, etc.
But there are some distinctions between desk top computerOS and embedded system
OS. Desktop Computer is a general purpose computing system whereas embedded
system purpose is for a specific task. Embedded operating systems have several
common characteristics that distinguish such systems from other computing systems:
8
Fundamentals of
Embedded Systems
• Single Functioned: Usually executes a specific program repeatedly e.g. pager.
• Tightly Constrained: All computing systems have constraints on design
metrics, but those on embedded systems can be especially tight. A design metric
is a measure of an implementation’s features, such as cost, size, performance and
power.
• Reactive and Real Time: Many embedded systems must continually react to
changes in the system’s environment and must compute certain results in real time
without delay. In contrast, a desktop system typically focuses on computation
with relatively infrequent reactions to input devices.
• Secondary Memory: Generally embedded system doesn’t need secondary
memory.
• Unlike a desktop computer system which may have new software loaded onto
it frequently, embedded systems retain the same code for a long time, sometimes
indefinitely. Embedded operating systems do not usually include support for
external storage or graphical interfaces, or protection from malicious or unstable
code. The limited memory in embedded systems requires the operating system
and process to work very closely to manage the free resources.
1.3.1 Classification of an Embedded Operating System (EOS)
We can classify Operating Systems (for embedded systems) into two parts called as
RealTime Operating Systems and NonRealTime OS as shown in Figure 2.
Embedded OS
Real Time Operating System (RTOS) Non Real Time Operating System
E.g. VxWorks, OS9, RTLinux E.g. Windows, Palm OS
Figure 2: Classification of embedded operating system
• Real Time Operating Systems are operating systems which guarantee
responses to each event within a defined amount of time. This type of operating
system is mainly used by timecritical applications such as measurement and
control systems. Some commonly used RTOS for embedded systems are:
VxWorks, OS9, Symbian, and RTLinux etc.
• NonReal Time Operating Systems do not guarantee defined
response times. Those systems are mostly used if multiple applications are
needed. Windows and Palm OS are examples for such embedded operating
systems.
Some other features which are quite common to EOS irrespective of any
classification are presented below.
1) Single System Control Loop: Such systems run a single task.
9
State of the Art Practices in
Information Technology
2) Multitasking Operating System: In a multitasking operating system, several
tasks or processes appear to execute concurrently
3) Preemptive Operating System: A preemptive operating system is a
multitasking operating system that defines preemptive priorities for tasks. A
higher priority task always interrupts and is always run before a lower priority
task.
4) Rate Monotonic Operating System: Such operating system guarantees that
tasks in the system can run at a certain interval of time for a certain period of
time. When this guarantee is not met, the system software can be notified of
failure and take appropriate action.
5) Constant Time Operations: Constant time operations are the cornerstone of
real time responsiveness and predictable capacity loading.
6) Interrupt Response Times: Embedded Operating Systems normally provide
for fast interrupt response times by separating interrupt handlers in two phases. In
the first phase, the interrupt handler program reacts to an interrupt and satisfies
the interrupt condition from a hardware perspective. In the second phase, the
interrupt handler processes the interrupt condition. While executing in the second
phase, other interrupts in the system are enabled and may be handled to allow
higher priority interrupts to take precedence over lower priority interrupts.
7) Priority Inversion: Priority inversion is a condition in preemptive operating
systems where a lower priority task claims a resource that is subsequently
required by a higher priority task.
8) Monolithic Operating Systems: A monolithic operating system includes all
operating system code such as device drivers and file system handlers as part of a
single system image.
9) Micro Kernels: A micro kernel operating system includes only the bare
necessities such as task switching, scheduling and device handling interfaces in
the operating system code.
1.3.2 Characteristics of an Embedded Operating System
For an Embedded OS to be regarded as good, it should have the following features:
Modularity: Modularity is a concept that has an application in the
•
contexts of computer science, particularly programming language. A module can
be defined variously, but generally must be a component of a larger system, and
operate within that system independently from the operations of the components
of the system.
Scalability: The property of a multiprocessing computer that defines the
•
extent to which addition of more processors increases aggregate computing
capability. Windows NT server 4.0 is generally considered to be scalable to eight
Intel processors.
A CPU support: There is no meaning of an OS without a compatible
•
CPU.
10
Fundamentals of
Embedded Systems
• Flexibility and Configurability: By flexibility we mean to say that the
Embedded OS must be adjustable to change/modification. A configuration is an
arrangement of functional units according to their nature, number, and chief
characteristics. Often, configuration pertains to the choice of hardware, software,
firmware, and documentation. The configuration affects the system function.
• Have a small footprint: In computer science, the footprint of a piece of
software is the portion of computing resources, typically RAM, CPU time
peripheral devices.
Have a large Device Driver Database: The larger the Device Driver
•
Database of an Embedded OS, the greater is the number of devices that can be
controlled through that particular OS.
1.4 REQUIREMENTS AND SPECIFICATION OF
AN EMBEDDED SYSTEM
A requirement is a condition needed by a user to solve a problem or achieve an
objective. Specification is a document that specifies, in a complete, precise, verifiable
manner, the requirements, design, behavior, or other characteristics of a system, and
often, the procedures for determining whether these provisions have been satisfied.
For example, a requirement for a car could be that the maximum speed to be at least
120mph. The specification for this requirement would include technical information
about specific design aspects.
Requirements and specifications are very important components in the development
of any embedded system. Requirements analysis is the first step in the system design
process, where a user's requirements should be clarified and documented to generate
the corresponding specifications. For example, errors developed during the
requirements and specifications stage may lead to errors in the design stage. When
this error is discovered, the engineers must revisit the requirements and specifications
to fix the problem. This leads not only to more time wasted but also the possibility of
other requirements and specifications errors. Many accidents are traced to
requirements flaws, incomplete implementation of specifications, or wrong
assumptions about the requirements.
Establishing good requirements requires people with both technical and
communication skills. Technical skills are required as the embedded system will be
highly complex and may require knowledge from different engineering disciplines
such as electrical engineering and mechanical engineering. Communication skills are
necessary as there is a lot of exchange of information between the customer and the
designer. Without either of these two skills, the requirements will be unclear or
inaccurate.
Example of a System Requirement of an Embedded System:
Embedded System requires minimal hardware requirements as follows:
Minimum Requirements
Operating Microsoft Windows NT® Workstation operating system version 4.0
System with Service Pack 5 (SP5) or later
11
State of the Art Practices in
Information Technology Browser Microsoft Internet Explorer 4.0 Service Pack 1 (SP1) or later
Processor Computer with Pentiumclass processor; Pentium 300megahertz
(MHz) or higher processor recommended
Memory 64 MB of RAM
Drive 100 MB for generated image storage
20 MB for installation of the Windows NT Embedded 4.0
development system 170 MB if the Binary Repository is copied to the
local development system hard drive (optional)
Optional Microsoft Visual Studio® 6.0 development system to create Target
Designer extensions
Specification and Design
A specification enables everyone involved in the process to comprehend the entire
design and his/her piece of it. The specification must include the following:
An external block diagram showing how the device fits into the system.
•
An internal block diagram showing each major functional section.
•
A description of the I/O pins.
•
Physical specification — package type, physical size, connector requirements,
•
and so on.
Power consumption target
•
Price target
•
Test procedures
•
The design step of Design Methodology depends on the kind of device targeted.
Digital hardware differs from analog hardware.
Design Methodology doesn't limit or dictate design practices, but it's important that
you use reliable, accepted design practices during this step.
However, system integration and system testing is necessary to ensure that all parts of
the system work correctly together. At the system integration and test step of the
design, you have the responsibility to determine that the entire system, including the
device you've designed, works correctly. You should perform a burnin test to assure
that any manufacturing defects are discovered before the product is delivered. If
you've followed the procedure up to this point, chances are good that your system will
perform correctly. Minor hardware problems can often be worked around by slight
modifications to the system or changes to the system software.
1.5 PROGRAMMING LANGUAGES FOR
EMBEDDED SYSTEM AND CLASSIFICATION
Embedded systems are applicationspecific computers that interact with the physical
world. Each has a diverse set of tasks to perform, and although a very flexible
12
Fundamentals of
language might be able to handle all of them, instead a variety of problemdomain Embedded Systems
specific languages have evolved that are easier to write, analyze, and compile. The
choice of programming language is very important for real time embedded software.
The following factors influence the choice of languages:
• A language compiler should be available for the chosen RTOS
(Real Time Operating System) and hardware architecture of the embedded
system.
• Compilers should be available on multiple OSs and
microprocessors. This is particularly important if the processor or the RTOS
needs to be changed in future.
• The language should allow direct hardware control without
sacrificing the advantages of a high level language.
• The language should provide memory management control such as
dynamic and static memory allocation.
So, we can categorize embedded programming languages in to two parts such as
hardware language and software language.
1.5.1 Hardware Languages
A hardware description language can be used to describe the logic gates, the
sequential machines, and the functional modules, along with their interconnection and
their control, in a embedded system. There are various languages used for this purpose
as follows:
VHDL
VHDL is the Very High Speed Integrated Circuit Hardware Description Language. It
can describe the behaviour and structure of electronic systems, but is particularly
suited as a language to describe the structure and behaviour of digital electronic
hardware designs, VHDL is an international standard, regulated by the international
languages. VHDL is suitable for use today in the digital hardware design process,
from specification through highlevel functional simulation, manual design and logic
synthesis down to gatelevel simulation.
VERILOG
Verilog HDL is one of the two most common Hardware Description Languages
(HDL) used by integrated circuit (IC) designers. The other one is VHDL. HDL’
allows the design to be simulated earlier in the design cycle in order to correct errors
or experiment with different architectures. Designs described in HDL are technology
independent, easy to design and debug, and are usually more readable than
schematics, particularly for large circuits.
Verilog can be used to describe designs at four levels of abstraction:
i) Algorithmic level (much like, C language code with if, case and loop statements).
ii) Register transfer level (RTL uses registers connected by Boolean equations).
13
State of the Art Practices in
Information Technology
iii) Gate level (interconnected AND, NOR etc.).
iv) Switch level (the switches are MOS transistors inside gates).
The language also defines constructs that can be used to control the input and output
of simulation.
1.5.2 VHDL VS. VERILOG
Let us compare between the two languages on the following parameters:
1) Capability
• Hardware structure can be modeled equally effectively in both
VHDL and Verilog. When modeling abstract hardware, the capability of
VHDL can be achieved in Verilog.
2) Compilation
• VHDL: Multiple designunits (entity/architecture pairs), that
reside in the same system file, may be separately compiled if so desired.
However, it is good design practice to keep each design unit in it's own
system file in which case separate compilation should not be an issue.
• Verilog: The Verilog language is still rooted in it's native
interpretative mode. Compilation is a means of speeding up simulation, but
has not changed the original nature of the language. As a result care must be
taken with both the compilation order of code written in a single file and the
compilation order of multiple files. Simulation results can change by simply
changing the order of compilation.
3) Data types
• VHDL: A multitude of language or user defined data types can
be used. This may mean dedicated conversion functions are needed to convert
objects from one type to another.
• Verilog. Compared to VHDL, Verilog data types are very
simple, easy to use and very much geared towards modeling hardware
structure
4) Design reusability
• VHDL. Procedures and functions may be placed in a package so
that they are available to any designunit that wishes to use them.
• Verilog. There is no concept of packages in Verilog.
5) Easiest to Learn
• Verilog is probably the easiest to grasp and understand as
compared to VHDL.
14
Fundamentals of
6) Operators Embedded Systems
• Verilog has a very useful unary operators that are not in VHDL.
• VHDL has the mod operator that is not found in Verilog.
Java and C++ are another programming languages which are used extensively for
embedded system design.
1.6 SELECTED EMBEDDED SYSTEM
APPLICATIONS
We can categorize applications of Embedded System into various categories as
mentioned in Table:
Area Applications
Navigation Systems, Automatic landing systems, Flight
Aerospace
altitude controls, engine controls, space exploration
Fuel Injection Control, Passenger environmental
Automotive
controls, antilock braking systems, air bag controls,
GPS mapping
Switches, Hubs
Communications
Printers,scanners,keyboards,displays,modems,Hard
Computer Peripherals
Disk Drives,CDROM drives
Ovens, Washing Machine,Digtal Watch, Security
Home
Alarm, Sound Recorder
Elevator Controls, Robots, Engine Control
Industrial
Data Collection, power supplies
Instrumentation
Imaging Systems, Patient monitors, Heart pacers
Medical
FAX machines, Telephones, Cash Registers
Office Automation
Now, we will discuss here two well known applications used for home appliances in
detail as follows:
1.6.1 Washing Machine
Washing machine supports three functional modes:
i) Fully Automatic Mode: In fully automatic mode, once the system is started it
perform independently without user interference and after the completion of work it
should notify the user about the completion of work. This mode instantaneously sense
cloth quality and requirement of water, water temperature, detergent, load, wash cycle
time and perform operation accordingly.
ii) Semi Automatic Mode: In this semiautomatic mode in which washing conditions
are predefined. Once the predefined mode is started the system perform its job and
after completion it inform the user about the completion of work.
iii) Manual Mode: In this mode, user has to specify which operation he wants to do
and has to provide related information to the control system. For example, if user
wants to wash clothes only, he has to choose ‘wash’ option manually. Then the system
ask the user to enter the wash time, amount of water and the load. After these data are
15
State of the Art Practices in
entered, the user should start the machine. When the specified operation is completed
Information Technology
system should inform the user.
Remember that Modes should be a selectable by a keypad.
A washing machine may have a System Controller (Brain of the System) which
provides the power control for various monitors and pumps and even controls the
display that tells us how the wash cycles are proceeding. A washing machine
comprise several components as shown in Figure 3.
Sensor
Display panel
Driving Motor
System
Controller
Water Pump
Inverter Unit
Figure 3: Block Diagram of Washing Machine
The working of these components is as follows:
i) Display Panel: It is a touch panel screen to control all the operations of a machine
ii) Sensor: It measures the water level and appropriate amount of soap. Input devices
for automatic washing machine are sensors for water flow, water level and
temperature; door switch; selector knob or buttons for settings such as spin speed,
temperature, load size and types of wash cycle required.
Water Level Sensor: It indicates beep sound when water level is low in washing tub.
Door Sensor: It indicates beep sound when all clothes are washed that means now
you can open the maching door and also you can move to your next phase. Next phase
will be dry Phase. This phase also follows same concept for drying the clothes.
iii) Driving Motor: Motor can rotate in two directions either “reverse’ or ‘forward’.
The forward direction drives the current in forward direction and motor rotates
forward. The reverse direction driver does the opposite of it. A washing machine
can maintain single motor in fully automatic or double motor in semi automatic
washing machine.
Sequence of washing the clothes with this can be explained in few steps as follows:
1) Put on your dirty clothes on to the wash tub for washing
2) Put the detergent Soap (of your choice like Surf n Excel etc.)
16
Fundamentals of
3) Put ON the tap, water rushes inside the tub. Embedded Systems
4) If its electronic control , then by the press of the keys ,you could program , if its
mechanical it shall something like an mechanical switches wherein you are
allowed to operate for setting the wash time.
5) Now the wash motor rotates and washes the clothes and gives you a beep sound
6) Now your clothes are washed ...remove it from the wash tub and put it on the
spin tub and program it accordingly...after spinning clothes are dried and you
are allowed to hang it for proper drying in sunlight.
The fully automatic also comes in two category front loading as well as top loading.
i) Front loading is the one wherein you are given an opening to put clothes in on the
front side.
ii) Top loading is on the top.
iv) System Controller: Such Component is used to control the motor speed. Motor
can move in forward direction as well as reverse direction.
System Controller reads the speed of motor and controls the speed of motor in
different phases such as in Washing, Cleaning Drying etc. All kinds of Sensors
such as Door Sensor, Pressure Sensor and Keypad, Speed sensor are also
maintained by this.
v) Water Pump: The water pump is used to recirculate water and drain out the
dirty water. This pump actually contains two separate pumps inside one: The
bottom half of the pump is hooked up to the drain line, while the top half
recirculates the wash water. The motor that drives the pump can reverse direction.
It spins one way when the washer is running a wash cycle and recirculates the
water; and it spins the other way when the washer is doing a spin cycle and
draining the water
1.6.2 Digital Sound Recorder
A digital sound recorder is a consumer electronic appliance designed to record and
play back speech. The messages are recorded using a builtin microphone and they are
stored in a digital memory. The user can quickly play back any message at any
moment through a speaker placed in the front of the device.
Figure 4 shows what our sound recorder could look like. It is a hand held unit with flat
display and fairly large buttons.
17
State of the Art Practices in
Information Technology
Screen
Yes No
Figure 4: Block Diagram of Digital Sound Recorder
The main features of the digital sound recorder are:
• Easy to use with on screen menus.
• Direct access to any message.
• Alarm clock with year2000ready calendar. The user can set a daily alarm.
The alarm beeps until the user presses a key, or after 60 seconds.
• Full Function LCD Display. The current date and time is always shown in the
display. The display also shows clear directions about how to use it and what it is
doing.
• Batterylevel indicator. The system beeps when the battery is low.
• Standby mode. It economizes the battery power. The system switches off the
peripherals when they are not in use. The normal operation is resumed when
the user presses a key.
Such a system provides good sound quality. And also sound is processed at 6 KHz
using eight bits per sample.
In Digital Sound Recorder system there are six different Functions:
Functions of Digital Sound Recorder System
Set Clock Watch Time
Delete Set Alarm
Recording
Playback
18
Fundamentals of
Embedded Systems
1) Record a message
When we want to record a message then we will use following steps:
Step1: Selects a message slot from the message directory
Step2: presse the ‘record’button.
If the message slot already stores a message, it is deleted.
The system starts recording the sound from the microphone until the user presses the
‘stop’ button, or the memory is full.
2) Playback a message
When we want to playback a message Then we will use following steps:
Step1: Selects a recorded message slot
Step2: and then presses the ‘play’ button.
If the message slot contains a recorded message then it is played through the speaker
until its end or until the user presses the stop button.
3) Delete a message
When we want to delete a message Then we will use following steps:
Step1: The user selects a used message slot
Step2: and then presses the ‘delete’ button.
The message is permanently deleted from the memory and its memory space is freed
up.
4) Set the alarm time
When we want to Set the alarm state, Then the user can switch on and off the alarm
and set the time when the alarm will sound.
This is done by selecting the different options of the alarm menu.
5) Set the clock time
When we want to set the clock time message Then user can set the clock time and
adjust it to the current time zone.
6) Watch the time
The system constantly shows the current time and date on the display. The user just
looks at it.
F Check Your Progress 1
1) Distinguish between Embedded Systems and Non Embedded Systems.
...................................................................................................
...................................................................................................
................................................................................................
2) Explain the characteristics of real time operating system for embedded system
applications.
...................................................................................................
...................................................................................................
...................................................................................................
19
State of the Art Practices in
3) What are advantages of Verilog HDL?
Information Technology
...................................................................................................
...................................................................................................
...................................................................................................
1.7 SUMMARY
Embedded system is a kind of computer system or computing device that performs a
dedicated function and/or is intended for use with a specific embedded software
application. It has been found that such systems are not usable as a commercially
viable substitute for generalpurpose computers. In the same way, we can define
embedded operating system as the software program that manages all the other
programs in an embedded device after initial load of programs.
Important concepts like requirement and specifications play a vital role in Embedded
System design implementation. Such Systems use programming languages in which
hardware languages such as Verilog and VHDL are used for their hardware support
and also well known software languages like C, C++ and Java etc. We have also
discussed various applications of Embedded System in section.
1.8 ANSWERS/SOLUTIONS
1) An embedded system is a singlepurpose computer built into a larger system for
the purposes of controlling and monitoring the system. These are also known as
special purpose computer system. Example: Digital watches and MP4 Players,
Digital Sound Recorder.
Non Embedded Systems are also known as general Computer general purpose
computer (e.g. a personal computer) is defined not to be an embedded system.
Such system can do many tasks depending on programming. Example: Handheld
devices. share some elements with embedded systems — such as the operating
systems and microprocessors which power them — but are not truly embedded
systems, because they allow different applications to be loaded and peripherals to
be connected.
2) RTOS Characteristics for Embedded Systems Applications:
• They have limited memory that is modular kernels. Modular kernels means
only include the needed services.
• The executed processes are usually known at system design. RTOS often
linked with the executed application(s) to the instruction memory.
3) The advantages using Verilog HDL are:
I) Easy to write
II) Easy to understand as it similar to C program
III) Easier to learn compared with VHDL.
1.9 FURTHER READINGS
http://en.wikipedia.org/wiki/Embedded_system
1.2.2 Block Diagram and Characteristics of an Embedded System
1.2.3 Classification of an Embedded System
1.3 Embedded Operating System 1.3.1 Classification of an Embedded Operating System
1.3.2 Characteristics of an Embedded Operating System
1.4 Requirements and Specification in Embedded System 10
1.5 Programming Languages for Embedded System and Classification 12
1.5.1 Hardware Languages
1.5.2 VHDL V/s Verilog
1.6 Selected Embedded System applications 14
1.6.1 Washing Machine
1.62. Digital Sound Recorder
1.7 Summary 19
1.8 Answers/Solutions 19
1.9 Further Readings and References 19
1.0 INTRODUCTION
Embedded systems are basic electronic devices used to control, monitor or assist the
operation of equipment, machinery or a plant. The choice of word “embedded”
reflects the fact that these are integral part of the system. Uses of embedded system in
our real life are increasing day by day. Children need such systems to play video
games and to operate chocolate vending machine, Housewives need embedded
systems for microwave, TV, music system, and other system appliances.
In this unit you will learn about basics of embedded system: its uses, its components,
its basic requirements in terms of Hardware and Software and support of
Programming Languages. We will also highlight some application of embedded
system in our real life scenario at the end of this unit.
1.1 OBJECTIVES
After going through this unit, you will be able to:
• define embedded operating system;
• identify Basic Requirements and its Specification;
• explain Design methodology;
• describe the use of programming languages in embedded system; and
5
State of the Art Practices in
Information Technology
• list the use of applications of Embedded System.
1.2 EMBEDDED SYSTEM: AN INTRODUCTION
An embedded device can range from a relatively simple product for ex. a toaster to
complex mission critical applications such as those used in avionics. A typical
embedded device will have both hardware and software components. The hardware
could be micro components such as embedded microprocessor or microcontroller.
Microcontroller is relatively small, has a onchip memory, an I/O controller and other
supported modules to do processing and controlling tasks. The software consists of
applications that perform dedicated tasks and may run on Real time operating system
which will be explained later in this unit.
Embedded System may be either an independent system or a part of a large system. It
is specialized computer system but not a general purpose workstation like a desktop or
a computer. Such kind of systems is housed on a single microprocessor board with
programs which are stored in ROM (Read Only Memory). Embedded system is
usually a compact, portable and mass produced electronic devices. In the early days,
embedded systems were designed using microprocessors like 8085. But nowadays, we
are using a wide range of processors from other manufacturers.
Before we want to the basic of an embedded system, we should see a wide range of its
applications. In fact, almost all modern electronic devices use some sort of embedded
system technology inside them and we always come across such devices: DVD
players, air conditioners, printers, attendance machines, handphone, digital camera,
ATM machines, we will see some examples of embedded system in section 1. Now it
is time to give a proper definition.
Definitions: “Embedded Systems are devices which are used to control, monitor or
assist the operation of an equipment, machinery or plant”. The term “control”
defines the main function of Embedded System because their purpose is to control an
aspect of a physical system such as pressure, temperature and so on. Also the term
“monitor” defines the progress of activities.
Where do we use Embedded Systems? From several examples listed earlier these
systems are extremely common in the home, vehicle and the workplace.
• At Home: Washing Machines, dishwashers, ovens, central heating system,
burglars alarms, etc.
• In Motor Vehicle: Engine management, security (locking or antitheft
devices), air conditioning, brakes, radio etc.
• In Industry & Commerce: Machine control, factory automation, robotics,
electronic commerce office equipments.
1.2.1 Components of an Embedded System
An embedded system has three main components : Hardware, Software and time
operating system
i) Hardware
6
Fundamentals of
• Power Supply Embedded Systems
• Processor
• Memory
• Timers
• Serial communication ports
• Output/Output circuits
• System application specific circuits
ii) Software: The application software is required to perform the series of tasks.
An embedded system has software designed to keep in view of three constraints:
• Availability of System Memory
• Availability of processor speed
• The need to limit power dissipation when running the system continuously in
cycles of wait for events, run , stop and wake up.
iii) Real Time Operating System: (RTOS) It supervises the application software
and provides a mechanism to let the processor run a process as per scheduling and
do the switching from one process (task) to another process.
1.2.2 Block Diagram and Characteristics of an Embedded System
Embedded systems are executed by a microcontroller, which communicates with the
sensors and actuators. It means that a user of an embedded system is not able to
change the functionality of the system through modifying or replacing the software
because it is kept in ROM.
Embedded System
Microcontroller
Actuator
Sensors
s
Input Output
Figure 1: Embedded System
Figure 1 shows basic components used in Embedded System are as follows:
• Microcontroller: It monitors and controls the environment.
• Sensors: It collects data from environment through input devices.
• Actuators: It displays the system's status through output devices.
• Timer: It provides response within a certain time frame.
Characteristics of Embedded System
7
State of the Art Practices in
Information Technology
Some of important Characteristics of embedded system are:
1) Embedded Systems are designed to do some specific task i.e., it is not a general
purpose kind of a system.
2) Software for Embedded Systems are stored in ROM or flash memory.
3) Knowledge about behavior at design time can be used to minimize resources and
to maximize robustness.
4) Embedded Systems provide low power consumption in many situations.
1.2.3 Classification of an Embedded System
Embedded system can be classified as:
• Standalone Embedded System: It is built using a specialized communication
processor, memory a number of network access interfaces (known as network
ports), and special software that implements logic for sending information from
one device to another device.
• Real Time Embedded System: A realtime embedded system usually monitors
the environment where the embedded system is installed. This kind of system is
required to respond in time to a request. Examples of realtime embedded systems
are aircraft engine control systems, nuclear monitoring systems and medical
monitoring equipment.
• Network Appliances: Network appliances are a new class of embedded
systems that in addition to traditional realtime processing must support a broad
and changing array of network protocols.
• Mobile Embedded System: Mobile Embedded Systems usually are simple,
batterypowered systems with resource limitations. In some situations, their
batteries lifetime becomes a prim issue.
1.3 EMBEDDED OPERATING SYSTEM
An embedded operating system (EOS) is a system software that manages all the other
programs and devices in an embedded system. It normally guarantees a certain
capability within a specified storage size and time constraint as well as with
application programs. Its structure is very similar to a structure of a normal operating
system however mainly differentiated by some factors such as type of preinstalled
device, functional limits, taking designed job only. It also normally has boot loader,
OS kernel, required device drivers, file systems for the user data and so forth.
At their core, embedded operating systems contain some of the same software
components used on larger operating systems, such as windows and Linux etc. larger
operating systems (OS), embedded operating systems deals with task switching,
scheduling of tasks, memory allocation, etc.
But there are some distinctions between desk top computerOS and embedded system
OS. Desktop Computer is a general purpose computing system whereas embedded
system purpose is for a specific task. Embedded operating systems have several
common characteristics that distinguish such systems from other computing systems:
8
Fundamentals of
Embedded Systems
• Single Functioned: Usually executes a specific program repeatedly e.g. pager.
• Tightly Constrained: All computing systems have constraints on design
metrics, but those on embedded systems can be especially tight. A design metric
is a measure of an implementation’s features, such as cost, size, performance and
power.
• Reactive and Real Time: Many embedded systems must continually react to
changes in the system’s environment and must compute certain results in real time
without delay. In contrast, a desktop system typically focuses on computation
with relatively infrequent reactions to input devices.
• Secondary Memory: Generally embedded system doesn’t need secondary
memory.
• Unlike a desktop computer system which may have new software loaded onto
it frequently, embedded systems retain the same code for a long time, sometimes
indefinitely. Embedded operating systems do not usually include support for
external storage or graphical interfaces, or protection from malicious or unstable
code. The limited memory in embedded systems requires the operating system
and process to work very closely to manage the free resources.
1.3.1 Classification of an Embedded Operating System (EOS)
We can classify Operating Systems (for embedded systems) into two parts called as
RealTime Operating Systems and NonRealTime OS as shown in Figure 2.
Embedded OS
Real Time Operating System (RTOS) Non Real Time Operating System
E.g. VxWorks, OS9, RTLinux E.g. Windows, Palm OS
Figure 2: Classification of embedded operating system
• Real Time Operating Systems are operating systems which guarantee
responses to each event within a defined amount of time. This type of operating
system is mainly used by timecritical applications such as measurement and
control systems. Some commonly used RTOS for embedded systems are:
VxWorks, OS9, Symbian, and RTLinux etc.
• NonReal Time Operating Systems do not guarantee defined
response times. Those systems are mostly used if multiple applications are
needed. Windows and Palm OS are examples for such embedded operating
systems.
Some other features which are quite common to EOS irrespective of any
classification are presented below.
1) Single System Control Loop: Such systems run a single task.
9
State of the Art Practices in
Information Technology
2) Multitasking Operating System: In a multitasking operating system, several
tasks or processes appear to execute concurrently
3) Preemptive Operating System: A preemptive operating system is a
multitasking operating system that defines preemptive priorities for tasks. A
higher priority task always interrupts and is always run before a lower priority
task.
4) Rate Monotonic Operating System: Such operating system guarantees that
tasks in the system can run at a certain interval of time for a certain period of
time. When this guarantee is not met, the system software can be notified of
failure and take appropriate action.
5) Constant Time Operations: Constant time operations are the cornerstone of
real time responsiveness and predictable capacity loading.
6) Interrupt Response Times: Embedded Operating Systems normally provide
for fast interrupt response times by separating interrupt handlers in two phases. In
the first phase, the interrupt handler program reacts to an interrupt and satisfies
the interrupt condition from a hardware perspective. In the second phase, the
interrupt handler processes the interrupt condition. While executing in the second
phase, other interrupts in the system are enabled and may be handled to allow
higher priority interrupts to take precedence over lower priority interrupts.
7) Priority Inversion: Priority inversion is a condition in preemptive operating
systems where a lower priority task claims a resource that is subsequently
required by a higher priority task.
8) Monolithic Operating Systems: A monolithic operating system includes all
operating system code such as device drivers and file system handlers as part of a
single system image.
9) Micro Kernels: A micro kernel operating system includes only the bare
necessities such as task switching, scheduling and device handling interfaces in
the operating system code.
1.3.2 Characteristics of an Embedded Operating System
For an Embedded OS to be regarded as good, it should have the following features:
Modularity: Modularity is a concept that has an application in the
•
contexts of computer science, particularly programming language. A module can
be defined variously, but generally must be a component of a larger system, and
operate within that system independently from the operations of the components
of the system.
Scalability: The property of a multiprocessing computer that defines the
•
extent to which addition of more processors increases aggregate computing
capability. Windows NT server 4.0 is generally considered to be scalable to eight
Intel processors.
A CPU support: There is no meaning of an OS without a compatible
•
CPU.
10
Fundamentals of
Embedded Systems
• Flexibility and Configurability: By flexibility we mean to say that the
Embedded OS must be adjustable to change/modification. A configuration is an
arrangement of functional units according to their nature, number, and chief
characteristics. Often, configuration pertains to the choice of hardware, software,
firmware, and documentation. The configuration affects the system function.
• Have a small footprint: In computer science, the footprint of a piece of
software is the portion of computing resources, typically RAM, CPU time
peripheral devices.
Have a large Device Driver Database: The larger the Device Driver
•
Database of an Embedded OS, the greater is the number of devices that can be
controlled through that particular OS.
1.4 REQUIREMENTS AND SPECIFICATION OF
AN EMBEDDED SYSTEM
A requirement is a condition needed by a user to solve a problem or achieve an
objective. Specification is a document that specifies, in a complete, precise, verifiable
manner, the requirements, design, behavior, or other characteristics of a system, and
often, the procedures for determining whether these provisions have been satisfied.
For example, a requirement for a car could be that the maximum speed to be at least
120mph. The specification for this requirement would include technical information
about specific design aspects.
Requirements and specifications are very important components in the development
of any embedded system. Requirements analysis is the first step in the system design
process, where a user's requirements should be clarified and documented to generate
the corresponding specifications. For example, errors developed during the
requirements and specifications stage may lead to errors in the design stage. When
this error is discovered, the engineers must revisit the requirements and specifications
to fix the problem. This leads not only to more time wasted but also the possibility of
other requirements and specifications errors. Many accidents are traced to
requirements flaws, incomplete implementation of specifications, or wrong
assumptions about the requirements.
Establishing good requirements requires people with both technical and
communication skills. Technical skills are required as the embedded system will be
highly complex and may require knowledge from different engineering disciplines
such as electrical engineering and mechanical engineering. Communication skills are
necessary as there is a lot of exchange of information between the customer and the
designer. Without either of these two skills, the requirements will be unclear or
inaccurate.
Example of a System Requirement of an Embedded System:
Embedded System requires minimal hardware requirements as follows:
Minimum Requirements
Operating Microsoft Windows NT® Workstation operating system version 4.0
System with Service Pack 5 (SP5) or later
11
State of the Art Practices in
Information Technology Browser Microsoft Internet Explorer 4.0 Service Pack 1 (SP1) or later
Processor Computer with Pentiumclass processor; Pentium 300megahertz
(MHz) or higher processor recommended
Memory 64 MB of RAM
Drive 100 MB for generated image storage
20 MB for installation of the Windows NT Embedded 4.0
development system 170 MB if the Binary Repository is copied to the
local development system hard drive (optional)
Optional Microsoft Visual Studio® 6.0 development system to create Target
Designer extensions
Specification and Design
A specification enables everyone involved in the process to comprehend the entire
design and his/her piece of it. The specification must include the following:
An external block diagram showing how the device fits into the system.
•
An internal block diagram showing each major functional section.
•
A description of the I/O pins.
•
Physical specification — package type, physical size, connector requirements,
•
and so on.
Power consumption target
•
Price target
•
Test procedures
•
The design step of Design Methodology depends on the kind of device targeted.
Digital hardware differs from analog hardware.
Design Methodology doesn't limit or dictate design practices, but it's important that
you use reliable, accepted design practices during this step.
However, system integration and system testing is necessary to ensure that all parts of
the system work correctly together. At the system integration and test step of the
design, you have the responsibility to determine that the entire system, including the
device you've designed, works correctly. You should perform a burnin test to assure
that any manufacturing defects are discovered before the product is delivered. If
you've followed the procedure up to this point, chances are good that your system will
perform correctly. Minor hardware problems can often be worked around by slight
modifications to the system or changes to the system software.
1.5 PROGRAMMING LANGUAGES FOR
EMBEDDED SYSTEM AND CLASSIFICATION
Embedded systems are applicationspecific computers that interact with the physical
world. Each has a diverse set of tasks to perform, and although a very flexible
12
Fundamentals of
language might be able to handle all of them, instead a variety of problemdomain Embedded Systems
specific languages have evolved that are easier to write, analyze, and compile. The
choice of programming language is very important for real time embedded software.
The following factors influence the choice of languages:
• A language compiler should be available for the chosen RTOS
(Real Time Operating System) and hardware architecture of the embedded
system.
• Compilers should be available on multiple OSs and
microprocessors. This is particularly important if the processor or the RTOS
needs to be changed in future.
• The language should allow direct hardware control without
sacrificing the advantages of a high level language.
• The language should provide memory management control such as
dynamic and static memory allocation.
So, we can categorize embedded programming languages in to two parts such as
hardware language and software language.
1.5.1 Hardware Languages
A hardware description language can be used to describe the logic gates, the
sequential machines, and the functional modules, along with their interconnection and
their control, in a embedded system. There are various languages used for this purpose
as follows:
VHDL
VHDL is the Very High Speed Integrated Circuit Hardware Description Language. It
can describe the behaviour and structure of electronic systems, but is particularly
suited as a language to describe the structure and behaviour of digital electronic
hardware designs, VHDL is an international standard, regulated by the international
languages. VHDL is suitable for use today in the digital hardware design process,
from specification through highlevel functional simulation, manual design and logic
synthesis down to gatelevel simulation.
VERILOG
Verilog HDL is one of the two most common Hardware Description Languages
(HDL) used by integrated circuit (IC) designers. The other one is VHDL. HDL’
allows the design to be simulated earlier in the design cycle in order to correct errors
or experiment with different architectures. Designs described in HDL are technology
independent, easy to design and debug, and are usually more readable than
schematics, particularly for large circuits.
Verilog can be used to describe designs at four levels of abstraction:
i) Algorithmic level (much like, C language code with if, case and loop statements).
ii) Register transfer level (RTL uses registers connected by Boolean equations).
13
State of the Art Practices in
Information Technology
iii) Gate level (interconnected AND, NOR etc.).
iv) Switch level (the switches are MOS transistors inside gates).
The language also defines constructs that can be used to control the input and output
of simulation.
1.5.2 VHDL VS. VERILOG
Let us compare between the two languages on the following parameters:
1) Capability
• Hardware structure can be modeled equally effectively in both
VHDL and Verilog. When modeling abstract hardware, the capability of
VHDL can be achieved in Verilog.
2) Compilation
• VHDL: Multiple designunits (entity/architecture pairs), that
reside in the same system file, may be separately compiled if so desired.
However, it is good design practice to keep each design unit in it's own
system file in which case separate compilation should not be an issue.
• Verilog: The Verilog language is still rooted in it's native
interpretative mode. Compilation is a means of speeding up simulation, but
has not changed the original nature of the language. As a result care must be
taken with both the compilation order of code written in a single file and the
compilation order of multiple files. Simulation results can change by simply
changing the order of compilation.
3) Data types
• VHDL: A multitude of language or user defined data types can
be used. This may mean dedicated conversion functions are needed to convert
objects from one type to another.
• Verilog. Compared to VHDL, Verilog data types are very
simple, easy to use and very much geared towards modeling hardware
structure
4) Design reusability
• VHDL. Procedures and functions may be placed in a package so
that they are available to any designunit that wishes to use them.
• Verilog. There is no concept of packages in Verilog.
5) Easiest to Learn
• Verilog is probably the easiest to grasp and understand as
compared to VHDL.
14
Fundamentals of
6) Operators Embedded Systems
• Verilog has a very useful unary operators that are not in VHDL.
• VHDL has the mod operator that is not found in Verilog.
Java and C++ are another programming languages which are used extensively for
embedded system design.
1.6 SELECTED EMBEDDED SYSTEM
APPLICATIONS
We can categorize applications of Embedded System into various categories as
mentioned in Table:
Area Applications
Navigation Systems, Automatic landing systems, Flight
Aerospace
altitude controls, engine controls, space exploration
Fuel Injection Control, Passenger environmental
Automotive
controls, antilock braking systems, air bag controls,
GPS mapping
Switches, Hubs
Communications
Printers,scanners,keyboards,displays,modems,Hard
Computer Peripherals
Disk Drives,CDROM drives
Ovens, Washing Machine,Digtal Watch, Security
Home
Alarm, Sound Recorder
Elevator Controls, Robots, Engine Control
Industrial
Data Collection, power supplies
Instrumentation
Imaging Systems, Patient monitors, Heart pacers
Medical
FAX machines, Telephones, Cash Registers
Office Automation
Now, we will discuss here two well known applications used for home appliances in
detail as follows:
1.6.1 Washing Machine
Washing machine supports three functional modes:
i) Fully Automatic Mode: In fully automatic mode, once the system is started it
perform independently without user interference and after the completion of work it
should notify the user about the completion of work. This mode instantaneously sense
cloth quality and requirement of water, water temperature, detergent, load, wash cycle
time and perform operation accordingly.
ii) Semi Automatic Mode: In this semiautomatic mode in which washing conditions
are predefined. Once the predefined mode is started the system perform its job and
after completion it inform the user about the completion of work.
iii) Manual Mode: In this mode, user has to specify which operation he wants to do
and has to provide related information to the control system. For example, if user
wants to wash clothes only, he has to choose ‘wash’ option manually. Then the system
ask the user to enter the wash time, amount of water and the load. After these data are
15
State of the Art Practices in
entered, the user should start the machine. When the specified operation is completed
Information Technology
system should inform the user.
Remember that Modes should be a selectable by a keypad.
A washing machine may have a System Controller (Brain of the System) which
provides the power control for various monitors and pumps and even controls the
display that tells us how the wash cycles are proceeding. A washing machine
comprise several components as shown in Figure 3.
Sensor
Display panel
Driving Motor
System
Controller
Water Pump
Inverter Unit
Figure 3: Block Diagram of Washing Machine
The working of these components is as follows:
i) Display Panel: It is a touch panel screen to control all the operations of a machine
ii) Sensor: It measures the water level and appropriate amount of soap. Input devices
for automatic washing machine are sensors for water flow, water level and
temperature; door switch; selector knob or buttons for settings such as spin speed,
temperature, load size and types of wash cycle required.
Water Level Sensor: It indicates beep sound when water level is low in washing tub.
Door Sensor: It indicates beep sound when all clothes are washed that means now
you can open the maching door and also you can move to your next phase. Next phase
will be dry Phase. This phase also follows same concept for drying the clothes.
iii) Driving Motor: Motor can rotate in two directions either “reverse’ or ‘forward’.
The forward direction drives the current in forward direction and motor rotates
forward. The reverse direction driver does the opposite of it. A washing machine
can maintain single motor in fully automatic or double motor in semi automatic
washing machine.
Sequence of washing the clothes with this can be explained in few steps as follows:
1) Put on your dirty clothes on to the wash tub for washing
2) Put the detergent Soap (of your choice like Surf n Excel etc.)
16
Fundamentals of
3) Put ON the tap, water rushes inside the tub. Embedded Systems
4) If its electronic control , then by the press of the keys ,you could program , if its
mechanical it shall something like an mechanical switches wherein you are
allowed to operate for setting the wash time.
5) Now the wash motor rotates and washes the clothes and gives you a beep sound
6) Now your clothes are washed ...remove it from the wash tub and put it on the
spin tub and program it accordingly...after spinning clothes are dried and you
are allowed to hang it for proper drying in sunlight.
The fully automatic also comes in two category front loading as well as top loading.
i) Front loading is the one wherein you are given an opening to put clothes in on the
front side.
ii) Top loading is on the top.
iv) System Controller: Such Component is used to control the motor speed. Motor
can move in forward direction as well as reverse direction.
System Controller reads the speed of motor and controls the speed of motor in
different phases such as in Washing, Cleaning Drying etc. All kinds of Sensors
such as Door Sensor, Pressure Sensor and Keypad, Speed sensor are also
maintained by this.
v) Water Pump: The water pump is used to recirculate water and drain out the
dirty water. This pump actually contains two separate pumps inside one: The
bottom half of the pump is hooked up to the drain line, while the top half
recirculates the wash water. The motor that drives the pump can reverse direction.
It spins one way when the washer is running a wash cycle and recirculates the
water; and it spins the other way when the washer is doing a spin cycle and
draining the water
1.6.2 Digital Sound Recorder
A digital sound recorder is a consumer electronic appliance designed to record and
play back speech. The messages are recorded using a builtin microphone and they are
stored in a digital memory. The user can quickly play back any message at any
moment through a speaker placed in the front of the device.
Figure 4 shows what our sound recorder could look like. It is a hand held unit with flat
display and fairly large buttons.
17
State of the Art Practices in
Information Technology
Screen
Yes No
Figure 4: Block Diagram of Digital Sound Recorder
The main features of the digital sound recorder are:
• Easy to use with on screen menus.
• Direct access to any message.
• Alarm clock with year2000ready calendar. The user can set a daily alarm.
The alarm beeps until the user presses a key, or after 60 seconds.
• Full Function LCD Display. The current date and time is always shown in the
display. The display also shows clear directions about how to use it and what it is
doing.
• Batterylevel indicator. The system beeps when the battery is low.
• Standby mode. It economizes the battery power. The system switches off the
peripherals when they are not in use. The normal operation is resumed when
the user presses a key.
Such a system provides good sound quality. And also sound is processed at 6 KHz
using eight bits per sample.
In Digital Sound Recorder system there are six different Functions:
Functions of Digital Sound Recorder System
Set Clock Watch Time
Delete Set Alarm
Recording
Playback
18
Fundamentals of
Embedded Systems
1) Record a message
When we want to record a message then we will use following steps:
Step1: Selects a message slot from the message directory
Step2: presse the ‘record’button.
If the message slot already stores a message, it is deleted.
The system starts recording the sound from the microphone until the user presses the
‘stop’ button, or the memory is full.
2) Playback a message
When we want to playback a message Then we will use following steps:
Step1: Selects a recorded message slot
Step2: and then presses the ‘play’ button.
If the message slot contains a recorded message then it is played through the speaker
until its end or until the user presses the stop button.
3) Delete a message
When we want to delete a message Then we will use following steps:
Step1: The user selects a used message slot
Step2: and then presses the ‘delete’ button.
The message is permanently deleted from the memory and its memory space is freed
up.
4) Set the alarm time
When we want to Set the alarm state, Then the user can switch on and off the alarm
and set the time when the alarm will sound.
This is done by selecting the different options of the alarm menu.
5) Set the clock time
When we want to set the clock time message Then user can set the clock time and
adjust it to the current time zone.
6) Watch the time
The system constantly shows the current time and date on the display. The user just
looks at it.
F Check Your Progress 1
1) Distinguish between Embedded Systems and Non Embedded Systems.
...................................................................................................
...................................................................................................
................................................................................................
2) Explain the characteristics of real time operating system for embedded system
applications.
...................................................................................................
...................................................................................................
...................................................................................................
19
State of the Art Practices in
3) What are advantages of Verilog HDL?
Information Technology
...................................................................................................
...................................................................................................
...................................................................................................
1.7 SUMMARY
Embedded system is a kind of computer system or computing device that performs a
dedicated function and/or is intended for use with a specific embedded software
application. It has been found that such systems are not usable as a commercially
viable substitute for generalpurpose computers. In the same way, we can define
embedded operating system as the software program that manages all the other
programs in an embedded device after initial load of programs.
Important concepts like requirement and specifications play a vital role in Embedded
System design implementation. Such Systems use programming languages in which
hardware languages such as Verilog and VHDL are used for their hardware support
and also well known software languages like C, C++ and Java etc. We have also
discussed various applications of Embedded System in section.
1.8 ANSWERS/SOLUTIONS
1) An embedded system is a singlepurpose computer built into a larger system for
the purposes of controlling and monitoring the system. These are also known as
special purpose computer system. Example: Digital watches and MP4 Players,
Digital Sound Recorder.
Non Embedded Systems are also known as general Computer general purpose
computer (e.g. a personal computer) is defined not to be an embedded system.
Such system can do many tasks depending on programming. Example: Handheld
devices. share some elements with embedded systems — such as the operating
systems and microprocessors which power them — but are not truly embedded
systems, because they allow different applications to be loaded and peripherals to
be connected.
2) RTOS Characteristics for Embedded Systems Applications:
• They have limited memory that is modular kernels. Modular kernels means
only include the needed services.
• The executed processes are usually known at system design. RTOS often
linked with the executed application(s) to the instruction memory.
3) The advantages using Verilog HDL are:
I) Easy to write
II) Easy to understand as it similar to C program
III) Easier to learn compared with VHDL.
1.9 FURTHER READINGS
http://en.wikipedia.org/wiki/Embedded_system
No comments:
Post a Comment