Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

ASSIGNMENT

ON
EMBEDDED
SYSTEM

JOYAL JOSE AUGUSTINE


1. List the characteristics of an embedded system.

Following are important characteristics of an embedded system:

Requires real time performance

It should have high availability and reliability.

Developed around a real-time operating system

Usually, have easy and a diskless operation, ROM boot

Designed for one specific task

It must be connected with peripherals to connect input and output devices.

Offers high reliability and stability

Needed minimal user interface

Limited memory, low cost, fewer power consumptions

It does not need any secondary memory in computer.

2. List the components of Embedded system.

The components of embedded system are,

1. Power supply

2. Processor

3. Memory

4. Timers counters

5. Communication ports

6. Output and Input

7. Circuits used in application

3. Summarize the difference between Microprocessor and Microcontroller.


4. Classify the types of processors in Embedded System.

Types of Processors

General Purpose Processor (GPP) Microprocessor. Microcontroller. ...

Application Specific System Processor (ASSP)

Application Specific Instruction Processors (ASIPs)

GPP core(s) or ASIP core(s) on either an Application Specific Integrated Circuit (ASIC) or a Very
Large Scale Integration (VLSI) circuit.

5. Compare embedded system and non embedded system with examples.

An embedded device is a computer that's embedded into an end product. It might require an OS
if the computer's functionality is complex, but not necessarily. A non-embedded device is a
computer that works on its own, and is the end product itself.
6. Explain the important considerations when selecting a processor.

Speed and Performance

The most important factor to consider when choosing a processor for an embedded system is its
performance. A processor’s speed is primarily determined by its architecture and silicon design.

Optimal Power usage

Increasing the logic density and clock speed have an adverse impact on the power requirement
of the processor. Faster charging and discharging cycles in the capacitor, leakage currents may
lead to more power consumption.

Peripheral support

Apart from the processor, the embedded system has many other peripherals to perform input
and output operations. It is important to have the right peripherals to assist the processor in
optimized performance.

Advanced Processing

Along with the core processor, the presence of various co-processors and specialized processing
units can add more value to the processing performance. The instructions fetched by the core
processor are executed by the co-processors in parallel, thereby reducing the processing load.

Cost

For all the required functionalities to be built up in a system, certainly the price will be the
determining factor during the selection of processor for an embedded system.

7. Define the terms (i) DMA (ii) Watch Dog Timer.

Direct memory access (DMA) is a feature of computer systems that allows certain hardware
subsystems to access main system memory independently of the central processing unit (CPU).

A watchdog timer (WDT) is a timer that monitors microcontroller (MCU) programs to see if they
are out of control or have stopped operating. It acts as a “watchdog” watching over MCU
operation. A microcontroller (MCU) is a compact processor for controlling electronic devices.

8. Discuss about (i) Pipelining (ii) Software Timer.

Software pipelining is a type of out-of-order execution, except that the reordering is done by a
compiler (or in the case of hand written assembly code, by the programmer) instead of the
processor. Some computer architectures have explicit support for software pipelining, notably
Intel's IA-64 architecture.
A software timer (or just a 'timer') allows a function to be executed at a set time in the future.
The function executed by the timer is called the timer's callback function. The time between a
timer being started, and its callback function being executed, is called the timer's period.

9. Define the terms (i) Real Time Clock (ii) Memory Management.

Real-time clock: Integrated circuit that contains a timer that supplies the time of day (and often,
the date). An RTC generally contains a long-life battery to allow it to keep track of the time even
when there is no power applied.

The task of subdividing the memory among different processes is called memory management.
Memory management is a method in the operating system to manage operations between main
memory and disk during process execution. The main aim of memory management is to achieve
efficient utilization of memory.

10. Develop the flowchart of build process for embedded systems.

The process which converts source code to executable code is called as the build process.

11. What are the steps involved in build process?

This Process involves many steps and tools but the main three distinct steps of this process are:

Each of the source files must be compiled or assembled into an object file.

All of the object files that result from the first step must be linked together to produce a single
object file, called the relocatable program.
Physical memory addresses must be assigned to the relative offsets within the relocatable
program in a process called relocation.

12. Explain the terms (i) Emulator (ii) Simulator.

A simulator is designed to create an environment that contains all of the software variables and
configurations that will exist in an app's actual production environment. In contrast, an emulator
attempts to mimic all of the hardware features of a production environment and software
features.

13. Define the terms (i) Compiler (ii) Cross compiler.

compiler, computer software that translates (compiles) source code written in a high-level
language (e.g., C++) into a set of machine-language instructions that can be understood by a
digital computer's CPU. Compilers are very large programs, with error-checking and other
abilities.

A cross compiler is a compiler capable of creating executable code for a platform other than the
one on which the compiler is running. For example, a compiler that runs on a PC but generates
code that runs on Android smartphone is a cross compiler.

14. Define the terms (i) Program Counter (ii) Memory Management Unit.

The program counter (PC) is a register that manages the memory address of the instruction to
be executed next. The address specified by the PC will be + n (+1 for a 1-word instruction and +2
for a 2-word instruction) each time one instruction is executed.

A memory management unit (MMU) is a computer hardware component that handles all
memory and caching operations associated with the processor. In other words, the MMU is
responsible for all aspects of memory management.

15. Distinguish between Von Neumann and Harvard Architecture.


16. Explain the functions of memory manager.

The memory management function keeps track of the status of each memory location, either
allocated or free. It determines how memory is allocated among competing processes, deciding
which gets memory, when they receive it, and how much they are allowed.

17. Compose the different ways to debug the hardware.

Debugging tactics can involve interactive debugging, control flow analysis, unit testing,
integration testing, log file analysis, monitoring at the application or system level, memory
dumps, and profiling. Many programming languages and software development tools also offer
programs to aid in debugging, known as debuggers.

18. Distinguish between CISC and RISC.


19. Classify the methods of memory manager.

Six famous memory management techniques are: Fixed Partitioning, Dynamic Partitioning,
Simple Paging, Simple Segmentation, Virtual-Memory Paging and Virtual- Memory
Segmentation.

20. Justify the Need of debugging and types of debugging

Debugging is important because it allows software engineers and developers to fix errors in a
program before releasing it to the public. It's a complementary process to testing, which
involves learning how an error affects a program overall.

There are two types of debugging techniques: reactive debugging and preemptive debugging.
Most debugging is reactive — a defect is reported in the application or an error occurs, and the
developer tries to find the root cause of the error to fix it.

21. Distinguish between Synchronous and Asynchronous communication.


22. Show the structure of UART.

The UART full form is “Universal Asynchronous Receiver/Transmitter”, and it is an inbuilt IC


within a microcontroller but not like a communication protocol (I2C & SPI). The main function of
UART is to serial data communication. In UART, the communication between two devices can be
done in two ways namely serial data communication and parallel data communication.

23. Define half duplex and full duplex communication.


Half duplex mode is a two-way directional communication but one at a time. Full duplex mode is
a two-way directional communication simultaneously. In simplex mode, Sender can send the
data but that sender can't receive the data.

24. Mention few serial bus communication protocols

The serial Bus communication protocols are,

1. Interconnecting number of device circuits

2. CAN Bus

3. Universal Serial Bus (USB)

25. Define BAUD Rate.

The baud rate is the rate at which information is transferred in a communication channel. Baud
rate is commonly used when discussing electronics that use serial communication. In the serial
port context, "9600 baud" means that the serial port is capable of transferring a maximum of
9600 bits per second.

26. Differentiate between RS232 and RS485.

RS232 is more than able to perform for a short distance and low data speed requirements.
RS232 has a transmission speed of 1Mb/s up to 15M. However, RS485 has a data transmission
speed of up to 10Mb/s for a distance of 15M. At the maximum of 1200M, RS485 transmits at
100Kb/s.

27. Give examples of Synchronous and Asynchronous communication ports.

Examples of synchronous communication are phone calls or video meetings.

Examples of asynchronous communication are emails, online forums, and collaborative


documents.

28. Analyze the concept of RS232 standard.

RS-232 is a standard communication protocol for connecting computers and their peripheral
devices to enable serial data exchange. In simple terms, RS232 represents the voltage for the
path used for data exchange between the devices.

29. Define synchronous communication.

Synchronous communications is that which takes place in real-time between two or more
parties. Put simply; a synchronous communication exchange is an interactive, 'live' interchange
between people.

30. Define Protocol.


A protocol is a set of rules and guidelines for communicating data. Rules are defined for each
step and process during communication between two or more computers. Networks have to
follow these rules to successfully transmit data.

31. Difference between RS422 and RS485.

RS-422 can work and receive with full-duplex operation through two pairs of twisted pairs.
RS485 can only work half-duplex and cannot perform transmission and reception
simultaneously, but it only needs one couple of twisted pairs. RS422 and RS485 can transmit
1200 meters at 19kpbs.

32. Justify the need for RS-485.

RS-485 is an industrial specification that defines the electrical interface and physical layer for
point-to-point communication of electrical devices. The RS-485 standard allows for long cabling
distances in electrically noisy environments and can support multiple devices on the same bus.

33. Explain about the limitations of I2C.

The limitations are as follows,

I2C uses resistive pull-up for its bus. Limiting the bus speed.

Bus speed is directly dependent on the bus capacitance, meaning longer I2C bus traces will limit
the bus speed.

I2C bus is shared by multiple slave devices, if any one of these slaves misbehave (pull either SCL
or SDA low for indefinite time) the bus will be stalled. No further communication will take place.

Since the bus is shared by many devices, debugging an I2C bus (detecting which device is
misbehaving) for issues is pretty difficult.

I2C master protocol is straightforward and easy to implement (even in firmware), but that is not
the case if you want to implement the protocol in slave devices. I2C protocol implementation for
slave devices is a bit complicated.

Half duplex communication. At a time, data is transmitted only in one direction.

34. Compare the buses used in serial communication


35. Define CAN bus.

(Controller Area Network bus) A rugged, digital serial bus designed for industrial environments.
Introduced by Bosch in the mid-1980s for in-vehicle communications, it is used in myriad
applications including factory automation, building automation, aircraft and aerospace as well
as in cars, trucks and buses.

36. Discuss about SPI.

Serial Peripheral Interface (SPI) is an interface bus commonly used to send data between
microcontrollers and small peripherals such as shift registers, sensors, and SD cards. It uses
separate clock and data lines, along with a select line to choose the device you wish to talk to.

37. Define device driver

A device driver is a particular form of software application that allows one hardware device
(such as a personal computer) to interact with another hardware device (such as a printer). A
device driver may also be called a software driver.

38. List the features of CAN bus.

Flexible: CAN nodes are not limited by the protocol and can be easily connected or
disconnected. Fast: CAN supports a data rate of 1 MBit/s @ 40m bus length. Fault confinement:
Faulty nodes do not disturb the communication. Broadcast capabilities: Messages can be sent to
one /many/all nodes.

40. Justify the need of device driver

Device Drivers are very essential for a computer system to work properly because without
device driver the particular hardware fails to work accordingly means it fails in doing a particular
function/action for which it has been created.
41. What is EDLC? List the different phases in EDLC.

Embedded Product Development Life Cycle (Let us call it as EDLC, though it is not a standard and
universal term) is an 'Analysis -Design -Implementation' based standard problem solving
approach for Embedded Product Development.

Different Phases of Embedded Product Development Life Cycle (EDLC)

Concept.

Requirement gathering.

Design phase.

Development and implementation.

Integration.

Verification.

Maintenance and retire.

42. Discuss about model? Mention any 4-EDLC Modelling approaches.

Models are forms of description often adopted in software development. They are abstractions
used to represent and communicate what is important, devoid of unnecessary detail, and to
help developers deal with the complexity of the problem being investigated or the solution
being developed.

WATERFALL MODEL

ITERATIVE/ INCREMENTAL OR FOUNTAIN MODEL

PROTOTYPING MODEL

SPIRAL MODEL

Are the four EDLC modelling approaches

43. Explain the following types of model

(i) Protyping/Evolutionary Model

(ii) Spiral Model.

Evolutionary prototyping is a software development method where the developer or


development team first constructs a prototype. After receiving initial feedback from the
customer, subsequent prototypes are produced, each with additional functionality or
improvements, until the final product emerges.
The spiral model, initially proposed by Boehm, is an evolutionary software process model that
couples the iterative feature of prototyping with the controlled and systematic aspects of the
linear sequential model. It implements the potential for rapid development of new versions of
the software. Using the spiral model, the software is developed in a series of incremental
releases. During the early iterations, the additional release may be a paper model or prototype.
During later iterations, more and more complete versions of the engineered system are
produced.

44. Define the Linear or Water fall Model with suitable flow chart.

The waterfall model is a classical model used in system development life cycle to create a
system with a linear and sequential approach. It is termed as waterfall because the model
develops systematically from one phase to another in a downward fashion.

45. Classify the 3 categories of product development.

The product development process can be broadly navigated in three stages: Ideation, Feasibility,
and Capability.

46. Mention different models used for the development of an embedded system.

Three types of models should be used when designing such systems: analytic models,
executable simulations, and prototypes.

47. Define Product design phase and development phase

Design is the very core of innovation. Product design is

not about making products to look aesthetically pleasing ordesign and development programs.
New products or services,
which are developed on a regular basis, are one of the main

factors for sustainable success of companies. Product design

and development together are essential to drive

commercialization and growth in the manufacturing sector.

To capitalize on current and future market opportunities

manufacturers should keep on focusing their product design

and development strategies by evolving customers’

requirements.

Product development is conceptualised as the set of

activities needed for the conception and design to build the

product, from the identification of a market opportunity to its

delivery to the client. In short product development is

transformation of a market opportunity and set of

assumptions about product technology into a product

available for sale (Krishnan and Ulrich, 2001). A product

concept is generally brought to life through decisions about

the physical form and appearance of the product. Product

development process is mainly driven by rapid assimilation of

technology, increasing consumer demands and increasing

competition. Evolving product platforms which can form

basis for multiple products and developing solutions

concurrently with products can manage cost and complexities

during product development.

48. Compose the models used in EDLC 5

The EDLC models are,


Waterfall or Linear Model

Iterative/ Incremental or Fountain Model

Prototyping Model

Spiral Model

49. What are the processes involved in Co-Design?

Through a rich and often boisterous discussion, four teachers collectively broke down the
engineering design process into four main phases: problem definition, design exploration,
design optimization, and design communication.

52. Define deployment phase.

The deployment phase is the final step in the software development life cycle and delivers the
final product to the customer in a live production environment. After the product deploys, the
product is ready for customers to use.

53. What is state machine model?

A state machine model is a mathematical model that groups all possible system occurrences,
called states. Every possible state of a system is evaluated, showing all possible interactions
between subjects and objects. If every state is proven to be secure, the system is proven to be
secure.

4. What is meant by Memory? Explain the different types of memory devices (i) ROM (ii) RAM.

Computer memory is a generic term for all of the different types of data storage technology
that a computer may use, including RAM, ROM, and flash memory. Some types of computer
memory are designed to be very fast, meaning that the central processing unit (CPU) can access
data stored there very quickly.

Random Access Memory (RAM) –

It is also called read-write memory or the main memory or the primary memory.

The programs and data that the CPU requires during the execution of a program are stored in
this memory.

It is a volatile memory as the data is lost when the power is turned off.
RAM is further classified into two types- SRAM (Static Random Access Memory) and DRAM
(Dynamic Random Access Memory).

Read-Only Memory (ROM)

Stores crucial information essential to operate the system, like the program essential to boot
the computer.

It is not volatile.

Always retains its data.

Used in embedded systems or where the programming needs no change.

Used in calculators and peripheral devices.

ROM is further classified into four types- MROM, PROM, EPROM, and EEPROM.

5. Explain the following types of Embedded Software (i) Machine Code Format (ii) Assembly

Language (iii) High Level Language.

Machine code format

It uses the instruction set of a particular computer architecture. It is usually written in binary.
Machine code is the lowest level of software. Other programming languages are translated into
machine code so the computer can execute them. An instruction tells the process what
operation to perform.

An assembly language is a type of programming language that translates high-level languages


into machine language.

It is a necessary bridge between software programs and their underlying hardware platforms.

Today, assemble languages are rarely written directly, although they are still used in some niche
applications such as when performance requirements are particularly high.

A high-level language (HLL) is a programming language such as C, FORTRAN, or Pascal that


enables a programmer to write programs that are more or less independent of a particular type
of computer. Such languages are considered high-level because they are closer to human
languages and further from machine languages.

In contrast, assembly languages are considered low-level because they are very close to
machine languages.

6. How to select the processor based upon its architecture and applications.
With numerous kinds of processors with various design philosophies available at our disposal for
using in our design, following considerations need to be factored during processor selection for
an embedded system.

Performance Considerations

Power considerations

Peripheral Set

Operating Voltage

Specialized Processing Units

Now let us discuss each of them in detail.

Performance considerations

The first and foremost consideration in selecting the processor is its performance. The
performance speed of a processor is dependent primarily on its architecture and its silicon
design. Evolution of fabrication techniques helped packing more transistors in same area there
by reducing the propagation delay. Also presence of cache reduces instruction/data fetch
timing. Pipelining and super-scalar architectures further improves the performance of the
processor. Branch prediction, speculative execution etc are some other techniques used for
improving the execution rate. Multi-cores are the new direction in improving the performance.

Rather than simply stating the clock frequency of the processor which has limited significance to
its processing power, it makes more sense to describe the capability in a standard notation.
MIPS (Million Instructions Per Second) or MIPS/MHz was an earlier notation followed by
Dhrystones and latest EEMBC’s CoreMark. CoreMark is one of the best ways to compare the
performance of various processors.

Processor architectures with support for extra instruction can help improving performance for
specific applications. For example, SIMD (Single Instruction/Multiple Data) set and Jazelle – Java
acceleration can help in improving multimedia and JVM execution speeds.

So size of cache, processor architecture, instruction set etc has to be taken in to account when
comparing the performance.

Power Considerations

Increasing the logic density and clock speed has adverse impact on power requirement of the
processor. A higher clock implies faster charge and discharge cycles leading to more power
consumption. More logic leads to higher power density there by making the heat dissipation
difficult. Further with more emphasis on greener technologies and many systems becoming
battery operated, it is important the design is for optimal power usage.
Techniques like frequency scaling – reducing the clock frequency of the processor depending on
the load, voltage scaling – varying the voltage based on load can help in achieving lower power
usage. Further asymmetric multiprocessors, under near idle conditions, can effectively power
off the more powerful core and load the less powerful core for performing the tasks. SoC comes
with advanced power gating techniques that can shut down clocks and power to unused
modules.

Peripheral Set

Every system design needs, apart from the processor, many other peripherals for input and
output operations. Since in an embedded system, almost all the processors used are SoCs, it is
better if the necessary peripherals are available in the chip itself. This offers various benefits
compared to peripherals in external IC’s such as optimal power architecture, effective data
communication using DMA, lower BoM etc. So it is important to have peripheral set in
consideration when selecting the processor.

Operating Voltages

Each and every processor will have its own operating voltage condition. The operating voltage
maximum and minimum ratings will be provided in the respective data sheet or user manual.

While higher end processors typically operate with 2 to 5 voltages including 1.8V for
Cores/Analogue domains, 3.3V for IO lines, needs specialized PMIC devices, it is a deciding factor
in low end micro-controllers based on the input voltage. For example it is cheaper to work with
a 5V micro-controller when the input supply is 5V and a 3.3 micro-controllers when operated
with Li-on batteries.

Specialized Processing

Apart from the core, presence of various co-processors and specialized processing units can help
achieving necessary processing performance. Co-processors execute the instructions fetched by
the primary processor thereby reducing the load on the primary. Some of the popular co-
processors include

Floating Point Co-processor:

RISC cores supports primarily integer only instruction set. Hence presence of a FP co-processor
can be very helpful in application involving complex mathematical operations including
multimedia, imaging, codecs, signal processing etc.

Graphic Processing Unit:

GPU(Graphic Processing Unit) also called as Visual processing unit is responsible for drawing
images on the frame buffer memory to be displayed. Since human visual perception needed at-
least 16 Frames per second for a smooth viewing, drawing for HD displays involves a lot of data
bandwidth. Also with increasing graphic requirements such as textures, lighting shaders etc,
GPU’s have become a mandatory requirements for mobile phones, gaming consoles etc.

Various GPU’s like ARM’s MALI, PowerVX, OpenGL etc are increasing available in higher end
processors. Choosing the right co-processor can enable smooth design of the embedded
application.

Digital Signal Processors

DSP is a processor designed specifically for signal processing applications. Its architecture
supports processing of multiple data in parallel. It can manipulate real time signal and convert to
other domains for processing. DSP’s are either available as the part of the SoC or separate in an
external package. DSP’s are very helpful in multimedia applications. It is possible to use a DSP
along with a processor or use the DSP as the main processor itself.

Price

Various considerations discussed above can be taken in to account when a processor is being
selected for an embedded design. It is better to have some extra buffer in processing capacities
to enable enhancements in functionality without going for a major change in the design. While
engineers (especially software/firmware engineers) will want to have all the functionalities,
price will be the determining factor when designing the system and choosing the right
processor.

In the upcoming blog, we will discuss about various memory technologies and factors to be
considered when selecting them.

7. With a neat diagram explain the working of Direct Memory Access (DMA) with architecture and

timing diagram.

Direct memory access (DMA) is a mode of data transfer between the memory and I/O devices.
This happens without the involvement of the processor. We have two other methods of data
transfer, programmed I/O and Interrupt driven I/O.
The architecture and timing diagram of DMA are shown above.

8. Discuss the following terms in memory management

(i) Memory allocation

(ii) Memory leak

(iii) Methods of Memory Management Strategy.

Memory allocation is a process by which computer programs and services are assigned with
physical or virtual memory space.

Memory allocation is the process of reserving a partial or complete portion of computer


memory for the execution of programs and processes. Memory allocation is achieved through a
process known as memory management.

In computer science, a memory leak is a type of resource leak that occurs when a computer
program incorrectly manages memory allocations[1] in a way that memory which is no longer
needed is not released. A memory leak may also happen when an object is stored in memory
but cannot be accessed by the running code.[2] A memory leak has symptoms similar to a
number of other problems and generally can only be diagnosed by a programmer with access to
the program's source code.

Six famous memory management techniques are: Fixed

Partitioning, Dynamic Partitioning, Simple Paging, Simple

Segmentation, Virtual-Memory Paging and Virtual-

Memory Segmentation.
• Fixed partitioning: this partitioning approach

divided into a fixed number of partitions just one

process can be loaded into one partition at the

same time. Strengths of this approach: easy to

implement it and slandered method as a

partitioning solution. Weaknesses of this approach

insufficient use because of the internal

fragmentation, must know the maximum number

of active processes can run is fixed size of the task

is limited to largest partition size, degree of

multiprogramming limited by the number of

partitions, memory is wasted in the partition, must

translate relative address to physical address.

• Dynamic Partitioning: Partitions are created

dynamically, each process loaded into a partition is

exactly have same size as the process. Strengths of

this approach are: ensure more efficient use of the

main memory and no internal fragmentation.

Weaknesses of this approach are inefficient use of

processor because of the need for compaction and

external fragmentation.

• Simple Paging: Strengths of this approach are: no

need for external fragmentation, transfers between disks can be at the granularity of individual
pages.

Weaknesses of this approach are: maybe there is no

correspondence between page protections. Settings


and application data structures, requiring per

process page tables, usually operating system need

more storage for its internal data structures.

• Simple Segmentation: Strengths of this approach is

no internal fragmentation. Weaknesses of this

approach are: reduce the overhead compared to

dynamic partitioning approach and improved the

memory utilization

• Virtual-Memory Paging: Strengths of this approach

are: having large virtual address space, no external

fragmentation and higher degree of multi

programming. Weaknesses of this approach is

overhead coming from the complex of memory

management.

• Virtual-Memory Segmentation: Strengths of this

approach are: it supports a high level of

multiprogramming especially the enormous virtual

address space and no internal fragmentation.

Weaknesses of this approach is the overhead of

complex memory management.

9. Discuss in detail about the timer and counter devices inEmbedded System

A timer is a specialized type of clock which is used to measure time intervals. A timer that
counts from zero upwards for measuring time elapsed is often called a stopwatch. It is a device
that counts down from a specified time interval and used to generate a time delay, for example,
an hourglass is a timer.
A counter is a device that stores (and sometimes displays) the number of times a particular
event or process occurred, with respect to a clock signal. It is used to count the events
happening outside the microcontroller. In electronics, counters can be implemented quite easily
using register-type circuits such as a flip-flop.

Registers

The 8051 has two timers, Timer 0 and Timer 1. They can be used as timers or as event counters.
Both Timer 0 and Timer 1 are 16-bit wide. Since the 8051 follows an 8-bit architecture, each 16
bit is accessed as two separate registers of low-byte and high-byte.

Timer 0 Register

The 16-bit register of Timer 0 is accessed as low- and high-byte. The low-byte register is called
TL0 (Timer 0 low byte) and the high-byte register is called TH0 (Timer 0 high byte). These
registers can be accessed like any other register. For example, the instruction MOV TL0, #4H
moves the value into the low-byte of Timer #0.

Timer 0

Timer 1 Register

The 16-bit register of Timer 1 is accessed as low- and high-byte. The low-byte register is called
TL1 (Timer 1 low byte) and the high-byte register is called TH1 (Timer 1 high byte). These
registers can be accessed like any other register. For example, the instruction MOV TL1, #4H
moves the value into the low-byte of Timer 1.

Timer 1

TMOD (Timer Mode) Register

Both Timer 0 and Timer 1 use the same register to set the various timer operation modes. It is
an 8-bit register in which the lower 4 bits are set aside for Timer 0 and the upper four bits for
Timers. In each case, the lower 2 bits are used to set the timer mode in advance and the upper 2
bits are used to specify the location.

10. Explain (i) Building Process for Embedded System (ii) Structural unit of Embedded Processor

including Hardware and Software Unit.

BUILD PROCESS IN EMBEDDED SYSTEM


Definition: The process which converts source code to executable code is called as the build
process.

The build process for embedded systems is different. This is because the code to be run on an
embedded system is written one platform i.e. general purpose computer and executed on
another platform i.e. the target hardware.

An Embedded system would also use tools such as a Compiler, Linker, Locater and Debugger to
perform the entire build process. These tools would be a part of a larger IDE.

A compiler which produces the executable code to be run on a different platform is called a
cross-compiler; else it is called a native compiler.

Ex. Turbo C++ is a native compiler. The compiler in case of embedded systems development is a
cross compiler.

The build process involves three steps:

Compiling

Linking

Locating

Structural units in Embedded Processor

Internal Buses

It internally connects all the structural units inside the processor. Its width can be of 8, 16, 32 or
64 bits. The internal buses include address bus, data bus and control bus. All the internal units of
the processor are communicated with the external buses through an interface unit called Bus
Interface Unit(BIU).

Instruction Units

The processor executes several operations with the help of a piece of code or program called
instructions. All these instruction are arranged in a queue called Instruction Queue(IQ). This
helps the Instruction Register to execute the instructions without the need to wait.

Caches

In general, cache is the temporary storage place in the processor, where the data can easily be
retrieved by the CPU for quick operation. Cache is available in your computers, laptop, mobile
phone, browser, app, etc. The embedded processor has three cache memory for fast operation.

Control Units
The control unit(CU) is one of the important structural units in an any embedded processor. It is
responsible for all the control of the bus activities and unit functions needed for processing. It
directs all the units of a processor to respond to the instruction that is executed.

Processing Units

Processing units receives the input data, process it and produces the output. Depending on the
function of the embedded system, the processing is done through different units like ALU, FLPU,
AOU and advanced units.

Register Sets

Application Register Set(ARS) is a set of on-chip registers used during processing of instructions
of the application program of the user. A register window consists of a subset of registers with
each subset storing static variables of software – routine.

Memory Registers

Registers are smallest part of the CPU, where the data and address can be stored and accessed
quickly. There are various registers like accumulator, general purpose registers, flag registers,
memory address register, memory data register, program counter, stack pointer, etc.

Program Counter and Stack Pointer

Program counter is a register that stores the address of the next instruction to be executed from
the memory. It generates the instruction cycle to fetch the address from memory through MAR.

11. With a neat diagram discuss the following terms in Embedded Processor (i) DMA Architecture

(ii) Watch dog Timer (iii) Real Time Clock


1 shows the DMA controller architecture and how the DMA controller interacts with the CPU.

2 A watchdog timer (WDT) is a timer that monitors microcontroller (MCU) programs to see if
they are out of control or have stopped operating. It acts as a “watchdog” watching over MCU
operation.

A microcontroller (MCU) is a compact processor for controlling electronic devices. Integrated


into a wide variety of electronic devices, MCUs come pre-loaded with program software whose
commands are used to control electronic devices.

This makes safeguarding normal MCU operation essential. Should the MCU program, for some
reason, run out of control or stop running altogether, the electronic device may behave
erratically, which in the worst case could cause damage or an accident.

To proactively prevent such incidents, it falls to the role of the watchdog timer to constantly
watch over the MCU to ensure it is operating normally.

3 A real-time clock (RTC) is an electronic device (most often in the form of an integrated circuit)
that measures the passage of time.Although the term often refers to the devices in personal
computers, servers and embedded systems, RTCs are present in almost any electronic device
which needs to keep accurate time of day.

12. Illustrate the synchronous and asynchronous communications from serial devices.
A synchronous serial interface always pairs its data line(s) with a clock signal, and all devices on
a synchronous serial bus share a common clock. This makes for a more straightforward, even
faster serial transfer, but it also requires at least one extra wire between communicating
devices. In simple terms which interface required SCK, SCLK pin the synchronous.

In synchronous method, for example in SPI there are 4 pins used, 2 pins are for MISO & MOSI
(Master In Slave Out & Master Out Slave In), 1 pin for fixed Clock (from single master device)
and 1 Data pin for each slave device. Here SS1, SS2, SS3 are data pins for 3 slave devices.

IN ASYNCHRONOUS METHOD

This is also Serial communication but data transfer without any support from an external clock
signal or in other words in this you do not need a clock for communicating with other devices.
For example UART, RS232 etc. are Asynchronous serial communication methods.

Usually RS232, RS422 & RS485 have two wires RX and TX with predefined data rate (also called
baud rate) and no predetermined master or slave device.

13. Describe the functions of a typical parallel I/O interface with a neat diagram.
The main purpose of the I/O interfaces is to transmit and receive data; however, the portion
designated as an I/O interface may contain additional resources, such as voltage translators,
registers, impedances, and buffers.

The term used for the I/O interface section may vary, depending on the manufacturer; however,
the general function is the same. Consult the specific FPGA manufacturer's datasheet or
application notes for the complete I/O interface details. As an example, a brief description of
Altera's and Xilinx's I/O interface is presented.

Altera calls its I/O interfaces I/O elements (IOEs). They provide the basic internal to external
interface function, support various differential and single-ended I/Os, and provide
programmable pull-up resistors and I/O delays.

14. Discuss the types of serial port devices.

Normally, a serial port is a male port, while a parallel port is a female port. System resource
configurations are chosen for each port and are identified by COM1, COM2, COM3, COM4, and
so forth. Each COM position represents an input/output (I/O) and an interrupt request (IRQ)
address. The I/O address transfers and receives data to and from a peripheral device such as a
mouse or keyboard.

The serial port standard is RS-232. This standard is used for transmitting serial communication
between devices, which are usually called data communications equipment (DCE) and data
terminal equipment (DTE). The serial port uses a nine-pin (DE-9) connector or a 25-pin (DB-25)
connector. Originally, the standard used 25 pins. Because many of the pins were unused and
were quite bulky, the smaller DE-9 connector became popular.

Higher speed communication was needed for serial communication, such as external data
storage units. In 1998, the Universal Serial Bus (USB) and FireWire introduced faster interfaces.
This new technology could transfer data at high rates on the same bus, called a daisy chain.

Today, the serial port is seldom used but can be found as a communication device for GPS
receivers, LED and LCD text displays, bar-code scanners and flat-screen monitors.
Mouse - One of the most commonly used devices for serial ports, usually used with computers
with no PS/2 or USB ports and specialty mice.

Modem - Another commonly used device for serial ports. Used commonly with older computers,
however, is also commonly used for its ease of use.

Network - One of the original uses of the serial port, which allowed two computers to connect
together and allow large files to be transferred between the two.

Printer - Today, this not a commonly used device for serial ports. However, was frequently used
with older printers and plotters.

You might also like