<<

Embedded Systems Introduction

Prof. Prabhat Ranjan

(Material based on Wikipedia.org) Definition

● An is a special-purpose system in which the is completely encapsulated by the device it controls. ● Unlike a general-purpose computer, such as a , an embedded system performs one or a few pre-defined tasks, usually with very specific requirements. ● Since the system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product. Examples of embedded systems

● automatic teller machines (ATMs) ● avionics, such as inertial guidance systems, flight control hardware/ and other integrated systems in aircraft and missiles ● cellular telephones and telephone ● engine controllers and antilock brake controllers for automobiles ● home automation products, such as thermostats, air conditioners, sprinklers, and security monitoring systems Examples of embedded systems-2

● handheld ● household appliances, including microwave ovens, washing machines, television sets, DVD players/recorders ● medical equipment ● handheld ● videogame consoles ● even computer themselves such as routers and printers have embedded processors History

● In the 1960s, computers possessed an ability to acquire, analyze, , and make decisions at very high speeds. ● However there were some disadvantages with the computer controls. – high cost, – program complexity, and – hesitancy of personnel to learn History-2

● However the new concept of electronic devices evolved - Programmable controllers ● Later became a part of embedded systems ● Concept developed from a mix of computer technology, solid state devices, and traditional electromechanical sequences ● The first recognizably modern embedded system was the Guidance Computer, developed by at the MIT ● Each flight to the moon had two ● They ran the inertial guidance systems of both the command module and LEM ● At the project's inception, the was considered the riskiest item ● Use of the then new monolithic integrated circuits, to reduce the size and weight, increased this risk. Apollo Guidance Computer

● First mass-produced embedded system - Autonetics D-17 guidance computer for the Minuteman missile ( in 1961) ● Built from discrete transistor logic and had a hard disk for main memory ● Minuteman II - production in 1966, the D-17 was replaced with a new computer that was the first high-volume use of ICs ● Reduced prices on quad nand gate ICs from $1000/each to $3/each, permitting their use in commercial products. ● Since these early applications in the 1960s, where cost was no object, embedded systems have come down in price. ● There has also been an enormous rise in processing and functionality. ● For example the first was the 4004, which found its way into calculators and other small systems, but required external memory and support chips ● By the mid-1980s, most of the previously external system components had been integrated into the same as the , resulting in integrated circuits called , and widespread use of embedded systems became feasible. ● Cost of a fell below $1- feasible to replace expensive knob-based analog components such as potentiometers and variable capacitors with digital controlled by a small microcontroller with up/down buttons or knobs ● By the end of the 80s, embedded systems were the norm rather than the exception for almost all electronics devices, a trend which has continued since Characteristics

● Embedded systems are designed to do some specific , rather than be a general-purpose computer for multiple tasks ● Some also have real-time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs Characteristics

● Their functionality examines the interface input status, and in response to it, it controls the output interface. ● In order to carry out the control plan, several logic combinations are needed. ● They are called as program and are stored in the memory of the device. ● The period of time during the program execution is called a scan. During the scan all inputs are tested, the control plan is evaluated and the outputs are updated. ● The input and output devices such as switches, motors and lights, which are attached to the interface, are called field devices ● Programmable controllers do not always come in separate blocks. ● Very often they are built-in to devices which can be classified as field devices ● They can be integrated into the field devices "housing", and can even be a part of a circuit board of the field device ● That is why such systems are called embedded devices ● For high volume systems such as portable music players or mobile phones, minimizing cost is usually the primary design consideration ● Engineers typically select hardware that is just “good enough” to implement the necessary functions ● For example, a digital set-top box for satellite television has to process large amounts of data every second, but most of the processing is done by custom integrated circuits ● The embedded CPU "sets up" this process, and displays menu graphics, etc. for the set-top's look and feel ● For low-volume or prototype embedded systems, personal can be used, by limiting the programs or by replacing the with a real-time operating system ● The software written for embedded systems is often called , and is stored in ROM or chips rather than a disk drive. ● It often runs with limited hardware resources: small or no keyboard, screen, and little RAM memory ● Embedded systems reside in machines that are expected to run continuously for years without errors, and in some cases recover by themselves if an error occurs. ● Therefore the software is usually developed and tested more carefully than that for personal computers, and unreliable mechanical moving parts such as disk drives, switches or buttons are avoided ● Recovery from errors may be achieved with techniques such as a watchdog that resets the computer unless the software periodically notifies the watchdog User Interfaces

● The physical nature of the depends on the type of programmable controller or an embedded system ● It can be,in form of some terminal contacts on device's body,on circuit board , or just some intermediate point on a circuit board ● In reality, more sophisticated devices such as computer ports, dedicated ports, are in use ● Very often user interface comes on basis of some standard like RS232, USB, , GPIB, etc. Simple Interfaces

● Embedded systems range from no user interface at all - dedicated only to one task - to full user interfaces similar to desktop operating systems in devices such as PDAs ● In between are devices with small character- or digit-only displays and a few buttons Simple Interfaces

● One approach widely used in embedded systems without sophisticated displays, uses a few buttons to control a menu system, with some for movement and some for adjustments ● On such devices simple, obvious, and low-cost approaches like red-yellow-green lights (mirroring traffic lights) are common In more complex systems

● On larger screens, a touch-screen or screen-edge soft buttons also provides good flexibility while minimising space used ● The advantage of this system is that the meaning of the buttons can change with the screen, and selection can be very close to the natural behavior of pointing at what's desired ● Handheld systems often have a screen with a " button" for a pointing device In more complex systems

● The rise of the has given embedded designers another quite different option, by providing a web page interface over a network connection ● This is successful for remote, permanently installed equipment ● This avoids the cost of a sophisticated display, yet provides complex input and display capabilities when needed, on another computer CPU Platform

● There are many different CPU architectures used in embedded designs such as ARM, MIPS, Coldfire/68k, PowerPC, , PIC, 8051, AVR, Renesas H8, SH, , FR-V, etc. ● This in contrast to the desktop computer market, which is currently limited to just a few competing architectures CPU Platform

● PC/104 is a typical base for small, low-volume embedded and ruggedized system design. These often use DOS, Linux, NetBSD, or an embedded real-time operating system such as QNX or Inferno. ● A common configuration for very-high-volume embedded systems is the (SoC), an application-specific (ASIC), for which the CPU was purchased as intellectual property to add to the IC's design. CPU Platform

● A related scheme is to use a field-programmable (FPGA), and program it with all the logic, including the CPU Tools

● As for other software, embedded system designers use , assemblers, and debuggers to develop embedded system software ● However, they may also use some more specific tools: – An in-circuit (ICE) is a hardware device that replaces or plugs into the microprocessor, and provides facilities to quickly load and debug experimental code in the system Tools

– Utilities to add a checksum or CRC to a program, so the embedded system can check if the program is valid – For systems using processing, developers may use a math workbench such as MathCad or Mathematica to simulate the mathematics – Custom compilers and linkers may be used to improve optimisation for the particular hardware – An embedded system may have its own special language or design tool, or add enhancements to an existing language Tools

● Software tools can come from several sources: – Software companies that specialize in the embedded market – Ported from the GNU tools (GNU cross ) – Sometimes, development tools for a personal computer can be used if the embedded processor is a close relative to a common PC processor

● Embedded Debugging may be performed at different levels, depending on the facilities available, ranging from assembly- or source-level debugging with an in-circuit emulator, to output from serial debug ports, to an emulated environment running on a personal computer Debugging

● As the complexity of embedded systems grows, higher level tools and operating systems are migrating into machinery where it makes sense ● For example, cellphones, personal digital assistants and other consumer computers often need significant software that is purchased or provided by a person other than the manufacturer of the electronics Debugging

● In these systems, an open programming environment such as Linux, NetBSD, OSGi or Embedded Java is required so that the third-party software provider can sell to a large market ● Most such open environments have a reference design that runs on a PC ● Much of the software for such systems can be developed on a conventional PC Debugging

● However, the porting of the open environment to the specialized electronics, and the development of the device drivers for the electronics are usually still the responsibility of a classic engineer. Examples from our projects Collar Design : wildCENSE Sequence of operation

ZzZzZzZz

ZzZz! TigerCense – IR Image Networks IR flash with Camera Light sensor superCap

Radio Module Micro-Controller PIR sensor

Real Time microSD card Power Supply Clock

Energy Harvesting and Battery Recharging Module

Communication Power Sensing Processing

Relationship with other courses

● ESP => Introduction to Sensor Networks (Device Design) => Sensor Network (Systems Approach) ● ESP covers 8/16/32 bit micro-controller/processor ● 8/16 bit uC needs no OS or special OS ● 32 bit uC/uP can use general purpose OS such as Linux ● DSA course focuses on FPGA using HDL(useful in many embedded system) ● DSP focuses on use of specialized processors (useful in many embedded systems as well) Grading

● Projects ● Presentation ● Exams/Assignments ● Class attendance/ Participation ● Lab work