715ECT04 Embedded Systems 2M & 16M
715ECT04 Embedded Systems 2M & 16M
EMBEDDED SYSTEMS
UNIT-1
EMBEDDED ARCHITECTURE
2-MARKS
An embedded system is a combination of computer hardware and software, either fixed in capability
or programmable, designed for a specific function or functions within a larger system. Some systems
use remote user interfaces as well.
A general purpose computer for example our PCs are used for different tasks.
General computers are able to work at different tasks while running different
application software.
This is not the case with embedded computer. They are programmed for particular
functionality.
Their code is burnt on the ROM and user cannot install his own application software.
Embedded computer does not require much power and computing abilities as compared
to general computer.
Microcontroller is actually a chip with CPU and some other parts like RAM, ROM, Timers,
Counters, Input/ Output ports etc. CPU is the main part that does processing.
Microcontroller based systems are smaller in size and consume low power.
A 16-bit microcontroller is often used for applications that require either longer word
lengths or off-chip I/O and memory.
Advanced thermostat systems- change the temperature level at various times during
the day.
Modern camera –has powerful features that can be added under microprocessor
control.
Complex algorithms
User interface
Real time
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
Multirate
Manufacturing cost
Power and energy
7) Give suitable example for Real time and User interface characteristics?
8) What are the factors that determine Manufacturing cost in embedded systems?
The brute force way of meeting a deadline is to speed up the hardware so that the
program runs faster.
It makes the system more expensive.
Increasing the CPU clock rate may not make enough difference to execution time, since
the program’s speed may be limited by the memory system.
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
Analyze the design at each step to determine how we can meet the specifications.
Refine the design to add detail.
Verify the design to ensure that it still meets all system goals, such as cost, speed, and so
on.
Two phases:
First, we gather an informal description from the customers known as requirements.
Second we refine the requirements into a specification that contains enough information
to begin designing the system architecture.
18) What are the two types of memory used in architectural design?Explain with
diagram?
Interconnecting all the components and check whether system is working properly.
System is built into phases and compiled seperately, which makes to identify bugs
more easily.
Identify simple bugs at earlier stages so that the more complex or obscure bugs that
can be identified by system a hard workout.
16 Marks
An Operating system (OS) is a piece of software that controls the overall operation of
the Computer.
It acts as an interface between hardware and application programs.
It facilitates
The user to format disks ,create ,print ,copy , delete and display files , read
data from files ,write data to files
Control the I/O operations
Allocate memory locations
Process the interrupts etc.
Operating system can also be defined as a collection of system calls or functions
2) Difference between Desktop OS and RTOS?
The core of the OS is the Kernel which is typically a small, highly optimized set of
libraries.
The Kernel is a program that constitutes the central core of an operating system.
It has complete control over everything that occurs in the system.
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
The Kernel is the first part of the operating system to load into memory during booting (i.e.,
system startup), and it remains there for the entire duration of the session because its
services are required continuously.
The kernel provides basic services for all other parts of the operating system, typically
including
Memory management,
Process management
File management
I/O (input/output) management
Real-time systems are those systems in which the correctness of the system depends not
only on the Output , but also on the time at which the results are produced.
Digital Control
command and control
Signal processing
Telecommunication systems
Defense
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
In a normal operating system ,if a task is running ,it will continue to run until its
completion .It cannot be stopped by the OS in the middle due to any reason .Such concept is
known as non-preemptive.
In real time OS ,a running task can be stopped due to a high priority task at any time
with-out the willing of present running task. This is known as pre-emptiveness.
A task is a basic unit or atomic unit of execution that can be scheduled by an RTOS
to use the system resources like CPU , Memory, I/O devices etc.
It starts with reading of the input data and of the internal state of the task, and terminates
with the production of the results and updating the internal state.
At any instant of time a task can be in one of the following states :
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
(i) Dormant
(ii).Ready
(iii).Running and
(iv).Blocked.
The scheduler keeps track of state of each task and decides which task enters into
running state.
Scheduler in RTOS is very simple they work based on priorities.
If the higher priority task runs in microprocessor for long time and lower priority
task are waiting in queue it is too bad.
Software interrupts are synchronous interrupts and these are triggered by a command
or instruction.
Mutex Semaphore
1) Mutexes are typically used to serialize 1) A semaphore restricts the number of
access to a section of re-entrant code that simultaneous users of a shared resource up
cannot be executed concurrently by more to a maximum number.
than one thread.
2) A mutex object only allows one thread 2) Threads can request access to the
into a controlled section, forcing other resource and can signal that they have
threads which attempt to gain access to that finished using the resource .
section to wait until the first
thread has exited from that section.
Get time
Set time
Time delay (in system clock ticks)
Time delay (in seconds)
Reset timer
24) Specify API in memory management?
It is a service provided by a kernel which allots the memory needed ,either static or
dynamic for various processes.
The manager optimizes the memory needs and memory utilization.
The API provides the following function calls to manage memory
Create a memory block
Get data from memory
Post data in the memory
Query a memory block
Free the memory block.
16 MARKS
1) Define Kernel? Draw the diagram of Architecture of the Kernel? Explain functions of
kernel?
2) Explain task and its various states?(8)
3) Explain task scheduler and various function calls provided by API? (8)
4) Write short notes on Interrupt Service Routines?(8)
5) Define Semaphores and Mutex? Explain in detail various types of semaphore? What are
the function call available in semaphore? Difference between mutex and semaphore?
6) Describe Mailboxes with neat diagram?(8)
7) Write short notes on Message Queues and its API?(8)
8) With neat diagram explain Pipes and Signals?(16)
9) Define Timers and write short notes on Memory Management(8)
10) Give a detailed description on Priority Inversion Problem?(16)
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
S.No C Embedded C
1 C is a general purpose programming Embedded C is an extension of C language . It is
language, which can be used to used to develop micro-controller based
design any type of desktop based applications (low-level or/and application
applications. level).
2 While, writing a C programming Embedded C is fully hardware dependent
language code there is no need to language.
know about computer hardware
3 C language program is hardware Embedded C program is hardware dependent.
independent.
4 For C language, the standard For Embedded C, you need to some specific
compilers can be used to compile compilers that are able to generate particular
and execute the program. hardware/micro-controller based output
5 Readability modifications, bug fixing It’s not too easy to read, understand, modify
are very easy in a C language and fix the bugs in an Embedded C language
program. program.
An infinite loop (sometimes called an endless loop ) is a piece of coding that lacks a
functional exit so that it repeats indefinitely.
Intentional uses for infinite loops include programs that are supposed to run
continuously, such as product demo or in programming for embedded system .
Each processor has its own unique machine language, so you need to choose a
compiler that is capable of producing programs for your specific target processor.
In the embedded systems case, “this compiler” almost always runs on the host
computer
5) Define Linker?
The job of the linker is to combine the object files and, in the process, to resolve all
of the unresolved symbols.
The output of the linker is a new object file that contains all of the code and data
from the input object files and is in the same object file format.
The tool that performs the conversion from relocatable program to executable
binary image is called a locator.
The locator will use this information to assign physical memory addresses to each of
the code and data sections within the relocatable program.
When the executable binary image stored as a file on the host computer, you can
download that image to the embedded system and execute it.
The executable binary image is usually loaded into a memory device on the target
board and executed from there.
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
8) Define ICE?
Remote debuggers are helpful for monitoring and controlling the state of embedded
software.
In-circuit emulator (ICE) actually takes the place of-or emulates-the processor on
your target board.
To the embedded processor, it looks like any other read-only memory device.
They are quite valuable in the earlier stages of a project when there is not yet any
actual hardware for the programmers to experiment with.
The following are few factors that are to be considered while selecting the
Programming Language for the development of Embedded Systems.
Size: The memory that the program occupies is very important as Embedded
Processors like Microcontrollers have a very limited amount of ROM.
Speed: The programs must be very fast i.e. they must run as fast as possible. The
hardware should not be slowed down due to a slow running software.
Ease of Implementation
Ease of Maintenance
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
Readability
16 MARKS
i) Compiling
ii) Linking
iii) Locating
5) Explain parameter passing techniques with suitable program for each case?
6) What is the use of temporary variables in Embedded C?Explain with program and necessary
output?
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
UNIT-4 NETWORKS
2 MARKS
1) Define Networks?
The network used is a bus, but other network topologies are also possible.
The system of PEs and networks forms the hardware platform on which the
application runs.
5) Define Bus?
A system bus is a single computer bus that connects the major components of a
computer system, combining the functions of a data bus to carry information, an
address bus to determine where it should be sent, and a control bus to determine its
operation
The input signal is sampled by the input device and passed to the first digital filter,
F1, over a point-to-point link.
The results of that filter are sent through a second point-to-point link to filter F2.
The results in turn are sent to the output device over a third point-to-point link.
If a high-priority and a low-priority device both have long data transmissions ready at the
same time, it is quite possible that the low-priority device will not be able to transmit
anything until the high-priority device has sent all its data packets.
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
It has even been used for the command interface in an MPEG-2 video chip.
The serial clock line (SCL), which indicates when valid data are on the data line.
Some nodes may be able to act as bus masters and the bus may have more than one
master.
Other nodes may act as slaves that only respond to requests from masters.
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
A start is signaled by leaving the SCL high and sending a 1 to 0 transition on SDL.
A stop is signaled by setting the SCL high and sending a 0 to 1 transition on SDL.
When all nodes are transmitting 1s, the bus is in the recessive state
The Ethernet arbitration scheme is known as Carrier Sense Multiple Access with
Collision Detection (CSMA/CD).
A node that has a message waits for the bus to become silent and then starts
transmitting.
16 MARKS
2) Describe CAN Bus? Explain the format of data frame with diagram and specify its components?
3) Give a detailed description on Ethernet? What is CSMA/CD? Explain CSMA/CD algorithm and
data frame?
5)Illustrate the case study Elevator Controller and its operations briefly?
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
A data compressor that takes in data with a constant number of bits per data element and
puts out a compressed data stream in which the data is encoded in variable-length symbols.
3) Draw the class diagram for data compressor and explain its methods?
1)Encode:
Performs the basic encoding function.
It takes in a 1-byte input symbol and returns two values:
A boolean showing whether it is returning a full buffer
If the boolean is true, the full buffer itself.
2)New-symbol-table installs a new symbol table into the object and throws away the current
contents of the internal buffer.
3) Flush returns the current state of the buffer, including the number of valid bits in the buffer.
4) Draw the class diagram for Alarm Clock and explain its components?
1)The Buzzer* class allows the buzzer to be turned off.
2)The Buttons* class provides read-only access to the current state of the buttons.
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
The modem will use frequency-shift keying (FSK),a technique used in 1200-baud
modems.
The FSK scheme transmits sinusoidal tones, with 0 and 1 assigned to different
frequencies.
The analog input is sampled and the resulting stream is sent to two digital filters .
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
One filter passes frequencies in the range that represents a 0 and rejects the 1-band
frequencies, and the other filter does the converse
12) What are the three main phases of digital still cameras?
Composition
Capture
Storage.
16 MARKS
1) Define Data Compressor ?What is Huffman coding? Specify the requirements, class diagram of
data compressor?
2) Ellaborate the Alarm clock
i)Requirements
ii) Specification
iii) System architecture
iv)Components design and testing
v)System integration and testing?
3) Discuss the requirements and system architecture of Audio player?
4) Describe Software Modem
i) Requirements
ii) Specification
iii) System architecture
iv) Components design and testing
v) System integration and testing?
5) Write short notes on Digital still camera?
6) Discus Telephone answering machine and its specifications?
Dr.A.Sumathi ,Professor &HOD Embedded Systems(2M&16M) 715ECT04
REFERENCES