27
IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 1 UNIT – 1 1.1. Embedded Systems – Definition, Characteristics and Classification 1.2. Applications of Embedded Systems 1.3. Host and target concept 1.4. Features and architecture considerations for ES (ROM,RAM, Timers.. etc..) 1.5. Embedded Processor and their types 1.6. Memory types 1.7. Design process of embedded systems 1.8. Programming languages & tools for embedded design 1.1. EMBEDDED SYSTEMS - INTRODUCTION Definition : An embedded system is an electronic/electro-mechanical system designed to perform a specific function and is combination of both hardware and firmware (software). The program instructions written for embedded systems are referred to as firmware, and are stored in Read-Only-Memory or Flash memory. Every ES is unique, and the hardware as well as software is highly specialized to the application domain. Embedded systems are designed to do some specific task, rather than be a general purpose computer for multiple tasks. Characteristics of Embedded System: 1. Application and Domain Specific Embedded Systems do a very specific task; they can’t be used for any other purpose. Both hardware & software in an embedded system are optimized for the specific task. For example, we can’t replace the embedded control unit of microwave oven with air-conditioners embedded control unit. 2. Reliability Embedded Systems have to work for thousands of hours without break. This calls for very reliable hardware and software. For ex., if the embedded system comes to a halt state due to hardware error, the system should reset itself without any human intervention. VISVODAYA TECHNICAL ACADEMY :: KAVALI

maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 1

UNIT – 1

1.1. Embedded Systems – Definition, Characteristics and Classification1.2. Applications of Embedded Systems1.3. Host and target concept1.4. Features and architecture considerations for ES (ROM,RAM, Timers.. etc..)1.5. Embedded Processor and their types1.6. Memory types1.7. Design process of embedded systems1.8. Programming languages & tools for embedded design

1.1. EMBEDDED SYSTEMS - INTRODUCTION

Definition :• An embedded system is an electronic/electro-mechanical system designed to

perform a specific function and is combination of both hardware and firmware (software). The program instructions written for embedded systems are referred to as firmware, and are stored in Read-Only-Memory or Flash memory.

• Every ES is unique, and the hardware as well as software is highly specialized to the application domain. Embedded systems are designed to do some specific task, rather than be a general purpose computer for multiple tasks.

Characteristics of Embedded System:

1. Application and Domain Specific Embedded Systems do a very specific task; they can’t be used for any other

purpose. Both hardware & software in an embedded system are optimized for the specific task.

For example, we can’t replace the embedded control unit of microwave oven with air-conditioners embedded control unit.

2. Reliability Embedded Systems have to work for thousands of hours without break. This

calls for very reliable hardware and software. For ex., if the embedded system comes to a halt state due to hardware error,

the system should reset itself without any human intervention. Reliability is a measure of how much percentage we can rely upon the proper

functioning of the system without failures.

3. Reactive Embedded systems are in constant interaction with the real world through

sensors and user-defined input devices. Any changes happening in the Real world (called as an Event) are captured by

the sensors/input devices and the control algorithm reacts in a designed manner to bring the controlled output variables to the desired level.

Hence the Embedded systems are referred as Reactive systems, as they produce changes in output in response to the changes in the input.

4. Real-Time Performance

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 2: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 2

Real Time System operation means the timing behavior of the system should be deterministic, meaning that the system should respond to requests in a known amount of time.

In real-time embedded systems, a specific job has to be completed within a specific time. They have time constrains and they have to work against some deadlines. (Examples of Real Time Systems – Missiles, flight control systems, nuclear plane safety system)

A Real Time System should not miss any deadlines for tasks (or) operations. For example, in a nuclear plant safety system, missing a deadline may cause loss of life / damage to property. Hence in hard real-time embedded systems which are subject to very strict deadlines for performing specific tasks, the timing analysis is of great importance.

5. Low Power consumption Most of the Embedded Systems operate through a battery. To reduce the

battery drain and to avoid frequent recharging of the battery, the power consumption has to be very low.

Hardware designers must address this issue – for example, by reducing the no. of components, by designing the processor to revert to low-power mode when there is no operation to perform.

6. Operates in harsh environments Some of the embedded systems are to be operated in harsh environment

conditions like high temperature zone, areas subject to vibrations and shock etc. Systems placed in such areas should be capable to withstand all these adverse operating conditions.

-----------------------------------------------------------------------------------------------------------------------------------

General Purpose Computing system Embedded system

It is combination of generic hardware and a general purpose OS for executing a variety of applications.

It is combination of special purpose hardware and software for executing specific set of applications

It contains general purpose operating system

It may (or) may not contain an operating system for functioning.

Applications are alterable (programmable)by the user.

Applications are non-alterable by the user.

Performance is the key deciding factor in the selection of the system. Always ‘faster is better’.

Application specific Requirements (performance, power requirements, memory usage, size, design and manufacturing cost, etc) are the key deciding factors.

Less tailored towards reduced operating power requirements.

Highly tailored to take the advantage of the power saving modes supported by the hardware.

Response requirements are not time-critical.

For certain category of embedded systems like mission critical systems, the response time requirement is highly critical.

Need not be deterministic in execution behavior.

Execution behavior is deterministic for certain types of Embedded systems like

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 3: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 3

‘Hard Real Time’ systems.

Classification of Embedded System :The classification of embedded system is based on following criteria:

(a) Based on generation(b) Based on complexity (c) Based on functionality & performance requirements

(a)Classification based on generation

1. First generation (1G): Built around 8-bit microprocessors like 8085, Z80. Simple in hardware circuit with firmware developed in Assembly code. Examples: Digital telephone keypads, stepper motor control units

2. Second generation (2G): Built around 16-bit μp and 8-bit μc. They are more complex & powerful than 1G μp & μc.

Examples: Data Acquisition system (DAS), Supervisory Control and Data Acquisition systems (SCADA)

3. Third generation (3G): Built around 32-bit μp & 16-bit μc. A new concept of application and domain specific processors / controllers

like Digital Signal Processors(DSPs), Application Specific Integrated Circuits(ASICs).

Examples: Robotics, Media, Industrial and process control, networking, etc.

4. Fourth generation: Built around 64-bit μp & 32-bit μc. The concept of System on Chips (SoC), reconfigurable processors, multi-

core processors High performance, tight integration, miniaturization, and very powerful.

Examples: Smart Phones, Mobile Internet Devices

(b)Classification based on Complexity

1. Small-scale: Simple applications where the performance requirements are not time-

critical. Built around low performance and low cost 8 or 16 bit μp/μc.

Example: an electronic toy

2. Medium-scale: Slightly complex in hardware and firmware requirement. Built around medium performance and low cost 16 or 32 bit μp/μc. Usually contain embedded operating system (RTOS) for functioning

Examples: Industrial applications, Monitoring & Control of Manufacturing Equipment

3. Large-scale / complex: Highly complex hardware & firmware. Built around 32 or 64 bit RISC μp/μc (or) PLDs (or) SoC (or) multi-core

processors.

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 4: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 4

Response is time-critical.Examples: Mission critical applications like Aircraft operating and

control Systems, Electric power systems.

(c)Classification based on functionality and performance requirements

1. Stand alone embedded systems As the name implies, stand-alone systems work in stand-alone mode. They take inputs, process them and produce outputs. The inputs can be electrical signals from transducers / commands from

human being such as pressing of a button. The outputs can be electrical signals to drive another system, an LED display / LCD display/DC motors.

Many ES used in consumer electronics, automobiles, process control in manufacturing units fall into this category. Examples: Digital Camera, Air Conditioner, Refrigerator, Microwave oven, DVD player

2. Real time systems Embedded systems in which some specific task has to be done in a specified

period are called Real-Time systems. They have time constrains and they have to work against some deadlines.

Meeting the deadlines is the most important requirement of Real-Time system.

A Real Time System should not miss any deadlines for tasks (or) operations. For example, in a nuclear plant safety system, missing a deadline may cause loss of life /damage to property. Hence in hard real-time embedded systems which are subject to very strict deadlines for performing specific tasks, the timing analysis is of great importance.

Ex: Missile embedded with a tracking system, flight control systems, nuclear plant safety system, and navigation system

3. Networked Information appliances Embedded systems that are provided with network interfaces and accessed

by networks such as Local Area Network (LAN) or Internet are called as Networked Information appliances.

Such embedded systems are connected to a network, typically a network running TCP/IP (Transmission Control Protocol/ Internet Protocol) protocol suite.

They run the complete TCP/IP protocol stack and can communicate with other nodes on the network.Examples: A networked process control system consists of a no. of embedded

systems connected as a LAN. Each embedded system can send real-time data to a central location from where the entire process control system can be monitored.

A web camera which is connected to internet camera can send pictures in real-time to any computer connected to internet. In such case, the web camera has to run the HTTP server software in addition to the TCP/IP protocol stack.

IoT applications – the door lock of your home can be controlled from your desktop over the internet.

4. Mobile devices Mobile devices such as mobile phones, Personal Digital Assistants(PDA),

smart phones etc. are a special category of embedded systems.

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 5: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 5

Mobile devices are capable of supporting high data rate services in addition to the voice services. Accessing internet services such as e-mail, World Wide Web and so on can be done while a person is on the move. They are capable of handling multimedia applications.

The limitation of mobile devices – small size, lack of good user interfaces such as full-fledged keyboard and display, memory constrains, battery life time etc.

1.2. APPLICATIONS OF EMBEDDED SYSTEMS• An embedded system is an electronic/electro-mechanical system designed to

perform a specific function and is combination of both hardware and firmware (software). The program instructions written for embedded systems are referred to as firmware, and are stored in Read-Only-Memory or Flash memory.

• Every ES is unique, and the hardware as well as software is highly specialized to the application domain.

• The embedded systems are used in various domains. Within the domain itself, according to the application, they may have different functionalities. Each embedded system is designed to serve the purpose of any one or a combination of the following tasks:

Purpose of Embedded System Data Collection/Storage/Representation Data communication Data signal processing Monitoring Control Application specific user interface

The different applications/Examples of Embedded systems are given below

1. Consumer Electronics: Camera, Camcorders(Video capture and recording)2. Household appliances: Digital TVs, DVD players, Set top boxes, Washing

machine, Refrigerator.

3. Automotive industry: Anti-lock breaking system (ABS), engine control, automatic

navigation system, engine control4. Home automation & security systems: Air conditioners, sprinklers, fire

alarms, CC cameras, home security system

5. Telecom: Cellular phones, telephone switches, handset multimedia applications

6. Computer peripherals: Printers, scanners, fax machines7. Computer networking systems: Network routers, switches, hubs, firewalls8. Healthcare: EEG, ECG machines.9. Banking & Retail: Automatic teller machines (ATM), Currency counters10.Card Readers: Barcode, smart card readers.11.Measurements & Instrumentation : Logic Analyzers, Spectrum analyzers,

PLC systems,

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 6: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 6

Electronic data acquisition and supervisory control system, industrial process controller, digital meters

12.Missiles and Satellites : Defense, Aerospace, Communication, tracking system

13.Robotics : stepper motor controllers for a robotic system14.Motor control systems : accurate control of speed and position of dc motor15.Entertainment systems : video games, music system16.Signal & Image processing : speech processing, pattern recognizer, video

processing

1.3. HOST AND TARGET CONCEPT :For many years, the primary mode of development for real-time embedded software has been the "host/target" approach. In this approach, the software development is done on host system and it is to be executed on target system.

Host: It is a computer system on which all the programming tools run, where the

embedded software is developed, i.e., writing and editing a program, compiling, linking and debugging are done on Host system.

Compiler, assembler, linker, locator, debugger are used Unit testing on host system ensures software is working properly It is also referred as work station It is programming centric The host system consists of

High performance processor with cache, Large RAM and large memory on disk ROMBIOS (read only memory basic input-output system) Keyboard and Display monitor Network connection Program development kit for a high level language program (or)

IDE

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 7: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 7

Host processor compiler and cross compiler Cross assembler

Target: After completion of programming work in host system, it is moved from host

system to target system, i.e., the developed software is loaded in customer target system

It is customer centric. The target system consists of

Microcontroller/ processors Communication interfaces Small amount of memory elements RAM,ROM and Other integrated on chip peripherals such as timers, ADC, RTC etc…

1.4. FEATURES & ARCHITECTURE CONSIDERATIONS FOR E.S. An embedded system is an electronic/electro-mechanical system designed to

perform a specific function and is combination of both hardware and firmware (software). The program instructions written for embedded systems are referred to as firmware, and are stored in Read-Only-Memory or Flash memory.

Every ES is unique, and the hardware as well as software is highly specialized to the application domain. Embedded systems are designed to do some specific task, rather than be a general purpose computer for multiple tasks.

Characteristics of embedded systems:(i) Application and Domain Specific(ii) Reliable(iii) Reactive(iv) Real-time Performance(v) Low power consumption(vi) Operates in harsh environment

Embedded systems are basically designed to regulate a physical variable (or) to manipulate the state of some devices by sending some signals to the actuators or devices connected to the output ports of the system, in response to the input signals provided by the end users or sensors which are connected to the input ports. Hence the embedded systems can be viewed as a reactive system.

Sensors à are used to sense/detect the changes in the input variables and convert into electrical signals for any measurements.The sensors are connected to the input port.

Actuators à are used to converts electrical signals into corresponding physical action.

The actuators are connected at the output port

Architecture considerations / Basic elements of an embedded system:

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 8: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 8

System core :

Embedded systems are domain and application specific and are built around a central core. The core of the embedded system falls into any of the following categories:

(i) Microprocessors(ii) Microcontrollers(iii)Digital Signal Processors(iv) Application Specific Integrated Circuits (ASIC)(v) Complex Programmable Logic Devices (CPLD’s)(vi) Field Programmable Gate Arrays (FPGA)

The System core /Central processing unit includes Arithmetic logic unit (ALU), which performs computation. Registers needed for the basic operation of the CPU, such as the program

counter (PC), stack pointer (SP), and status register (SR). Further

registers to hold temporary results

Instruction decoder and other logic to control the CPU operations, to handle resets, interrupts, and so on.

Memory :

The memory of the system is responsible

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 9: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 9

for holding the control algorithm and other important configuration details. Memory for implementing the code may be present on the processor or may be implemented as a separate chip interfacing the processor. In a controller based embedded system, the controller may contain internal memory for storing code.

Memory for the program: Non-volatile (Read-only memory, ROM), meaning that it retains its

contents when power is removed.

Memory for data: Known as random-access memory (RAM) and usually volatile.

Non-volatile memory for data : This is used to store data whose value must be retained when

power is removed. It is used to store constant data like serial number for identification, network addresses etc

Address and data buses: To link these subsystems to transfer data and code.

Clock: To keep the whole system synchronized. It may be generated internally or obtained from

a crystal or external source; modern MCUs offer considerable choice of clocks.

Input and output ports: To provide digital communication with the outside world.

Examples of I/O devices :Common user interface input devices à Keyboards, push button,

switches, etc.Common user interface output devices à LEDs, LCD, Buzzers…etc

Common peripherals:

Timers: Most microcontrollers have at least one timer because of the wide range of functions that they provide. They provide a regular “tick” that can be used to schedule tasks in a program. Timers are essential to almost any embedded application

Generate fixed-period events Periodic wakeup Count edges Generate delays Measures time intervals Replacing delay loops with timer calls allows CPU to sleep, consuming

less power

Watchdog timer :

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 10: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 10

It is an electronic timer, used to detect and recover from computer malfunctions. The Watchdog Timer (WDT) restarts the system on occurrence of a software problem (or) if a selected time interval expires. This is a safety feature, which resets the processor if the program becomes stuck in an infinite loop.

Real Time Clock : These are needed in applications that must track the time of day.RTC module provides seconds, minutes, hours, day of week, day of month, month, and year in real-time clock with calendar function.

Serial Communication Interfaces: A wide choice of interfaces is available to exchange information with another IC or system. They include UART, serial peripheral interface (SPI), inter-integrated circuit (I²C or IIC), universal serial bus (USB), controller area network (CAN), Ethernet, and many others.

Interrupt Controller : It manages the interrupts which are generated by external devices connected to the microcontroller (or) Interrupts requested by most peripheral modules in the core of the MCU, such as Timer, ADC, Serial UART.. etc.

Analog-to-Digital Converter: This is very common because so many quantities in the real world vary continuously.

Digital-to-Analog Converter: This is much less common, because most analog outputs can be simulated using PWM. An important exception used to be sound, but even here, the use of PWM is growing in what are called Class-D amplifiers.

1.5. EMBEDDED PROCESSOR AND THEIR TYPESAlmost 80% of the embedded systems are processor/ controller based. The

processor may be microprocessor (or) a microcontroller (or) digital signal processor, depending on the domain and application. Most of the ES in industrial control and monitoring applications make use of the commonly available microprocessors and microcontrollers whereas domains which require signal processing such as speech coding, speech recognition..etc make use of special kind of digital signal processors supplied by manufacturers like Analog Devices, Texas Instruments,..etc

Embedded systems are domain and application specific and are built around a central core. The core of the embedded system falls into any of the following categories:

1. Microprocessors2. Microcontrollers3. Digital Signal Processors

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 11: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 11

4. Application Specific Integrated Circuits (ASIC)5. Complex Programmable Logic Devices(CPLD’s)6. Field Programmable Gate Arrays (FPGA)

Microprocessors

A microprocessor is a silicon chip representing a central processing unit (CPU), which is capable of performing arithmetic and logic operations according to a pre-defined set of instructions.

In general, the CPU contains ALU, Control Unit and working registers. A microprocessor is a dependent unit and it requires the combination of other

hardware like memory, timers, interrupt controller and I/O ports, etc. for proper functioning.

Microprocessors are used in general purpose applications.

Microcontrollers

A microcontroller is an integrated chip that contains CPU, data and program memory ( RAM and ROM), special and general purpose registers, Timers, Interrupt control unit and dedicated I/O ports.

Since a microcontroller contains all the necessary functional blocks for independent working, they found greater place in embedded domain.

Microcontrollers are application oriented and used in domain-specific applications.

Digital Signal Processors

DSPs are powerful special purpose 8/16/32 bit processors, designed specifically to meet the computational demands and power constraints of today’s embedded audio, video, signal processing and communication applications.

DSPs implement algorithms in hardware which speeds up the execution whereas general purpose processor implement the algorithm in software and the speed of execution depends primarily on the clock for the processors.

DSP performs large amount of real-time calculations like FFT(Fast Fourier Transform), DFT(Discrete Fourier Transform), Convolution, SOP(Sum of Products) calculation etc.

Audio video signal processing, telecommunication and multimedia applications are typical examples where DSPs are employed.

Application Specific Integrated Circuit (ASIC)

ASIC is a microchip designed to perform a specific or unique application. It integrates several functions into a single chip there by reduces the system

development cost. As a single chip, ASIC consumes a very small area in the total system and

thereby helps in the design of smaller systems with high capabilities.

CPLD and FPGA

The PLDs consists of a large no. of programmable gates on a VLSI chip

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 12: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 12

With programmable logic devices like CPLDs and FPGAs, the designs can be quickly simulated, tested and programmed into devices and immediately tested in live circuits.

During the design phase, the circuit can be changed by programming the device to get the desired outputs, because these devices are based on re-writable memory technology.

These devices are used in Network routers, DSL modem, an automotive navigation system

1.6. MEMORY TYPES: A Memory module is a physical device which is used to store programs and data on

a temporary (or) permanent basis for use in digital electronics. An efficient memory increases the performance of embedded systems. The different types of memory modules used in Embedded systems are

(1) Program Memory /Read Only Memory (ROM): PROM, EPROM, EEPROM, Flash Memory

(2) Data memory /Random Access Memory (RAM) : SRAM, DRAM, NVRAM

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 13: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 13

(A) Program Memory / Read Only Memory (ROM)

The Program memory /ROM are used to store the firmware in embedded systems.

ROM can only be used to read from, but cannot be written upon. These memory devices are NON-VOLATILE, which retains its contents even if

power is switched off. The ROM can store instructions which are required to start computer when

power is given to the computer. This operation is referred to as bootstrap. The ROM memory is not only used in   the computers but also in other

electronic devices like controllers, micro ovens, washing machines etc.

Types of ROM :(i) Masked ROM (MROM) :

Masked ROM makes use of the hardwired technology for storing data. It is factory programmed by masking and metallization process at the

time of production itself, according to the data provided by the end user. The advantage of this is low cost for high volume production. It is good for

storing the embedded firmware for low cost embedded devices. The limitation with MROM is the inability to modify the device firmware

against firmware updates.

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 14: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 14

(ii) Programmable Read Only Memory (PROM): Unlike Masked ROM, Programmable ROM is not pre-programmed by the

manufacturer. The end-user is the responsible for programming these devices.

The Programmable ROM can be modified only once by the user and hence it is called as One Time Programmable (OTP) memory.

The PROM is manufactured with series of fuses. The chip is programmed by the programmer wherein some fuses are burnt.  The open fuses are read as logic “1”, while the burned fuses are read as logic “0”.

The limitation of PROM à Not useful for development purpose, as the code is subject to continuous change during the development phase.

(iii) Erasable Programmable Read Only Memory (EPROM) : The Erasable Programmable ROM is one of the special types of memory

modules that can be programmed any number of times to correct the errors. It can retain its contents until exposed to ultraviolet light.

The ultraviolet light erases its contents and making it possible to re-program the memory. To write and erase the EPROM memory chip, we need a special device called EPROM programmer.

Even though the EPROM chip is flexible in terms of re-programmability, it needs to be taken out of the circuit board and put in a UV eraser device for 20 to 30 min. So it is a tedious and time consuming process.

(iv) Electrical Erasable Programmable ROM (EEPROM) : As the name indicates, the information contained in EEPROM can be altered

by using electrical signals at the register/byte level. The EEPROM data is stored and removed one byte of data at a time. These are in-circuit programmable, i.e., EEPROM does not need to be

removed from the computer to be modified and does not require the additional equipment.

It provides greater flexibility for system design. The only limitation is their capacity is limited when compared to standard ROM.

These memory devices are used in computers and other electronic devices to store small amount of data that must be saved when the power supply is removed.

(v) Flash memory : FLASH memory is the latest and most popular ROM technology used in

today’s embedded designs. Flash memory is a variation of EEPROM technology. It combines the re-

programmability of EEPROM and the high capacity of standard ROMs. Flash memory is organized as sectors/blocks/pages. The erasing of memory can be done at sector level (or) page level without

affecting the other sectors (or) pages. The flash memory keeps its data even with no power at all. 

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 15: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 15

(B) Data Memory / Random Access Memory (RAM) RAM is the data memory or working memory of the controller / processor. RAM is a Read-Write memory i.e., the processor can read from it and write to

it. These memory devices are VOLATILE, which hold their content till power is

applied to them. When power is switched off, these memories lose their content.

The RAM allows information to be stored and accessed quickly from any desired random location with memory module. This is in contrast to the Sequential Access Memory (SAM), where the desired memory location is accessed by either traversing through the entire memory (or) through a ‘seek’ method to reach the desired location (Magnetic tapes, CD ROMs are examples of SAM)

Types of RAM

(i) Static Random Access Memory (SRAM)

The Static Random Access Memory module is a type of RAM that retains the data bits in its memory as long as power is being supplied.

Static RAM stores data in the form of Voltage and they are made up of flip-flops. In typical implementation, SRAM cell (bit) is realized using 6- MOSFETs. Four of

the transistors are used for building the latch (flip-flop) part of the memory cell and two transistors are used for controlling the access to the storage cell during read and write operations.

(ii) Dynamic Access Random Memory (DRAM) :

The Dynamic Random Access Memory is a type of RAM module that stores each bit of data within a separate capacitor.  This is an efficient way to store the data in memory because it requires less physical space to store the data.

Dynamic RAM stores data in the form of charge. They are made up of a MOSFET and a capacitor. Each DRAM cell is referred to

as a bit. When the DRAM cell holds a value at active state ‘1’, the charge is at high state. When the DRAM cell holds a value at inactive state ‘0’, the charge is below a certain level.

The capacitors in DRAM need to be constantly recharged to keep their charge. This is the reason why DRAM requires more power.

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 16: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 16

S.No. SRAM DRAM

1 SRAM cell (bit) is realized using 6- MOSFETs

DAM cell is realized using a MOSFET and a Capacitor

2 SRAM stores data in the form of Voltage

DRAM stores data in the form of charge

3 The SRAM does not need to be refreshed periodically.

The DRAM need to be refreshed periodically to maintain the charge in the capacitor

4 Consumes less power Consumes more power

5 The SRAM provides faster access to the data

Slow in operations due to refresh requirements

6The construction of SRAM is complex due to the usage of a large number of transistors

DRAM is simple to design and implement

7 Low storage capacity ( Less dense) High storage capacity

8 It is more expensive than DRAM. It is a low cost device

(iii) Non-Volatile RAM :

Non-volatile RAM is a random access memory with battery backup. It contains static RAM based memory and a minute battery for providing

supply to the memory in the absence of external power supply. The memory and battery are packed together in a simple package. NVRAM is used for non-volatile storage of results/operations/ flags etc. The life time of NVRAM is expected to be around 10 years. DS1744 from Maxim/Dallas is an example for 32KB NVRAM

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 17: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 17

1.7. Overview of design process of Embedded Systems

The main steps involved in the design process of embedded systems are as follows:

1. Determine the requirements

Functional and non-functional Multi-function or Multi mode system. Size, cost, Weight etc.

Selecting the H/W components Application specific H/W External interfaces. Input devices and Output devices.

2. Design the system architectureSystem architecture depends on,

Whether the system is real time Whether OS needs to be embedded Size, Cost, Power consumption etc.

3. Select the OSIf OS needed we can select,

Real time OS (such as RTLinux,Vx Works, VRTX, pSOS, QNX etc.). Non-real time OS (such as Windows CE, embedded Windows XP

etc).

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 18: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 18

4. Choose the processor and peripheralsWe can select any one of the following,

Microprocessor 8085, 8086, Pentium Microcontroller MCS-51, PIC, AVR, MSP430, TM4C Digital Signal Processor dsPIC, Blackfin,Sharc,TigerSharc

5. Choose the development platform The hardware platform The operating system The programming language The software development tools.

6. Code the application and optimizeChoice of programming language

Assembly program language (ALP) C- language Object Oriented Language (C++, Java etc.).

7. Verify the software on the host system Compile and assemble the source code into object file. Use a simulator to simulate the working of the system.

8. Verify the software on the target system Download the program using a programmer device. Use an EMULATOR or on chip debugging tools to verify the

software.

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 19: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 19

1.8. Programming languages and tools for embedded designEmbedded Code is typically written in Assembly language, C or C++, but various high-level programming languages, such as Python and JavaScript, are now also in common use to target microcontrollers and embedded systems. Ada is used in some military and aviation projects.

Assembly language: In the early days of embedded systems, programming is performed using

assembly language. This remains an option, but now assembly is used only when it is absolutely essential.

The assembly language uses 2 or 3 letter ‘mnemonics’ to represent each low-level machine instruction (or) Op-code.

Assembly code is converted into executable machine code by a program referred to as an assembler.

To write an assembly language, the programmer must know the instruction set, architectural features and register set of the processor.

C - programming language: Many microprocessors and microcontrollers can be programmed in C, and a

number of C cross-compilers exist for that purpose. C is perhaps the most frequently used language for new embedded system

development. High level language statements are converted into executable machine

codes by a program referred to as Compiler

Ada : It was originally developed by the department of defense for real-time

operating systems and embedded systems. Ada was designed with multiprocessor support and strong compile-time

checks to ensure the quality and integrity of developed system.

Python : Python compilers are available for some popular microcontrollers. Pyastra compiles for all Microchip PIC12, PIC14 and PIC16 microcontrollers. PyMite compiles for "any device in the AVR family that has at least 64 KB

program memory and 4 KB RAM". PyMite also targets (some) ARM microcontrollers.

Notice that these embedded Python compilers typically can only compile a subset of the Python language for these devices

Others : Some extremely well-known languages, such as C++ and Java, are rarely used

in embedded systems with advanced microcontrollers, because C++ and Java compilers are simply unavailable for popular microcontrollers.

.

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 20: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 20

Types of Embedded Programming tools :

A programming tool (or) software development tool is a program that software developers use to create, debug, maintain and support other programs and applications.

Programming tools : Editor Compiler Assembler Linker Debugger Locator Loader

Editor : It is used for writing assembly mnemonics (or) high level programs like C/C+

+ It allows entry, addition, deletion, insert, modification of programs. Creates a source file that stores the edited file.

Compiler : Compiler is a software program that converts a source code from high level

language (human readable language) into low level language (e.g., assembly language, object code, or machine code) to create an executable program.

Source Code à Object file

This object file is a file that contains a set of machine-language instructions (Op-codes) and data resulting from language translation process.

Machine-language instructions are specific to a particular processor. The compiler that runs on a computer platform and produces code for that

same computer platform is called as native compiler (or) Host compiler. A Compiler that runs on one computer platform and produces code for

another computer platform is called as Cross-compiler.

Assembler : An assembler is a software program that converts the source code of assembly

language into machine language. It performs one-to-one translation from assembly language (Mnemonics) to equivalent machine-language (Op-codes)

The input of the assembler must be assembly language. An assembler that runs on host but produces binary codes appropriate for some

other target is called Cross-assembler.

VISVODAYA TECHNICAL ACADEMY :: KAVALI

Page 21: maheshelectronics.files.wordpress.com  · Web viewAlmost 80% of the embedded systems are processor/ controller based. The processor may be microprocessor (or) a microcontroller (or)

IV B.Tech. I Sem (R15) ECE : Embedded Systems : UNIT -1 21

Linker :

A linker is a program that takes one (or) more object files generated by compilers and combines them into a single executable file.

Source code may be contained in more than one file. Hence, it must be combined. The linker creates a re-locatable version of the program.

Debugger :

A debugger (or) debugging tool is a computer program that is used to test and debug other programs (the "target" program).

Locator :

A Locator is a tool that performs the conversion from re-locatable program to executable binary image.

The locator assigns physical memory addresses to code and data sections within the re-locatable program.

The locator produces a binary memory image that can be loaded into the target ROM.

In contrast, on general purpose computers, the operating system assigns the addresses at load time.

Loader : In computer systems a loader is the part of an operating system that is

responsible for loading programs and libraries. It is one of the essential stages in the process of starting a program, as it places

programs into memory and prepares them for execution. Once loading is complete, the operating system starts the program by passing

control to the loaded program code.

VISVODAYA TECHNICAL ACADEMY :: KAVALI