0% found this document useful (0 votes)
1K views159 pages

Intro To Embedded Systems by Shibu KV

Uploaded by

Harsh Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
1K views159 pages

Intro To Embedded Systems by Shibu KV

Uploaded by

Harsh Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 159
Introduction to EMBEDDED SYSTEMS SHIBU KV a enue 2 5 4. jective Questions _67 Review Questions 69 Lab Assignments 71 Characteristics and Quality Attributes of Embedded Systems 3.1 Characteristics of an Embedded System 72 32 ity Atributes of Embedded S 74 Summary 79 Keywords 79 Objective Questions 80 Review tions 8} Embedded Systems—Application- and Domain-Specific 4.1 Washing Machine—Application-Specific Embedded System 83 4.2 Automotive ~ Domain-Specific Examples of Embedded System _ 85 Summary 89 Kevwords 90 Objective Questions _90 Review Questions 91 Embedded Systems with 8bit Microcontrollers—805/ 5.1 Factors to be Considered in Selecting a Controller 93 5.2 Why 8051 Microcontroller 94 5.3 Designing with 2051 94 5.4 The 8052 Microcontroller 155 SS 8051/52 Variants 155 Summary 156 Keywords _157 Objective Questions 158 Review Questions 761 Lab Assignments 162 Programming the 805/ Microcontroller G1 Different Addressing Modes Supported by 8057165, 62 The AQS/ Instmction Set 171 Summary _ 196 Keywords 197 Objective Questions 197 Review Questions 202 Lab Assignments 203 Hardware Software Co-Design and Program Modelling 7.1__ Fundamental Issues in Hardware Software Co-Design 205 7.2 Computational Models in Em| ign 207 7.3 Introduction to Unified Modelling Language (UML) _2/4 ‘4 Hardware Software Trade-ofls 219 ‘Summary 220 2 164 10. Contents Keywords 221 Objective Questions 222 Review Questions 225 Lab Assignments 224 Part2 Design and Development of Embedded Product Embedded Hardware Design and ment 8.1 Analog Electronic Components 229 82 Digital Electronic Components 230 83 VLSI and Integrated Circuit Design 243 8.4 __ Electronic Design Automation (EDA) Tools 248 §.5___How to use the OrCAD EDA Tool? _249 8.6 Schematic Design using Orcad Capture CIS_249 87 The PCB Layout Design 267 8.8 Printed Circuit Board (PCB) Fabrication 268 Summary 294 Keywords 294 Objective Questions 296 Review Questions 298 Lab Assignments 299 Embedded Firmware Design and Development 9.1 Embedded Firmware Design Approaches 303 9.2. Embedded Firmware Development Languages 306 93 Programming inEmbeddedC 318 Summary 371 Keywords 372 Objective Questions 373 Review Questions 378 Lab Assignments 380 Real-Time Operating System (RTOS) based Embedded 5} 10.1 Operating System Basics 382 10.2 ‘Types of Operating Systems 386 10.3 Tasks, ProcessandThreads 390 1G. :sMaligreming ed Mukiceking: an i ing 10.6 ‘Threads, Processes and Scheduling: Putting them Altogether 422 10.7 Task Communication 426 10.8 Task Synchronisation 442 10.9 Device Drivers 476 10.10 How to Choose anRTOS 478 Summary 480 Keywords _481 Objective Questions 483 302 381 Review Questions 492 Lab Assignments 496 ! 11. _An Introduction to Embedded System Design with YaWorks and MicroC/OS-I RTOS LLL_VxWorks 409 112 MicmC/OS-Il__S/4 ‘Summary 341 Keywords “$42 Objective Questions $43 Review Questions 544 Lab Assignments 545 12. Integration and Testing of Embedded Hardware and Firmware 12.1 Integration of Hardware and Firmware 549 122 Board Power Up _553 Review Questions 555 13,_ The Embedded System Development Environment 1B ‘The Integrated Development Environment (IDE) 557 13.2 Types of Files Generated on Cross-compilation 588 133 Disassembler/Decompiler 597 = 134 Simulators, Emulators and Debugging 598 13.5 Target Hardware Debugging 606 136 Boundary Scan 608 Summary 610 Olt Objective Questions 612 Review Questions 612 Lab Assignments 613 14._Product Enclosure Design and Development 14.1 Product Enclosure Design Tools _ 616 142 Product Enclosure Development Techniques _ 616 143° Summary 6/8 ‘Summary 618 Keywords 619 Objective Questions 620 Review Questions 620 15. The Embedded Product Development Life Cycle (EDLC) 15.1 What is EDLC? 622 Why EDLC 622 Objectives of EDLC 622 Different Phases of EDLC 625 498 615 21 co a 15.5 EDLC Approaches (Modeling the EDLC) 636 Summary 641 Keywords 642 Objective Questions 643 Review Questions 644 16.__Trends in the Embedded Industry AS 16.1 Processor Trends in Embedied System _ 645 162 Embediled OS Trends 68 16.3__Development Language Trends 648 164 Open Standards, Frameworks and Alliances 651 16.5__Rottlenecks 652 Appendix I: Overview of PIC and AVR Family of Microcontrollers and ARM Processors 653 Introduction to PIC® Family of Microcontrollers 653 Introduction to AVR® Family of Microcontrollers _657 Introduction to ARM® Family of Processors 664 Appendix II: Design Case Studies 669 1. Digital Clock 669 ‘2. Battery-Operated Smartcard Reader 699 3. Automated Meter Reading System (AMR) 70/ 4. Digital Camera 703 Bibliography. 706 Index. g acct ‘There exists a common misconception amongst students and young practising engineers that embed- ded system design is ‘writing ‘C’ code’. This belief is absolutely wrong and I strongly emphasise that ‘embedded system design refers to the design of embedded hardware, embedded firmware in ‘C° or other supporting languages, integrating the hardware and firmware, and testing the functionalities of both. Embedded system design is a highly specialised branch of Electronics Engineering where the techno- logical advances of electronics and the design expertise of mechanical engineering work hand-in-hand to deliver cutting edge technologies and high-end products to a variety of diverse domains including consumer electronics, telecommunications, automobile, retail and banking applications, Embedded sys- tems represent an integration of computer hardware, software along with programming concepts for developing special-purpose computer systems, designed to perform one or a few dedicated functions. ‘The embedded domain offers tremendous job opportunities worldwide. Design of embedded system is an art, and it demands talented people to take up the design challenges keeping the time frames in mind. The biggest challenge faced by the embedded industry today is the lack of skilled manpower in the domain. Though most of our fresh electronics and computer science engineering graduates are hhighly talented. they lack proper training and knowledge in the embedded domain. Lack of suitable ‘books on the subject is one of the major reasons for this crisis, Although various books on embedded technology are available, almost none of them are capable of delivering the basic lessons in a simple and structured way. They are written from a high-end perspective, which are appropriate only for the practising engineers. This book “Introduction to Embedded Systems" isthe first-of-its-kind, which will appeal as a com- prehensive introduction to students, and as a guide to practising engineers and project managers. It has been specially designed for undergraduate courses in Computer Science & Engineering, Information Technology, Electrical Engineering, Electronics & Communication Engineering and Instrumentation & Control Engineering. Also, it will be a valuable reference for the students of BSc / MSc / MTech (CSMT/Electronics), MCA and DOEACC ‘B' level courses. ‘The book has been organised in such a way to provide the fundamentals of embedded systems; the steps involved in the design and development of embedded hardware and firmware, and their inte- ‘gration; and the life cycle management of embedded system development, Chapters 1 to 4 have been ih i structured to give the readers a basic idea of an embedded system. Chapters 5 to 13 have been organised to givean in-depth knowledge on designing the embedded hardware and firmware. They would be very Felpful to practising embedded system engineers. Chapter 15 dealing with the design life cycle of an Eibedded system would be beneficial to both practising engineers as well as project managers. Each ‘chapter begins with learning objectives, presenting the concepts in simple language supplemented with ‘tmmple tables, figures and solved exaruples. An important part of this book comes at the end of each where you will find a brief summary, list of keywords, objective questions (in multiple-choice format) and review questions. To aid students commence experimentation in the laboratory, ab assign- ‘ments have been provided in relevant chapiers. An extremely beneficial segment at the end of the book is the overview of PIC & AVR Family of Microcontrollers & ARM Processors as well as innovative design case studies presenting real-world situations. ‘The major highlights of this book are as follows. Brings an entirely different approach in the learning of embedded system. Tt looks at embedded systems as a whole, specifics what it is, what it comprises of, what is to be done with it and how to go about the whole process of designing an embedded system. * Follows a design- and development-oriented approach through detailed explanations for Keil Mi- cro Vision (i.e, embedded system/integrated development environment), ORCAD (PCB design software tool) and PCB Fabrication techniques. ‘© Practical implementation such as washing machines, automotives, and stepper motor and other WO device interfacing circuits. ‘© Programming concepts: deals in embedded C, delving into basics to unravelling advance level conc + Compete covenge ofthe 0057 microconrllerechiecnie and ssembly langage progr ni Detaled coverage of RTOS intemal, mukitasking, task management, task scheduling, tsk com- ‘munication and synchronisation. Ample examples on the various task scheduling policies. © Comprehensive coverage on the intemals of MicroC/OS-II and VxWorks RTOS kernels. ‘© Written in lucid, easy-to-understand language with strong emphasis on examples, tables and fig- ‘© Useful reference for practicing engineers not well conversant with embedded systems and their applications. * Rich Pedagogy includes objective questions, lab assignments, solved examples and review questions. The comprehensive online leaming centre—http://www.mbhe.com/shibu/esle— accompanying this book offers valuable resources for students, instructors and professionals. For Instructors ‘© PowerPoint slides (chapter-wise) © Abrief chapter on Embedded Programming Language C+/ Java ‘© Case studies that are given in the book and one new case study on heart beat monitoring, system * Solution manual (chapter-wise) # Short questions, quizzes in the category of fill in the blanks, true/false and multiple choice ques- tions (25); programming qucstions with solution (5). (Level of difficulty: hard) © Chapter-wise links to important websites and important text materials rte Sh For Students ‘© Chapter-wise tutorials ‘© Abbrief chapter on Embedded Programming Language C++/ Java Case studies that are given in the book and one new case study on heart beat monitoring system # Answers for objective questions/selected review questions and hints for lab assignments provided in the book. ‘Short questions, self-test quizzes in the category of fill in the blanks, true/false and multiple choice ‘questions (25); programming questions with solutions (5). (Level of difficulty: easy/medium) «List of projectideas © Chapier-wise links to important websites and important text materials. This book is written purely on the basis of my working knowledge in the field of embedded hardware and firmware design, and expertise in dealing with the life cycle management of embedded systems. ‘A few descriptions and images used in this book are taken from websites with prior written copyright permissions from the owner of the site/athor of the articles. The design references and data sheets of devices including the parametric reference used in the il- lustrative part of this book are taken from the following websites. Readers are requested to visit these sites for geting updates and more information on design articles. Ako, you ean order some free samples from some of the sites for your design. wwucintel.com Intel Corporation yewow.maxim-ic.com ‘Maxim/Dallas Semiconductor weww.atmel.com Atmel Corporation swww.analog.com Analog Devices www.microchip.com ‘Microchip Technology were. ticom ‘Texas Instruments sywosmp.com NXP Semiconductors www.national.com Notional Semiconductor wows fairehildsemicom Fairchild Semiconductor www. intersilcom Intersil Corporation www, freeseale.com Freescale Semiconductor swuenxilins.com Xilinx (Programmable Devices) wwew.orcad.com Cadence Systems (Orcad Tool) wwwkeil.com Keil (MicroVision 3 IDE) soewembedded.com Online Embedded Magazine www.elecdesign.com Electronic Design Magazine T would be looking forward to suggestions for further improvement of the book. You may contact me at the following email id—[email protected]. Kindly mention the title and author name in the subject line. Wish you luck as you embark on an exhilarating career path! Shibu KV ‘Gopyrighied material Rete us | take this opportunity to thank Mr Mohammed Rijas (Group Project Manager, Mobility and Embedded Systems Practice, Infosys Technologies Ltd Thiruvananthapuram) and Mr Shafer Badharudeen (Senior Project Manager, Mobility and Embedded Systems Practice, Infosys Technologies Ltd ‘Thiruvananthapuram) for their valuable suggestions and guidance in writing this book. [am also grateful to my team and all other members of the Embedded Systems Group, Infosys Technologies for inspiring ‘me to write this book. ! acknowledge my senior management team at the Embedded Systems and Mobility practice, Infosys Technologies—Kohit F, Srinivasa Rao M, Tadimeti Srinivasan, Darshan Shankavaram and Ramesh Adig—tor their constant encouragement and appreciation of my efforts. am immensely grateful to Mr R Ravindra Kumar (Senior Director, CDAC Thiruvananthapuram) for giving me an opportunity to work with the Hardware Design Group of CDAC (Erswhile ER&DCH), Mrs K G Salochana (Joint Director CDAC Thirwvananthapuram) for giving me the first embedded project to kick start my professional career and also for all the support provided to me during my tenure with CDAC. I convey my appreciation to Mr Biju C Oommen (Addl. Director, Hardware Design Group, CDAC Thiruvananthapuram), who is my great source of inspiration, for giving me the basic lessons of embedded technology, Mr § Krishna Kumar Rao, Mr Sanju Gopal, Ms Deepa R S, Mr ShajiN M and ‘Mr Suresh R Pillai for their belping hand during my research activities at CDAC, and Mr Praveen VL ‘whose contribution in designing the graphics of this book is noteworthy. extend my heartfelt gratitude to all my friends and ex-colleagues of Hardware Design Group CDAC Thiravananthapuram—without their prayers and support, this book would not have been a reality. Last but not the least, acknowledge my beloved friend Dr Sreeja for all the moral support provided to me during this endeavor, and my family members for their understanding and support during the writing of this book. A token of special appreciation to Mr § Krishnakumar Rao (Deputy Director, Hardware Design Group, CDAC Thiruvananthapuram) for helping me in compiling the section on VLSI Design and Mr Shameerudheen PT for his help in compiling the section on PCB Layout Design using Oread Layout Tool. = Acknowledgements I would like to extend my special thanks to the following persons for coordi timely feedback on all requests to the concemed product developmentservice companies, semiconductor manufacturers and informative web pages. Angela Williams of Keil Software Natasha Wan, Jessen Wehirwein and Scott Wayne of Analog Devices Derek Chan of Atmel Asia Moe Ruberrcahl of Maxim Dallas Semiconductor Mark Aaldering asd Theresa Warren of Xilinx Anders Edholm of Electrolux Vijayeta Karol of Honda Sie! Cars India Ltd Mark David of Electronic Design Magazine Vidur Naik of Adidas India Division ‘Steven Kamin of Cadence Design Systems Deepak Pingle and Prathad Joshi of Advanced Micronic Devices Limited (AMDL) Regina Kim of WiZnet Inc. Taranbir Singh Kochar of Siemens Audiology India Division Crystal Whitcomb of Linksys—A Division of Cisco Systems Kulbhushan Seth of Casio India Co, Pvt. Ltd Jitesh Mathur sod Megay Chan of Philips Medical Systems John Symonds of Burn Technology Limited Citron Chang of Advantech Equipment Corp Michael Barr of Netrino Consultants Networks Peggy Vecina of GM Media Arc! David Mindell of MIT Frank Miller of pulsar.gs Gautam Awasthi of Agilent Technologies India Pvt. Ltd A note of acknowledgement is due to the following reviewers for their valuable suggestions for the book. Bimal Raj Dutta ‘Shri Ram Murti Smarak College of Engineering & Technology, Bareilly Nilima Fulmare Hindustan College of Science & Technology, Agra PK Mukherjee Institute of Technology, Banaras Hindu University, Varanasi Kalyan Makato Government College of Engineering & Leather Technology, Kolkata P Kabisatpathy College of Engineering & Technology, Bhubaneswar PK Dutta ‘North Eastem Regional Institute of Science and Technology College, Itanagar tion Technology (DAIICT), Gandhinagar tylaB Das National Institute of Technology Calicut (NITC), Calicut Finally, Ithank the publishing team at McGraw-Hill Education India, more specifically Vibha Mahajan, Shalini Jha, Nilanjan Chakravarty, Surbhi Suman, Dipika Dey, Anjali Razdan and Baldev Raj for their praiseworthy initiatives and efficient management of the book. Sum KV ‘Learning Objectives Ecch chapter beyins with Learning oh Objectives which provides readers with specific outcomes they should beableto achieve after mastering the ‘lapter content Sections and Sub-sections A Eachchapter has been nealy di Into Sections and Sub-sections :0 that the subject matter is studied in 4 logical progression of idens and ‘Provided at appropriate lcations, Solved Examples aid in understanding ofthe fundamentals ofembedded hardeoare and firrcoare design. cht Photographs of important concepis, designs and architectural descriptions bring the subject to life. Effective and accurate Illustrations demonstrate the concepts, design problems and steps inooloed in the design of embedded systems. ary gives a recap of the various topics illustrated i the clupter and Keywords highlight the important chapter terminology. Readers can assess ther Inozoledge byanswering the Objective Questions in multiple-choice format. Review Questions spur students to apply and integrate chapter content. To aid students conduct experiments in the laboratory, Lab Assignments have been provited at the end of relecant chapters. aaa fic Roaeeaeaeyrie = 3) A comprehensive set of five Case Studies, at the end of the book demonstrate the applications of theoretical concepts. ‘Appendixon different family of Microprocessors and Controllers The Appendix section is intended to give an overview of PIC & AVR family of microcontrollers & ARM processor. 2 SAREE Copyrighted material PART 1 EMBEDDED SYSTEM: UNDERSTANDING THE BASIC CONCEPTS Understanding the basic concepts is essential in the learning of any subject. Designing an Embedded ‘System is not a herculean task if you know the fundamentals, Like any general computing systems, Embedded Systems also possess a set of characteristics which are unique to the embedded system under consideration, In contrast to the general computing systems, Embedded Systems are highly domain and application specific in nature, meaning; they are specifically designed for ceriain set of applications in certain domains like consumer electronics, telecom, automotive, industrial control, measurement sys tems etc. Unlike general computing systems it is not possible to replace an embedded system. which is specifically designed for an application catering to a specific domain with another embedded system ‘catering to another domain, The designer of the embedded system should be aware of its characteristics, and its domain and application specific nature. ‘Anembedded system is an electrical/electro mechanical system which is specifically designed for an application catering to aspecific domain. itis a combination of specialised hardware and firmware (soft- ware), which is tailored to meet the requirements of the application under consideration. An embedded system contains a processing unit which can be a microprocessor of a microcontroller of a System on Chip (SoC) or an Application Specific Integrated Circuit (ASIC)/Application Specific Standard Product (ASSP) of a Programmable Logic Device (PLD) like FPGA or CPLD, an V/0 subsystem which facili- tates the interfacing of sensors and actuators which acts as the messengers from and iv ihe ‘Real world” to which the embedded system is interacting, on-board and extemal communication interfaces for com- smunicating between the various on-board subsystems and chips which builds the embedded system and ‘external systems to which the embedded system interacts, and other supervisory systems and support ‘units like watchdog timers, reset circuits, brown-out protection circuits, regulated power supply unit, ‘clock generation circuit etc. which empower and monitor the functioning of the embedded system. The design of embedded system has two aspects: The hardware design which takes care of the selection of the processing unit, the various /O sub systems and communication interface and the inter eonnce- tion among them, and the design of the embedded firmware which deals with configuring the various sub systems, implementing date communication and processing/controlling algorithm requirements. Depending on the response requirements and the type of applications for which the embedded system is designed, the embedded system can be a Real-time or a Non-real time system. The response require ments fora real-time system like Flighs Control System, Airbag Deployment S)stem for Automotive etc, are time critical and the hardware and firmware design aspects for such systems should take these into ‘account, whereas the response requirements for non-real time systems like Automatic Teller Machines (ATM), Media Playback Systems etc, nced not be time critical and missing deadlines may be acceptable in such systems. Like any other systems, embedded systems also possess a sct of quality attributes, which are the ‘non-functional requirements like security, scalability, availability, maintainability, safety, portability et. ‘The non-functional requirements for the embedded system should be identified and should be addressed properly in the system design. The designer of the embedded system should be aware of the different ios peel requirement for the embedded sysiem and should handle this properly to ensure high ity. This section of the book is dedicated for describing the basic concepts of Embedded Systems. The ‘chapters in this section are organised in a way to give the readers a comprehensive introduction to *Em- bedded Systems, their application areas and their role in real lie’, “The different elements of a typicat Embedded System’, the basic lessons on ‘The characteristics and quality attributes of Embedded Sys- tems’, “Domain and Application specific wage examples for Embedded Systems’ and the ‘Hardware and Software Co-design approach for Embedded System Design’, and a detailed introduction to “The archi- tecture and programming concepts for SUSI Microcontrolier - The 8bit Microcontroller selected for our design examples’. We will surt the section with the chapter on ‘Introduction to Emibedkded Systents” brecdies tlm ems sfets Ce Eta Q LEARNING OBJECTIVES lear what an Embedded Sytem is cam the difference between Embedded Systems and General Computing Systems ‘now the tistry of Embedded Systems lear the clatifcaion of Embaddd Systems hosed on perfomance. complet andthe era in whch they evolved ‘now the éemeins ond areas of applications of Embedded Systems Understand te éiffeent puposes of Embedded Stems Analysis of ea life example on the bonding of enbedéed technology with human life RK KK ur day-to-day life is becoming more and more dependent on “embedded systems” and digital techniques. Embedded technologies are bonding into our daily activities even without our knowledge. Do you know the fact that the refrigerator, washing machine, microwave oven, air conditioner, televi- sion, DVD players, and music systems that we use in our home are built around an embedded system? ‘You may be traveling by a *Honda’ or a “Toyota” or a *Ford’ vehicle, but have you ever thought of the genius players working behind the special features and security systems offered by the vehicle to you? It is nothing but an intelligent embedded system. In your vehicle itself the presence of specialised embed- ded systems vary from intelligent head lamp controllers, engine controllers and ignition control systems to complex air hag control systems to protect you in ease af a severe accident. People experience the power of embedded systems and enjoy the features and comfort provided by them. Most of us are to- fally unaware or ignorant of the intelligent embedded systems giving us so much comfort and security. Embedded systems are like reliable servants-they don’t like to reveal their identity and neither they complain about their workloads to their owners or bosses. They are always siting in a hidden place and are dedicated to their assigned task till their last breath. This book gives you an overview of embedded systems, the various steps involved in their design and development and the major domains where they are deployed. Introduction to Embedded Systems 1,1 WHAT Is AN EMBEDDED SYSTEM? ‘An embedded system isan electronis/electro mechanical system designed to perform a specific function ‘nd is a combination of both hardware and firmware (oftware) Every embedded system is unique, and the hardware as well asthe firmware is highly specialised to the application domain. Embedded systems are becoming an inevitable part of any product or equip- ‘ment in all fields including household appliances, telecommunications, medical equipment, industrial control, consumer products, ete, 1.2_ EMBEDDED SYSTEMS vs. GENERAL COMPUTING SYSTEMS ‘The computing revolution began with the general purpose computing requirements, Later it was realised that the general computing requirements are not sufficient for the embedded computing requirements, The embedded computing requirements demand “something special’ in terms of response to stimuli, ‘eciing the computational deadlines. power efficiency, limited memory availability, ct. Let's take the cease of your personal computer, which may be either a desktop PC or @ laptop PC or a palmtop PC. It is built around a general purpose processor like an Intel® Centrino or a Duo/Quad! core or an AMD ‘Turion!™ processor and is designed to support a set of multiple peripherals like multiple USB 2.0 ports, Wi-Fi, cthemet, video port, IEEE1394, SD/CF/MMC extemal interfaces, Bluetooth, etc and with Additional interfaces Tike a CD read'writer, on-board Hard Disk Drive (HDD), gigabytes of RAM, etc. You can load any supported operating system (like Windows® XP/Visia/7, or Red Hat Linux/Ubuntu Linux, UNIX ete) into the hard disk of your PC. You can write or purchase « multitude of applicati for your PC and can usc your PC for running a large number of applications (like printing your dear’s photo using a printer device connected to the PC and printer software, creating a document using Micto- soft® Office Word tool, etc.) Now let us think about the DVD player you use for playing DVD movies, Is it possible for you to change the eperating system of your DVD? Is it possible for you to write an ap- plicetion and download it to your DVD player for execitting? Is it possible for you to add a printer soft- ‘Ware to your DVD player and connect a printer to your DVD player to take a printout? Is it possible for you to change the functioning of your DVD player to a television by changing the embedded software? ‘The answers to all these questions are ‘NO’. Can you see any general purpose interface like Bluetooth or Wi-Fi on your DVD player? Of course "NO". The only interface you can find out on the DVD player is the interface for connecting the DVD player with the display screen and one for controlling the DVD player through a remote (May be an IR or any other specific wireless interface). Indeed your DVD player is an embedded system designed specifically for decoding digital video and generat- ing a video signal as output to your TV or any other display screen which supports the display inter- face supported by the DVD Player, Let us summarise our findings from the comparison of embedded system and general purpose computing system with the help of a table: ‘General Purpose Computing System ‘Embedded System, ‘A-cystem which is.» combination of w generic hardware A system which is 2 combination of special purpose ‘snd i General Purpose Operating System for exeeatinga hardware and embedded OS for executing a specific set variety of applications ‘of applications ‘Contains Geseral Purpose Operating System (GPOS) May or may. not contsin an operating system foe finctioning ‘The lsration piven here is based onthe procesce details available tll Dec 2008. Since pocessor technology is undergoing rapid changes, the processor names mentioned here may nt be rlevaa in feta. Introduction to Embedded Systems ‘Applications ar alterable (programmable) by the user (it is possible forthe end user to reinstall the operating system, and alco add or remove aeer applications) Perfamnance isthe key deciding factor in the selection of the syrtemt Always, Faster i Better ‘Less/not at all tailored towards reduced opersting power requirements, options for different levels of power ‘management “Te fmyvar ofthe embedded system is pre-programmed and it is nonvalterable by the endser (There may. be ‘exceptions for eysteme supporting OS kernel image flashing through special bardvare settings) Application-spectic cequiements (like performance, power requirements, memory usage, ete) are the key éeciding factors Highly tailored to take advantage of the power savin rode: supported by the hardware and the operating system ‘Response requirements ate not time-critical For certain category of embedded systems like mission critical systems, the response time requirement is ighly stitial Exccution behaviour is detemministe for certain types of cmbodded systems liks “Hard Real Time’ systems Need not be deterministic in execution behaviour However, the demarcation between desktop systoms and embedded systems in certain areas of embedded applications are shrinking in cerain contexts. Smart phones are typical examples of this Nowadays smart phones are available with RAM up to 256 MB and users can extend most of their desktop applications to the smart phones and it waives the clause “Embedded systems are designed for specific epplication” from the characteristics of the embedded system forthe mobile embedded device category. However, smart phones come with « built-in operating system and it is not modifiable by the end user. It makes the clause: “The firmware of the embedded system is unalterable by the end user", siil a valid clause in the mobile embedded device category. HISTORY OF EMBEDDED SYSTEMS. Embedded systems were in existence even before the IT revolution, In the olden days embedded systems were built around the old vacuum tube and transistor technologies and the embedded algorithm was developed in low level languages. Advances in semiconductor and nano-technology and IT revolution gave way to the development of miniature embedded systems. The first recognised modern embedded system is the Apollo Guidance Computer (AGC) developed by the MIT Instrumentation Laboratory for the funar expedition. They ran the inertial guidance systems of both the Command Module (CM) and the Lunar Excursion Module (LEM). The Command Module was designed to encircle the moon while the Lunar Module and its crew were designed to go down to the moon surface and land there safely. The Lunar Module featured in total 18 engines. There were 16 reaction control thrusters, a descent engine and an ascent engine. The descent engine was “designed to’ provide thrust to the lunar module out of the lunar orbit and land it safely on the moon. MIT"s original design was based on 4K words of fixed memory (Read Only Memory) and 256 words of erasable memory (Random Access Memory). By June 1963, the figures reached 10K of fixed and 1K of erasable memory, The final configuration was 36K. words of fixed memory and 2K words of erasable memory. The clock frequency of the first microchip. proto model used in AGC was 1,024 MHz and it was derived from a 2.048 MHz crystal clock. The ‘computing unit of AGC consisted of approximately 11 instructions and 16 bit word logic. Around 5000 ICs (3-input NOR gates, RTL logic) supplied by Fairchild Semiconductor were used in this design. The user interface unit of AGC is known as DSKY (isplay/keybcard). DSKY looked like 2 calculator type keypad with an array of numerals. It was used for inputting the commands to the module numerically. fa: Introduction to Embedded Systems ‘The first mass-produced embedded system was the guidance compuier for the Minuteman-1 mis- sile in 1961. It was the ‘Auronetics D-I7" guidance computer, built using discrete transistor logic and a hard-disk for main memory. The first integrated circuit was produced in September 1958 but comput- crs using them didn't begin to appear until 1963, Some of their early uses were in embedded systems, notably used by NASA for the Apollo Guidance Computer and by the US military in the Minuteman-II intercontinental ballistic missile. 1.4 CLASSIFICATION OF EMBEDDED SYSTEMS Its possible to have a multitude of classifications for embedded systems, based on different criteria. ‘Some of the criteria used in the classification of embedded systems are: 1. Based on generation 2. Complexity and performance requirements 3. Based on deterministic behaviour 4, Based on triggering. The classification based on deterministic system behaviour is applicable for ‘Real Time’ systems. ‘The applicatiowtask execution behaviour for an embedded system can be either deterministic or non- deterministic, Based on the execution behaviour, Real Time embedded systems are classified into Hard and Sofi. We will discuss about hard and soft real time systems in a later chapter. Embedded Systems which are ‘Reactive’ in nature (Like process control systems in industrial control applications) can be classified based on the trigger. Reactive systems can be either event triggered or time triggered. 1.4.1 Classification Based on Generation “This classification is based on the order in which the embedded processing systems evolved fiom the first version to where they are today. As per this criterion, embedded systems can be classified into: 1.4.1.1 First Generation The early embedded systems were built around Sbit microprocessors like 8085 and 280, and 4bit microcontrollers. Simple in hardware circuits with firmware developed in Assembly code. Digital telephone keypads, stepper motor control units ete. are examples of this. 1.4.1.2 Second Generation These are embedded systems built around 16bit microprocessors and 8 or 16 bit microcontrollers, following the first gencration embedded systems. The instruction set for the second generation processors/conirollers were much more complex and powerful than the first gen- eration processors/controllers. Some of the second generation embedded systems contained embedded ‘operating systems for their operation. Data Acquisition Systems, SCADA systems, ete. are examples of second generation embedded sysietns. 1.4.1.3 Third Generation With advances in processor technology, embedded system developers started making use of powerful 32bit processors and 1 6bit microcontrollers for their design. A new con- cept of application and domain specific processors/controllers like Digital Signal Processors (DSP) and Application Specific Integrated Circuits (ASICs) came into the picture. The instruction set of processors became more complex and powerful and the concept of instruction pipelining also evolved. The proces sor market was flocded with different types of processors from different vendors. Processors like Intel Pentium, Motorola 68K, etc. gained attention in high performance embedded requirements. Dedicated embedded real time and general purpose operating systems entered into the embedded market. Embed- ded systemis spread its ground to areas like robotics, media, industrial process control, networking, et. Introduction to Embedded Systems zh 1.4.1.4 Fourth Generation The advent of System on Chips (SoC), reconfigurable processors and multicore processors are bringing high performance, tight integration and miniaturisetion into the em- bedded device market. The SoC technique implements a total system on a chip by integrating different functionalities with a processor core on an integrated circuit. We will discuss about SoC’ in a later chap- ter. The fourth generation embedded systems are making use of high performance real time embedded operating systems for their functioning. Smart phone devices, mobile internet devices (MIDs), ete. are examples of fourth generation embedded systems. 1.4.1.5 What Next? The processor and embedded market is highly dynamic and demanding. So ‘what will be the nex: smart move in the next embedded generation?” Let’s wait and se. 1.4.2 Classification Based on Complexity and Performance This classification is based on the complexity and system performance requirements. According to this classification, embedded systems can be grouped into: 1.4.2.1 Small-Scale Embedded Systems Embedded systems which are simple in application reeds and where the performance requirements are not time critical fall under this category. An elec- tronic toy is a typical example of a stnall-scale embedded system. Small-scale embedded systems are usually built around low performance and low cost 8 or 16 bit microprocessors/microcontrollers. A small-scale embedded system may ot may not contain an operating system for its functioning, 1.4.2.2 Medium-Scale Embedded Systems Embedded sysiems which are slightly complex in hardware and firmware (software) requirements fall under this category. Medium-scele embedded _ Systems are usually built around medium performance, low cast 16 or 32 bit microprocessors/microcon- trollers or digital signal processors. They usually contain an embedded operating system (either general purpose or real time operating system) for functioning. 1.4.2.3 Large-Scale Embedded Systems/Complex Systems Embedded systems which involve highly complex hardware and firmware requirements fall under this category. They are em- ployed in mission critical applications demanding high performance. Such systems are commonly built around high performance 32 or 64 bit RISC processorsicontrollers or Reconfigurable System on Chip (RSoC) o multi-core processors and programmable logic devices. They may contain multiple proces- sorsicontrollers and co-units/bardware accelerators for offloading the processing requirements from the main processor of the system. Decoding/encoding of media, cryptographic function implementation, ete, are examples for processing requirements which can be implemented using a co-processor/hard- ware accelerator. Complex embedded systems usually contain a high performance Real Time Operating System (RTOS) for sk scheduling, prioritieation and manogement. 1.5 MAJOR APPLICATION AREAS OF EMBEDDED SYSTEMS We are living in a world where embedded systems play a vital role in our day-to-day life, starting from home to the computer industry, where most of the people find their job for a livelihood. Embedded technology has acquired a new dimension from is first generation model, the Apollo guidance computer, to the latest radio navigation system combined with in-car enterainment technology and the micropro- cessor based “Smart” running shoes launched by Adidas in April 2005. The application areas and the products in the embedded domain are countless. A few of the important domains and products are listed below: a net Bnet 1. Consumer electronics: Camcorders, cameras, etc, 2. Household appliances: Television, DVD players, washing machine, fridge, microwave oven, et. 3, Home automation and security systems: Air conditioners, sprinkler, intruder detection alarms, closed circuit television cameras, fire alarms, etc. 4. Automotive industry: Anti-lock breaking systems (ABS), engine control, ignition systems, ‘automatic navigation systems, etc. 5. Telecom: Cellular telephones, telephone switches, handset multimedia applications, ete 6. Computer peripherals: Printers, scanners, fax machines, etc. 7. Computer networking systems: Network routers, switches, hubs, firewalls, ete. 8. Healthcare: Different kinds of scanners, EEG, ECG machines etc. 9. Measurement & Instrumentation: Digital multi meters, digital CROs, logic analyzers PLC systems, etc. 10. Banking & Retail: Automatic teller machines (ATM) and currency counters, point of sales (POS) 1, Card Readers: Barcode, smart card readers, hand held devices, etc. ‘SMe PuRrose of EMBEDDED S¥BTEMS As mentioned in the previous section, embedded systems are used in various domains like consumer electronics, home automation, telecommunications, automotive industry, healthcare, control & instru ‘mentation, retail and banking applications, etc, Within the domain itseif, according to the application usage context, they may have different functionalities. Fach embedded system is designed to serve the purpose of any one or a combination of the following tasks: 1. Data collection/Storage/Representation 2. Data communication 3. Data (signal) processing 4, Monitoring $. Control 6. Application specific user interface 1.8.1 Data Collection/Storage/Representation Embedded systems designed for the purpose of data collection performs acquisition of data from the external world. Data collection is usually done for storage, analysis, manipulation and transmission. The term “data” refers all kinds of information, viz. text, voice, image, video, electrical signals and any other measurable quantities. Data can be either analog (continuous) or digital (discrete). Embedded sys- tems with analog data capturing techniques collect data directly in the form of analog signals whereas embedded systems with digital data collection mechanism converts the analog signal to corresponding digital signal using analog to digital (A/D) converters and then collects the binary equivalent of the analog data. Ifthe data is digital, it can be directly captured without any additional interface by digital embedded systems. The collected data may be stored directly in the system or may be transmitted to some other systems ‘or it may be processed by the system or it may be deleted instantly after giving e meaningful representa- tion. These actions are purely dependent on the purpose for which the embedded system is designed. Embedded systems designed for pure measurement applications without storage, used in control and Introduction to Embedded Sysiems = instrumentation domain, collects data and gives a meaningful representation of the collected data by means of graphical representation or quantity value and deletes the collecied data when new data arrives at the data collection terminal, Analog and digital CROs without storage memory are typical examples of this. Any measuring equipment used in the medical domain for monitoring without storage function- ality also comes under this category. ‘Some embedded systems siore the collected data for processing and analysis, Such systems incor porate a buil-in/plug-in storage memory for storing the captured data, Some of them give the user a meaningful representation of the collected data by. visual (graphical/quantitative) or audible means using display units [Liquid Crystal Dis- play (LCD), Light Emitting Diode (LED), etc] buzzers, alarms, etc. Examples are: measuring instruments with storage memory and monitor- ing instruments with storage memory used in medical applications. Ceriain embedded systems store the data and will not give a representation of the same to the user, whereas the data is used for internal processing. A digital camera is a typical example of an embedded system with data collection/storage! representation of data. Images are captured and the captured image may be stored within the memory of the camera. The captured image can also be presented to the user through graphic LCD unit, 1.6.2. Data Communication Embedded data communication systems are deployed in applications ranging from complex satelite communi- cation systems to simple home networking systems. As mentioned earlier in this chapter, the data collected by an embedded terminal may require transferring of the same to some other system located remotely. The transmission is achieved cither by a wire-line medium or by a wire- Jess medium. Wire-line medium was the most common choice in all olden days embedded systems. As technolo- gy ischanging, wireless medium is becoming the de-facto standard for data communication in embedded systems A wireless medium offers cheaper connectivity solutions ‘and make the communication link free from the hassle of wire bundles, Data can either be transmitted by analog means or by digital means. Modern industry trends are settling towards digital communication. ‘The data collecting embedded terminal itself can incorporate data communication units like wireless Po dt Enotes modules (Bluetooth, ZigBee, Wi-Fi, EDGE, GPRS, etc.) or wire-line modules (RS-232C, USB, TCP/IP, PS2, ete.). Certain embedded systems act as a dedicated transmission unit between the sending and receiving terminals, offering sophisticated functionalities like data packetizing, encrypting and decrypt- ing. Network hubs, routers, switches, et. are typical examples of dedicated data transmission embedded systems. They act as mediators in data communication and provide various features like data security, ‘monitoring ete. 1.6.3 Data (Signal) Processing ‘As mentioned earlier, the data (voice, image, video, cloe- trical signals and other measurable quantities) collected by embedded systems may be used for various kinds of data processing. Embedded systems with signal process- ing functionalities are employed in applications demand- ing signal processing like speech coding. synthesis, audio vvideo codec, transmission applications, etc. ‘A digital hearing aid is a typical example of an embed- ded system employing data processing, Digital hearing aid improves the hearing capacity of hearing impaired persons. 1.6.4 Monitoring ‘Raigial nearing aid employing Embedded systems faili der thi te sues eeeeninn Soceetene: % ing. under this category are spe- 2 peaInewog Gifically designed for monitoring purpose. Almost all Sens Aulogy Cop 205) embedded products coming under the medical domain are with monitoring functions only. They are used for determining the state of some variables using input ‘sensors. They cannot impose control over variables. A very good example is the electro cardiogram (ECG) machine for monitoring the heartbeat ofa patient. Tne machine is intended to do the monitoring ‘of the heartbeat. It cannot impose control over the heartbeat. The sensors used in ECG are the different electrodes connected to the patient's body. ‘Some other examples of embedded systems with monitoring function are measuring instruments like digital CRO, digital multimeters, logic analyzers, ete. used in Control & Instrumentation applications. They are used for knowing (monitoring) the status of some variables like current, voltage, etc. They cannot control the variables in tum. 1.6.5 Control Embedded sysens with cosrl fimslomlies Ty (Pat) impote control over some variables sccording to the tarred alg changes in input variables. A system with control (roa comya Po MelSatens functionality contains both sensors and actuators. (ormemedical phlipa con) Sensors are connected to the input port for capturing Introduction to Embedded Systems the changes in environmental variable or measuring variable. The actuators connected to the output port are conirolled according to the changes in input variable to put an impact on the controlling varinble to bring the controlled variable to the specified range. Air conditioner system used in ourhome to control the room temperature toa specified limit typi cal example for embedded system for control purpose. An airconditioner contains a room temperature- sensing element (sensor) which may be a therm- istor and a handheld unit for setting up (feeding) the desired temperature. The handheld unit may be connected to the central embedded unit ing inside the airconditioner through a wireless link for through a wired Tink. The air compressor unit acts as the actuator. The compressor is controlled according to the current room temperature and the desired temperature set by the end user. Here the input variable is the current room tem- perature and the controlled variable isalso the room (Fig7S) ran Atrconationer for controting room temperature. Embedded System with Control fanctionality” (Piao coutery of Pecos Corporsinn (orwmelecvelexcon/au)) temperature. The controlling variable is coo! air low by the compressor unit. Ifthe controled variable and input variable are not at the same value, the cortrolling variable tries to equslise them through taking actions on the coo! airflow. 1 6 Application Specific User Interface ‘These are embedded systems with application-specific user interfaces like buttons, switches, keypad, lights, bells, display ‘units, ee, Mobile phone is an exampie for this, In mobile phone the user interface is provided through the keypad, araphic LCD module, system speaker, vibration aler, ec. 1.7 ‘SMART’ RUNNING SHOES FROM KDIDAS—THE INNOVATIVE BOND- ING OF LIFESTYLE WITH EMBEDDED TECHNOLOGY ‘Afier three years of extensive research work, Adidas launched tthe"Smart”runaing shoes in the market in April 2005, The term “Smart Shoe” may sound gimmicky. But adaptive cushioning provided by the shoe makes sense, and the design engineer- ve. The shoe constantly sto customize its value to the individual runner, depending on the running style, pace, body weight, and running surface. The shoe uses a magnetic sensing system to measure cushioning level, which is adjusted viaa digital signal processing unit that controls a motor-driven ing behind the shoes is very impre adapts its shock-absorbing characteri cable system, 4 Introduction to Embedded Systems A hall effect sensor is positioned at the top of the “cushioning element”, and the magnet is placed at the bottom of the clement. As the cushioning compresses on each impact, the sensor measures the dis- tance from top to bottom of mid-sole (accurate to 0.1 mm). About 1000 readings per second are taken ‘and relayed to the shoe’s microprocessor, The Microprocessor (MPU) is positioned under the arch of the shoe. It runs an algorithm that compares the compression messages received from the sensor to a ‘preset range of proper cushioning levels, so it understands if the shoe is too soft or too firm, Then the ‘MPU sends a command to a micro motor, housed in the mid-foot, The micro motor tums a lead screw to lengthen or shorten a cable secured to the walls of a plastic-cushioning element. When the cable is shortened, the cushioning element is pulled taut and compresses very litle. A longer cable allows for 8 more cushioned feel. A replaceable 3-V battery powers the motor and lasts for about 100 hours of running. ‘The Portland, Ore-based Adidas Innovation Team that developed the shoe was led by Christian ‘DiBenedetto. It also included eleciromechanical engineer Mark Oleson, as well as a footwear developer and two industrial designers. Oleson explains that the team chose a magnetic sensor because it could measure the amount of compression in addition to the time it took to reach full compression. Gather- ing sensor data, he says, meant little without building a comparative “running context”. So one of the first steps in developing the MPU algorithms was building this database. Runners wore test shoes that gathered information about various compression levels during a run. Then the runners were interviewed to learn their thoughts about the different cushion levels. “When the two matched up, that helped validate our sensor,” says Oleson. ‘Adaptations in the cushioning element account for the change of running surface and pace of the ‘unner, and they're made gradually over an aver- age of four running steps. The goal is for the run- ner not to feel any sudden changes. Adaptations ‘are made during the “swing” phase rather than the “stance” phase of the stride (ic. when the foot off the ground). Ifthe shoe's owner prefers a more ‘cushioned or a firmer “ride,” adjustments can be made via “+” and “~" buttons that also activate the intelligent functions of the shoe. LED indicators confirm when the electronics are tured on (The lights do not remain on when the shoes are in use). If the shoes aren't tumed on, they operate like old-fashioned “manual” running shoes. The shoes tum off if their owner is either inactive or ata walking pace for 10 minutes. ‘Source Electronic Design ee nical Te Re printed with permission Introduction to Embedded Systems B34 ¥ Anembedded system is an Eletroni/Electre-mechanical system designed to perform a specific function und is 4 combination of beth hardware and firmware (Softwar). ¥ A gencral purpose computing system is a combination of generic hardware and general parpose operating system for executing a varity of applications, whereas an embeded system is a combination of special purpose thardvare and embedded OS firmware for executing a specific set of applications. Apollo Guidance Computer (AGC) isthe first recognised modera embedded system and ‘Autonetics D-17", the {guidance computer for the Minuternan-I missile, was the fist mass-produced embedded system. ¥ Based on the complexity and performance requirements, embedded systems are clasiied into small-scale, ‘medium ssale and large-scalecomplen, Y The preseace of embedded systems vary fiom simple electronic toys to complex flight and missile contol systems. Y Embedded sysicms are designed to sere the purpose of aay onc or a gombination of data colletio/siorage! representation, data communication, data (signal) processing, monitoring, conrol er application specific user interface, Keywords Embedded system : An lcctronic/eletro:mechanical system which is designed to perform a specific function and isa combisation of both harware and fimware Microprocessor silicon chip represensing a Central Processing Unit (CPU) Microcontroller: Abighly integrated chip that contains a CPU, sraichpad RAM, special and general purpose register amays and integrated peripberals psp + Digital Signal Procestor it powerful special purpose 8/16/32 bit microprocessor designed specially to meet the computational demands and power constraints asic + Applicatioa Specific integrated Cieuit na microchip designed o perform a specific orunique lication sense « lar device tt caves cc i om fom 1 sete fr any ener ot coniral purpose ‘Actuator + Aform of tanséucer device (mechanical or electrical) which converts signals to correspont- {ng piysical ection (motion) LED + Light Emiting Diode. An output device producing visas indication inthe form of light in sccordance with curtent flow Baxree + Apievoelecricdevice for generating audio indication. K contains piezo-lectric diaphragm ‘which produces audible sound in response tothe voltage applied to it Operating system + A picve of software designed 1a manage and allocate system resources and execute other pieces of sofware Electro Cardiogram : An embedded device for heartbeat monitoring ece) SCADA, + Supervisory Control and Data Acquistion System. A dita aquisition system used in nds ‘ial eantec applications RAM + Random Access memory Volatile memory ADC + Analog to Digital Coaverer. An integrated circuit which converts analog signals to digital form + Allow cost, low power, short ange wireless technology for data and voice communication + Wireless Fidelity isthe popular wireless commun cation of devices ns Introduction to Embedded Systems Biuctooth Wei tion technique far networked communi |. Embodied systems are (2) General purpose (b) Special purpose 2 Embedded system is (@) Ancelectronic system ©) Apure mechanical sytem (©) Anclestr-mechanical system (@) @ore) 3. Which of the following is nat tue aboat embedded systems? (0). Built around specalised hardware (©) Always contin an operating sytem (6) Execution behaviour may’ be deterministic (@) All ofthese (©) None ofthese 4. Which of the following is not an example of a ‘Small-scale Embedded System"? (@) Electronic Barbie dott (©) Smple calculator (6) Cell phone (@) Blecttoic toy car 5. The first recognised modcrembedded system is () Apple Computer (©) Apollo Guidance Computer (AGC) (@) Caleulator (@) Radio Navigation System {6 The fit mass produced embedded system is (®) Minuteman-! ©) Mimuteman-tt (©) Awtonetis D-17 {(@) Apollo Guidance Computer (AGC) 7. Which of the following i (re) an intended purpose() of embedded systems? (@) Data collection (b) Dau processing (€)_ Data communication (@) Allof these (©) None of these 8, Which ofthe following isan are) examples) of embedded system for data communication? (2) USB Mass storage device (©) Network router (©) Digital camera (2) Music player (©) Allof these () None of these 9. Acdigital multi meter is an example of an embedded system for (@) Data communi (€) Control (8) Allof these (©) None ofthese 10, Which ofthe folowing isan (are) example(s) of an embedded system for signal processing? (Apple iPOD (media player device) () SmDisk USB mass storage device (© Both (a) and) (@) None ofthese |, What isan embedded system’? Explain the oifferent applications of embedded systems 2. Explain the various purposes of embedded systems in detail with illustrative example. 3._Explain the different clussifications of embedded systems. Give an example for exch. BUM ND cer aster (te BN) ® LEARNING OBJECTIVES Leor the building Hock of atypia! Embedaed System ¥ Leam about General Purpose Processors (GPPS), Application Specific Instruction Set Processors (ASIPs), Micropro- cessors, Microcontrollers, Digital Signal Processors, RISC & CISC processors, award ond Vor-Neumann Processor Architecture, Big-endion v/s Little endian processors, Lead Store operation and Instnstion pipelining Leam about diferent PLDs lite Complex Programmable Logic Devices (CPLOs), Feld Progrommabie Gate Anays (FPG), ete. Lear about the different memory technologies and menory types used in embedded rysten development Leam about Mesked ROM (ROM), PROM, OTP. EPROM, EEPROM and FLASH memory for embedded firmware storage Learn about Serial Access Memory (SAM), Stotic Random Access Nemory (SRAM), Dynamic Random Acces: Memory (DRAM) and Nonvolatite SRAM (NVEAM) Understand the different foctrs to be considered inthe selection of memory for embedded systems Understand the role of sensors, actuators and thei interfacing with the 1/0 subsystems of on enbedied system Learn about the interfacing of LEDs, 7-segment LED Displays, Piezo Buzzer, Stepper Motor, Relays, Optocoupers, Matric keyboord, Push button switches, Progiommable Perizherol Interface Device (1.9. 8255 PP). etc. with the 1/0 subsystem of the embedded system Learn about the different communication interfaces of on embeded system Undestand the various chip level communication interfaces tke 12C, SPI, UAT, -wir, porlll bus et. Understand the different wired and wireless extemal communication interfoces tke RS-232C, RS-485, Porllel Port USB, TEEE1396, Infrared (IrDA), Bluetooth, Wi, ZigBee, GPRS, ete ‘Know what embedded firmware is ond its role in embeded systems Understand the different system comporents like Reset Circuit. rowmout protection circuit, Oscillator Unit, Reat- Time Clock (RTC) and Wetchdeg Timer unit Understand the role of PB in embedded systems RAK 888 8 84 Atypical embedded system (Fig. 2.1) contains a single chip controller, which acts as the master brain of the system. The controller can be a Microprocessor (e.g. Intel 8085) or a microcontroller (e.g. Atmel AT89C51) or a Field Programmable Gate Array (FPGA) device (e.g. Xilinx Spartan) or a Digital Signal Processor (DSP) (c.g. Blackfin® Processors from Analog Devices) oran Application Specific Integrated f° Introduction to Embedded Systems FPGAVASICIDSPIS0C ‘aba Firmware Microprocessor/eontroller Dy Communication interface Real World Elements ofan embedded system Circuit (ASIC)/Application Specific Standard Product (ASSP) (c.g. ADE7760 Single Phase Energy Metreing IC from) Analog Devices for energy metering applications). Embedded hardware/software systems are basically designed to regulate a physical variable orto ma- nipulate the state of some devices by sending some control signals to the Actuators or devices connected to the O/p ports of the system, in response to the input signals provided by the end users or Sensors which are connected to the input ports. Heexce an embedded system can be viewed as a reactive system. The control is achieved by processing the information coming from the sensors and user interfaces, and controlling some actuators that regulate the physical variable. Key boards, push button switches, etc. are examples for common user interface input devices where- as LEDS, liquid erystal displays, piezoelectric buzzers, etc. are examples for common user interface ‘output devices for atypical embedded system. It should be noted that itis not necessary that all embed- ded systems should incorporate these YO user interfaces. I solely depends on the type ofthe application for which the embedded system is designed. For example, ifthe embedded system is designed for any ‘handheld application, such as a mobile handset application, then the system should contain user inter- faces like a keyboard for performing input operations and display unit for providing users the status of various activities in progress. ‘Some embedded systems do not require any manual intervention for their operation. They automati- cally sense the variations in the input parameters in accordance with the changes in the real world, to ‘which they are interacting through the sensors which are connected to the input port of the system. The ‘The Typical Embedded System ih sensor information is passed to the processor aftr signal conditioning and digitisation. Upon receiving the sensor daia the processor or brain of the embedded system performs soine pre-defined operations with the help of the firmware embedded in the system and sends some actuating signals to the actua- tor connected to the output port of the embedded system, which in turn acts on the controlling variable to bring the controlled variable to the desired level to make the embedded system work in the desired ‘manner. ‘The Memory of the system is responsible for holding the control algorithm and other important con- ‘figuration denils. For most of embedded systems, the memory for storing the slgorithm or configuration data is of fixed type, which is a kind of Read Only Memory (ROM) and it is not available for the end user for modifications, which means the memory is protected from unwanted user interaction by imple- menting some kind of memory protection mechanism. The most common types of memories used in ‘embedded systems for control algorithm storage are OTP, PROM, UVEPROM, EEPROM and FLASH. Depending on the contro! application, the memory size may vary from @ few bytes to megabytes, We will discuss them in detail in the coming sections. Sometimes the system requires temporary memory for performing arithmetic operations ot control algorithm execution and this type of memory is known as “working memory". Random Access Memory (RAM) is used in most of the systems as the working memory. Various types of RAM like SRAM, DRAM and NVRAM are used for this purpose. The size ‘of the RAM also varies from a few bytes to kilobytes or megabytes depending on the application. The details given under the section “Memory” will give you a mote detailed description of the working memory. ‘An embedded system without a control algorithm implemented memory is just like a new born baby. Ikis having all the peripherals but is not capable of making any decision depending on the situational as well as real world changes. The only difference is that the memory of a new bor baby is self-adaptive, ‘meaning that the baby will try to learn from the surroundings and from the mistakes committed. For ‘embedded systems itis the responsibility of the designer to impart intelligence to the system. Ina controller-based embedded system, the controller may contain intemnsl memory for storing the control algorithm and it may be an EEPROM or FLASH memory varying from a few kilobytes to mega- bytes. Such controllers are called controllers with on-chip ROM, e.g, Atmel AT89CS1. Some controllers ‘may not contain on-chip memory and they require an exismal (off-chip) memory for holding the control algorithm, e.g. Intel 8031AH. 2.1 CORE OFTHE EMBEDDED SYSTEM Embedded systems are domain and application specific and are built around a central core. The core of the embedded system falls into any one of the following categories: 1. General Purpose and Domain Specific Processors 1.1 Microprocessors 1.2 Microcontrollers 1.3 Digital Signal Processors 2. Application Specific Integrated Circuits (ASICs) 3. Programmable Logic Devices (PLDs) 4. Commercial off-the-shelf Components (COTS) Ifyou examine any embedded system you will find that it is built around any of the core units men- tioned above. pe Introduction to Embedded Systems 2.1.1 General Purpose and Domain Specific Processors ‘Almost 80% of the cimbedded systems are processor/controller based, The processor may be a micro- processor or a microcontroller ora digital signal processor, depending oa the domain and application. ‘Most of the embedded systems in the industrial contro} and monitoring applications make use of the commonly available microprocessors or microcontrollers whereas domains which require signal processing: such as speech coding. speech recognition, ete. make use of special kind of digital signal processors supplied by manufacturers like, Analog Devices, Texas Instruments, etc, 1 Microprocessors A Microprocessor isa silicon chip representing a central processing unit ), which is capable of performing arithmetic as well as logical operations according to a pre-de- fined sot of instructions, which is specific to the manufacturer. In general the CPU contains the Arith- metic and. Logie Unit (ALU), control unit and working registers. A microprocessor is a dependent unit ‘and it requires the combination of other hardware like memory, timer unit, and interrupt controller, etc. for proper functioning, Intel claims the credit for developing the first microprocessor unit Intel 4004, a Abit processor whict was released in November 1971. It featured IK data memory, 4 12bit program ‘counter and 4K program memory, sixieen 4bit general purpose registers and 46 instructions. It ran at a clock speed of 740 kHz. It was designed for olden day’s calculators. In 1972, 14 more instructions were added to the 4004 instruction set and the program space is upgraded to 8K. Also interrupt capabilities ‘were added to it and it is renamed as Ante! 4040. It was quickly replaced in April 1972 by /nte! 8008 which was similar to Jntel 4040, the only difference was that its program counter was 14 bits wide and the 8008 served as a termina! controller. In April 1974 Intel launched the first 8 bit processor, the Jie! 8080, with 16bit address bus and program counter and seven 8bit registers (A-E.H.L: BC, DE. and IL. pairs formed the L6bit register for this processor). Jnte/ 8080 was the most commonly used processors for industrial control and other embedded applications in the 1975s. Since the processor required other hardware components as mentioned earlier for its proper functioning, the systems made out of it were bulky and were lacking compactness. Immediately after the release of /nfel 8080, Motorola also entered the market with their processor, Motorola 6800 with a different architecture and instruction set compared to 8050. In 1976 Intel came up with the upgraded version of 8080 — Intel 8085, with two newly added instruc~ tions, three interrupt pins and serial LO, Clock generator and bus controller circuits were built-in and the power supply part wes modified to single +5 V supply. Tn July 1976 Zilog entered the microprocessor market with its 280 processor as competitor to Intel ‘Actually it was designed by an ex-Intel designer, Frederico Faggin and it was an improved version of Intel's 8080 processor, maintaining the original 8080 architecture and insiruction set with an Sbit data bbus and a 16bit address bus and was capable of executing all instructions of 8080. It included 80 more ‘new instructions and it brought out the concept of register banking by doubling the register set. Z80 also included two sets of index registers for flexible design, Technical advances in the field of semiconductor industry brought a new dimension to the micro- processor market and twentieth century witnessed a fast growth in processor technology. 16, 32 and ‘64 bit processors came into the place of conventional Sbit processors, The initial 2 MHz clock is now an old story. Today processors with clock speeds up to 2.4 GHz are avuilable in the market. More and ‘more competitors entered into the processor market offering high speed, high performance and low cost processors for customer design needs. Intel, AMD. Freescale. IBM. TI, Cyrix. Hitachi, NEC, LSI Logic. ete. are the key players in the processor market. Intel still leads the market with cutting edge technologies in the processor industry. ‘The Typical Embedded System Lis 9 Different instruction set and system architecture are available for the design of a microprocessor. Harvard and Von-Neumann are the two common system architectures for processor design. Processors based on Harvard architecture contains separate buses for program memory and data memory, whereas processors based on Von-Neumann architecture shares a single system bus for program and data memo- ry. We will discuss more about these architectures later, under a separate topic, Reduced Instruction Set ‘Computing (RISC) and Complex Instruction Set Computing (CISC) are the two common Insiruction Set Architectures (ISA) available for processor design, We will discuss the same undera separate topic in this section, 2.1.1.2 General Purpose Processor (GPP) vs. Application-Specific Instruction Set Processor (ASIP) A General Purpose Processor or GPP is a processor designed for general computational tasks. ‘The processor running inside your laptop or desktop (Pentium 4/AMD Athlon, etc.) is a typical ex- ample for general purpose prozessor. They are produced in large volumes and targeting the general ‘market. Due to the high volume production, the per unit cost for a chip is low compared to ASIC or olher specific ICs. A typical general purpose processor contains an Arithmetic and Logie Unit (ALU) ‘and Control Unit (CU). On the other hand, Application Specific Instruction Set Processors (ASIPs) are processors with architecture and instruction set optimised to specific-domain/application require- network processing, automotive, telecom, media applications, digital signal processing, con- ‘tol applications, ete. ASIP fil the architectural spectrum between general purpose processors and Application Specific Integrated Circuits (ASICS). The need for an ASIP arises when the traditional ‘general purpose processor are unable to mest the increasing application needs. Most of the embedded systems are built around application specific instruction set processors. Some microcontrolters (like ssutomotive AVR, USB AVR from Atmel), system on chips, digital signal processors, ete. are examples for application specific insiruction set processors (ASIPs). ASIPs incorporate a processor and on-chip peripherals, demanded by the application requirement, program and data memory. 2.1.1.3 Microcontrollers A Microcontroller is ahighly integrated chip that contains a CPU, scratch pad RAM, special and general purpose register arrays, on chip ROM/FLASH memory for program stor- ‘age, timer and interrupt control units and dedicated 1/O ports. Microcontrollers can be considered 35 a ‘super set of microprocessors. Since a microcontroller contains all the necessary functional blocks for spendent working. they found greater place in the embedded domain in place of microprocessors. Apart from this, they are cheap, cost effective and are readily available in the market ‘Texas Instrument’s T’MS 000 is considered as the world’s first microcontroller. We cannot say itas a fully functional microcontroller when we compare it with modem microcontrollers, TI followed Intel’s 4004/4040, 4 bit processor design and added some amount of RAM, program storage memory (ROM) ‘and 10 support on a single chip, there by eliminated the requirement of multiple hardware chips for self-functioning. Provision to add custom instructions to the CPU was another innovative feature of ‘TMS 1000, TMS 1000 was released in 1974 In 1977 Imel entered the microcontroller market with a family of controllers coming under one umbrella named MCS-48™ family. The processors came under this family were 8038HL, 8039HIL., S04OAHL, 8048H, SO49H and 80S0AH. Intel 8048 is recognised as Intel's first microcontroller and it ‘was the most prominent member in the MCS-48"™" family. It was used in the original IBM PC key- board. The inspiration behind 8048 was Fairchild’s F8 microprocessor and Intel's goal of developing a low cost and simall size processor. The design of 8048 adopted a truc Harvard architecture where pro- ‘gram and data memory shared the same address bus and is differentiated by the related control signals, TNCSAR™ Wa ade mark owned tel wa von bee Ss Eventually Inte! came out with its most fruitful design in the Sbit microcontroller domain-the 8057 Jamily and its derivatives. itis the most popular and powerful Rbit microcontroller ever built. It was developed in the 19805 and was put under the family MCS-S1. Almost 75% of the microcontrollers used in the embedded domain were 8051 familly based controllers during the 1980-90s, 8051 proves- sor cores are used in more than 100 devices by more than 20 independent manufacturers like Maxim, Philips, Atmel, etc, under the license from Intel. Due to the low cost, wide availability, memory efficient instruction set, mature development ools and Boolean processing (bit manipulation operation) capabil ity, 8051 family derivative microcontrollers are much used in high-volume consumer electronic devices, entertainment industry and other gadgets where cost-cutting is essential. ‘Another important family of microcontrollers used in industrial control and embedded app! the PIC family micro controllers from Microchip Technologies (It will be discussed in detail in a later section of this book). It is a high performance RISC microcontroller complementing the CISC (complex instruction set computing) features of 8057, The terms RISC and CISC will be explained in detail in a separate heading. ‘Some embedded system applications require only Sbit controllers whereas some embedded applica- tions requiring superior performance and computational needs demand 16/32bit microcontrollers. Infi- neon, Freescale, Philips, Atmel, Maxim, Microchip ete. are the key suppliers of 16bit microcontrollers Philips tried to extend the 8051 family microcontrollers to use for 16bit applications by developing the Philips XA (eXtended Architecture) microcontroller series, Sbit microcontrollers are commonly used in embedded systems where the processing power is not « big constraint. As mentioned earlier, more than 20 companies are procucing different flavours of the $031 family microcontcoller. They try to add more and more functionalities like built in SPI, 12C serial buses, USB controller, ADC, Networking capability, ec. So the competitive market is driving towards 4 one-stop solution chip in microcontroller domain. High processing speed microcontroller farailies like ARML} series are also available in the market, which provides solution to applications requiring hardware acceleration and high processing capability Freescale, NEC, Zilog, Hitachi, Mitsubishi, Infineon, ST Micro Electronics, National, Texas Instru- ments, Toshiba, Philips, Microchip, Analog Devices, Daewoo, Intel, Maxim, Sharp, Silicon Laborato- ries, TDK, Triscend, Winbond, Atmel, et. are the key players in the microcontroller market. Of these ‘Atmel has got special significance. They are the manufacturers of a variety of Flash memory based tnjcrocontrollers. They also provide In-System Programmsbility (which will be discussed in detail in a later section of this book) for the controller. The Flash memory tectnique helps in fast reprogramming of the chip and thereby reduces the product development time. Atme! also provides another special fum- ily of microcontroller ealled AVR (it will be discussed in detail in a later chapter), an 8bit RISC Flash microcontroller, fést enough to execute powerful instructions in a single clock cycle and provide the latitude you need to optimise power consumption ‘The instruction set architecture of a microcontroller can be cither RISC or CISC. Microcontrollers, are designed for either general purpose application requirement (general purpose controller) or domain- specific application requirement (application specific instruction set processor). The inte! 80S! micro- controller is @ typical example for a general purpose microcontroller, whereas the automotive AVR microcontroller family from Atmel Corporation is a typical example for ASIP specifically designed for the automotive domain, 2.1.1.4 Microprocessor vs Microcontroller ‘The following table summarises the differences between a microcontroller and microprocessor. ‘The Typical Embedded System Microprocessor A silicon chip representing a:central processing unit (CPU), which is eapable of performing arith metic as well a5 logical operations according to 9 pre-defined set of instructions I is a’ dependent init, It requires the combina tion of other chips like timers, program and data memory chips, interrupt controllers, etc, for func- tioning ‘Most of the titte general’ purpose in design and ‘operation Doesn't contain a built in /O por The /O por functionality needs to be implemented with the help of extemal programmable peripheral inter- face chips like 8255 Targeted for high end market where performance 4s important Limited power Saving options compared micro ‘Microcontrolier A microcontroller is a highly integrated chip that contains a CPU, seratchpad RAM, special ar general purpose register arrays, on chip ROM/ FLASH memory for program storage, timer and interrupt contioi units and dedicated 1/0 ports ft is a self-contained unit and it doesn’t require external interrupt controller, timer, UART, ete. for its functioning tly application-oriented or domain-specifie ‘Most of the processors Contain multiple buil LO ports which can be operated as asingle 8 or 16 ‘32 bit port or as individual port pins Targeted for embedded market where perfor- ‘manos is not so critical (At present this demarca- tion is invalid) Includes lot of power saving features eantrollers 2.1.1.5 Digital Signal Processors Digital Signal Processors (DSPs) are powerful special parpese 8/16/32 bit microprocessors designed specifically to meet the computational demands and power con- straints of today's embedded audio, video, and communications applications. Digital signal processors are 2 to3 times faster than the general purpose microprocessors in signal processing applications. This is because of the architectural difference between the two. DSPs implement algorithms in hardware ‘which speeds up the execution whereas general purpose processors implement the algorithm in firm- ‘ware and the speed of execution dependls primarily on the clock for the processors. In general, DSP can be viewed as a microchip designed for performing high speed computational operations for ‘addition’, ‘subtraction’, ‘multiplication’ and ‘division’, A typical digital signal processor incorporates the follow- ing key units Program Memory Memory for storing the program required by DSP to process the data Data Memory Working memory for storing temporary variables and data/signal to be processed. Computational Engine Performs the signal processing in azcordance with the stored program memory. Computational Engine incorporates many specialised arithmetic units and each of them oper- ‘ates simultaneously to increase the execution speed. It also incorporates multiple hardware shifters for shifting operands and thereby saves execution time. Y/O Unit Acis asan interface between the outside world and DSP. Itis responsible for capturing sig- nals tobe processed and delivering the processed signals. Introduction to Embedded Systems Audio video signal processing, telecommunication and multimedia applications are typical examples where DSP is employed. Digital signal processing employs a large amount of real-time calculations. ‘Sum of products (SOP) calculation, convolution, fast fourier transform (FFT), diserete fourier transform (DEN, et, are some ofthe operations performed by digital signal processors Blackfin®' processors from Analog Devices is an example of DSP which delivers breakthrough signal-processing performance and power efficiency while also offering a full 32-bit RISC MCU pro gramming model. Blackfin processors present high-performance, homogeneous software targets, which allows flexible resource allocation between hard real-time signal processing tasks and non real-time control tasks. System control tasks can often run in the shadow of demanding signal processing and multimedia tasks. 2.1.1.6 RISC ws. CISC Processors/Controllers The term RISC stands for Reduced Instruction Set Computing. As the name implies, all RISC processors/controllers possess lesser number of instruc- tions, typically in the range of 30 to 40. CISC stands for Complex Instruction Set Computing. From ‘the definition itself itis clear that the instruction set is complex and instructions are high in number. From a programmers point of view RISC processors are comfortable since /he needs to lear only & few instructions, whereas for a CISC processor vhe needs to learn more number of instructions and should understand the context of usage of each instruction (This scenario is explained on the basis of a programmer following Assembly Language coding. For a programmer following C coding it doesn’t matter since the cross-compiler is responsible for the conversion of the high levc! language instructions to machine dependent code). Atmel AVR microcontroller isan example for a RISC processor and its in- struction set contains only 32 instructions. The original version of 8751 microcontroller (e.g. AT89C51) is a CISC controller and its instruction set contains 255 instructions. Remember itis not the number of instructions that determines whether a processor/controlleris CISC or RISC. There are some other fac- tors like pipelining features, instruction set type, etc, for determining the RISC/CISC criteria. Some of the important criteria are listed below: Greater number of Instructions Tstntion pipelining and increised execution speed Orthogonal instruction set (Allows euch insruction to ‘operate on any register an vse any addressing mode) Operations are performed on registers only, the only ‘memory operations ae lood and store ‘A large number of registers are available Programmer needs to write mors code o execute task since the instructions are simpler ones Single, fixed length instructions Less icon usage and pin count With Harvard Architecrore ‘Generally no insinctioa pipelining feature ‘Neo-ortogonat instruction set (AU instructions are not allowed (o operite on aay reisterand use any addressing ode, {cis instrucion-specitic) Operations are performed on regiitérs or memory spending os the instruction Limited numberof general purpose registers Incructions are like macros nC langusge: A programmer ‘can achiove the desized functionality with 2 single Instruction which i sara providesthe effext of sing more ‘simpler single instntions in RISC ‘Variable length instuetons ‘More silicon usage since more additional devoder logic is ‘ojulted to implement the complex instruction decoding. Can be Harvard or Vou: Neumann Architecture | hope now you are clear about the terms RISC and CISC in the processor technology. Isn't it? ‘Dla ira Regiere trademart of Analog Deve ne ‘The Typical Embedded System = 2.1.1.7 Harvard vs. Von-Neumann Processor/Controller Architecture The terms Harvard and Von-Neumann refers to the processor architecture design, Microprocessors/controllers hased on the Von-Neumana architecture shares a single common bus for fetching both instructions and data. Program instructions and data are stored ia a common memory. Voa-Neumann architecture based processorsiconirollers first fetch an instruction and then fetch the data to support the instruction from code memory. The two separate fetches slows down the controller's operation. Von-Neumann architecture is also referred as Princeton architecture, since i! was developed by the Princeton University Microprocessors/controllers based on the Harvard architecture will have separate data bus and in- struction bus. This allows the data transfer and program fetching to oocur simultaneously cn both buses. With Harvard architecture, the data memory can be read and written while the program memory is being accessed. These separated data memory and code memory buses allow one instruction to execute whil the next instruction is fetched (“pre-fetching”). The pre-feich theoretically allows much faster exec: than Von-Neumann architecture. Since some additional hardware logic is required for the generation of control signals for this type of operation it adds silicon complexity tothe system, Figure 2.2 explains the Harvard and Von Neumann architseture concept ) a] Ga tit, | Single shared bus arvardvsVorNenmann archtectre ‘The following table highlights the differences between Harvard and Von-Neumann architecture. Harvard Architecture ‘Von-Neamann Atchltecture Separate buses for instraction and data fetching Single shared bus for itstruction and data fetching Easier to pipeline, so high performance canbe achieved” Low performance compare to Harvaatarchitectare Comparatively high cost Cheaper [No merry aijnent problems ‘Alois ei noaifving Os" Since data memory end progam. memory are stored Since dati’ memory and prognm memory are stored Physically in different locations, no chances for accidental physically In the sate chip, chances for accidental ‘commapton of program rcnsery Sonuption of progesn wexry 2.1.1.8 Big-Endian vs. Litlle-Endian Processors/Controllers _Endianness specifies the order in which the data is stored in the memory by processor operations in a multi byte system (Processors whose word size is greater than one byte). Suppose the word length is two byte then data can be siored in memory in two different ways: 1, Higher order of data byte at the the higher memory. 2. Lower order of data byte at the higher memory and higher order of data byte at location just below the higher memory. her niemory and lower order of data byte at location just below (Selfimodiiving sode «a cadonsimscton which noses sll wile excemion. a inn beaten Little-endian (Fig. 2.3) means the lower-order byte of the data is stored in memory at the lowest ad- dress, and the higher-order byte at the highest address. (The little end comes first.) For example, a4 byte ong integer Byte3 Byte2 Byte Byte0 will be stored in the memory as shown below: Bae Adiress +0 Byte 0 Byte | 0x20000(Base Address } Base Adiress+1 Byte | Ryte 1 | 0520001 (Base Address + 1) Bae Adiress+2 Byte? Byte2 | 020002 (Base Address + 2) Bae Adiress+3 Byte 3 Byte3 | 020003 (Base Address + 3) Uittle-Endian operation Big-endian (Fig. 2.4) means the higher-order byte of the data is stored in memory at the lowest address, and the lower-order byte at the highest address. (The big end comes first.) For example, a 4 byte long integer Byte3 Byte? Byte! Byte0 will be stored in the memory as follows*: Base Addeess+0 Byte | Byte3 | 0420000 (Base Address) Base Address +1 Bye 2 | Byte? | +2001 (Base Address + 1) Base Address +2 Bye 1 | ByfeT | 020002 (Base Address + 2) Base Address +3 Bye | Byle0 | 20003 (Base Address + 3) (e20) mig-Enaianopertion 2.1.1.9 Load Store Operation and Instruction Pipelining As mentioned earlier, the RISC pro- cessor instruction set is orthogonal, meaning jt operates on registers. The memory access related opera- tions are performed by the special instructions foad and store. If the operand is specified as memory location, the content of it is loaded to a register using the foad instruction. The instruction store stores data fiom a specified register to a specified memory location. The concept of Load Store Architecture isitlustrated with the following example: ‘Suppose x, y and = are memory locations and we want to add the contents of x and and store the result in location 2. Under the load store architecture the same is achieved with 4 instructions as shown in Fig, 2.5 ‘The first instruction Joad R1, x loads the register RU with the content of memory location x, the sec~ ‘ond instruction Joad R2y loads the register R2 with the content of memory location y. The instruction "FNowe atthe aero ic de arity a 020000 ‘The Typical Embedded Syste) a capo, + Z I _ ‘ee ,———— Ma tt load R2,y ———> 2 ww Sl {sea n3,tu,n2—> sy. 7 ALU 3 [store 3,2) + 3 I | 1 een eg geese (Fig.2.8) The concept of toad store architecture add R3, RI, R2 adds the content of registers RI and R2 and stores the result in register R3. The next instruction store R3.z stores the content of register R3 in memory location 2. ‘The conventional instruction execution by the processor follows the fetch-decode-execute sequence, ‘Where the ‘fetch’ part fetches the instruction from program memory or code memory and the decode part decodes the instruction to generate the necessary control signals. The execute siage reads the oper- ands, perform ALU operations and stores the result. In conventional program execution, the fetch and decode operations are performed in sequence. For simplicity let's consider decode and execution togeth- er. During the decode operation the memory address bus is available and if it is possible to effectively utilise it for an instruction fetch, the processing speed can be increased. In its simplest form instruction pipelining refers to the overlapped execution of instructions. Under normal program execution flow it {is meaningful to fetch the next instruction to execute, while the decoding and execution of the current instruction isin progress. If the current instruction in progress isa program control flow transfer instruc tion like jump or call instruction, there is no meaning in fetching the instruction following the current instruction. In such cases the instruction fetched is flushed and a new instruction fetch is performed to fetch the instruction. Whenever the current instruction is executing the program counter will be loaded with the address of the next instruction. In case of jump or branch instruction, the new location is known only after completion ofthe jump or branch instruction. Depending on the stages involved in an instruc- tion (fetch, read register and decode, execute instruction, access an operand in data memory, write back the result to register, etc, there can be multiple levels of instruction pipelining. Figure 2.6 ilustrates the concept of Instruction pipelining for single stage pipelining. co cepa sere S pies Peru JUL UU UL] [Machine eyelet | ~ Machine eyele 2 ‘Machine cycle 3 Fact C) Bescue(®C=1)_ | FAPC Tamia PO) | FaenPOTaD PC: Program Counter Baeeuie (PC> 1) (CGD) ie agian ping once inn me 2.1.2 Application Specific Integrated Circuits (ASICs) Application Specific Integrated Circuit (ASIC) is a microchip designed to perform a specific or unique ‘application. It is used as replacement to conventional general purpose logic chips, It integrates several functions into a single chip and there by reduces the system development cost. Most of the ASICs are ‘proprietary products. Asa single chip, ASIC consumes a very small area in the total system and thereby helps inthe design of smaller systems with high capabilites functionalities. ASICs can be pre-fabricated fora special applicationor itcan be custom fabricated by using the com- ponents from a re-usable ‘building block’ library of components for a particular customer application. ‘ASIC based systems are profitable only for large volume commercial productions. Fabrication of ASICs requires a non-refundable initial investment for the process technology and configuration expenses. This investment is known as Non-Recurring Engineering Charge (NRE) and itis a one time investment. If the Non-Recurring Engineering Charges (NRE) is borne by a third party and the Application Specific Integrated Circuit (ASIC) is msde openly available in the market, the ASIC is referred a Application Specific Standard Product (ASSP). The ASSP is marketed to multiple customers just as a ‘general-purpose product is, but io a smaller number of customers since itis for a specific application, “The ADE7760 Energy Metre ASIC developed by Analog Devices for Energy metreing applications is atypical example for ASSP”. ‘Since Application Specific Imegrated Circuits (ASICs) are proprietary products, the developers of such chips may not be interested in revealing the intemal details of it and hence itis very difficult to point out an example ofit. Moreover it will create legal disputes if an illustration of such an ASIC prod- ‘uct is given without getting prior permission from the manufacturer of the ASIC. For the time being, Jet us forget about it. We will come back to it in another part of this book series (Namely. Designing. ‘Advanced Embedded Systems), 2.1.3 Programmable Logic Devices Logie devices provide specific finctions, including device-o-device interfacing, data communication, signal processing, data display, timing and control operations, and almost every other function a system ‘must perform, Logic devices can be classified into two broad categories-fixed and programmable. As the name indicates, the circuits in a fixed logic device are permanent, they perform one function or set of functions-once manufactured, they cannot be changed. On the other hand, Programmable Logic Devices (PLDs) offer customers a wide range of logic capacity, features, speed, and voltage characteris- tics-and these devices can be re-configured to perform any number of functions at any time. With programmable logic devices, designers use inexpensive software tools to quickly develop, sim- tulate, and test their designs. Then, a design can be quickly programmed into a device, and immediately tested in a live circuit. The PLD that is used for this prototyping. is the exact same PLD that will be used in the final production of a piece of end equipment, such as a network router, a DSL modem, a DVD player, or an automotive navigation system. There are no NRE costs and the final design is completed ‘much faster than that of a custom, fixed logic device. Another key benefit of using PLDs is that dur- ing the design phase customers can change the circuitry as often as they want until the design operates to their satisfaction. That’s because PLDs are based on re-writable memory technology-to change the design, the device is simply reprogrammed. Once the design is final, customers can go into immediate production by simply programming as many PLDs as they need with the final software design file. 2.1.3.1 CPLDs and FPGAs The two major types of programmable logic devices are Field Program- mable Gate Arrays (FPGAs) and Complex Programmable Logic Devices (CPLDs). Of the two, FPGAS ‘The Typical Embedded System offer the highest amount of logic density, the most features, and the highest performance. The largest FPGA now shipping, part of the Xilinx Virtex™' line of devices, provides cight million “system gates” (the relative density of logic). These advanced devices also offer features such as built-in hardwired processors (such a5 the IBM power PC), substantial amounts of memory, clock management systems, and support for many of the latest, very fast device-io-device signaling technologies. FPGAS are used ina wide variety of applications ranging from data processing and storage, to instrumentation, telecom- munications, and digital signal processing. CPLDs, by contrast, offer much smaller amounts of logic-up to about 10,000 gates. But CPLDs offer very predictable timing characteristics and are therefore ideal for critical control applications. CPLDs such as the Xilinx CoolRunner™'’ series also require extremely low amounts of power and are very in- expensive, making them ideal for cost-sensitive, battery-operated, portable applications such as mobile Phones and digital handheld assistants. Advantages of PLD Programmable logic devices offer a number of important advantages over fixed logic devices, including: ‘* PLDs offer customers much more flexibility during the design cycle because design iterations are simply a matier of changing the programming file, and the results of design changes can be seen immediately in working parts ‘* PLDs donot require long lead times for prototypes or production parts-the PLDs are already on distributor's shelf and ready for shipment. ‘* PLDs donot require customers to pay for large NRE costs and purchase expensive mask sets-PLD suppliers incur those costs when they design their programmable devices and are able to amonize those costs over the multi-year lifespan of a given line of PLDs. ‘# PLDs allow customers to order just the number of parts they need, when they need them, allowing them to control inventory. Customers who use fixed logic devices often end up with excess inven tory which must be scrapped, or if demand for their produc! surges, they may be caught short of parts and face production delays. PUD ea be regained Gn fire plot. of eyepment biped wo» oxtones is i, thanks to programmable logic devices, a number of equipment manufacturers now tout the at to add new features or upgrade products that already are inthe field. To do this, they simply aploed ‘a new programming file o the PLD, via the Internet, creating new hardware logic in the systema, Over the last few years programmable logic suppliers have made such phenomenal technical ad- vances that PLDs are now seen as the logic solution of choice from many designers. One reason for this is that PLD supplicrs such as Xilinx are “fabless” com instead of owning chip manufactur ing foundries, Xilinx outsource that job to partners like Toshiba and UMC, whose chief occupation is making chips. This strategy allows Xilinx to focus on designing new product architectures, software tools, and intellectual property cores while having access to the most advanced semiconductor process technologies. Advanced process technologies help PLDs in a number of key areas: faster performance, integration of more features, reduced power consumption, and lower cost. FPGAsare especially popular for prototyping ASIC designs where the designer can test his design by downloading the design file into an FPGA device. Once the design is set, hardwired chips are produced for faster performance. Just a few years ago, for example, the largest FPGA was measured in tens of thousands of system ‘gates and operated at 40 MHz. Older FPGAS also were relatively expensive, costing often more than '$150 for the most advanced parts at the time. Today, however, FPGAs with advanced features offer 4 Virte™ tod CoolRunner ™ sre the registered trademarks of Xilinx In. Eh Introduction to Embedded Systens millions of gates of logic capacity, operate at 300 MHz, can cost less than $10, and offer a new level of integrated functions such as processors and memory. 2.1.4 Commercial Off-the-Shelf Components (COTS) A Commercial Off-the-Shelf (COTS) product is one which is used ‘as-is". COTS products are designed in such @ way to provide easy integration and interoperability with existing system components, The COTS component itself may be developed around a general purpose or domain specific processor or an Application Specific Integrated circuit or a programmable logic device. Typical examples of COTS: hardware unit are remote controlled toy car control units ineluding the RF circuitry part, high perfor- mance, high frequency microwave electronics (2-200 GHz), high bandwidth analog-to-digital convert- ‘ers, devices and components for operation at very high temperatures, electro-optic IR imaging arrays, UVARR detectors, etc. The major advantage of using COTS is that they are readily available in the market, are cheap and a developer can cut down his/her development time to a great extent. This in tum reduces the time to market your embedded systems. ‘The TCP/IP plug-in module available from various manufactures like “WIZnet’, ‘Freescale’, ‘Dynalog’, etc. are very good examples of COTS product (Fig. 2.7). This network plug-in module gives the TCP/IP connectivity to ‘the system you are developing. There is noneed to design this module yourself and write the firmware for the TCP/ IP protocol and data transfer. Everything will be read- ily supplied by the COTS manufacturer, What you need to do is identify the COTS for your system and give the jlug-in option on board according to the hardware Pigs comecions givn In tie speciation ef ie En ceampl of COPS pact for COTS. Though multiple vendors supply COTS for the nog > pop rvioncap same application, the major problem faced by the end- {1 ites ha mmnsnecacnd user is that there are no operational and manufacturing standards, A Commercial off-the-shelf (COTS) component manufactured by a vendor need not have hardware plug-in and firmware interface compatibility with one manufactured by a second vendor for the same application. This restricis the end-user to stick to & particular vendor for a particular COTS. This greatly affects the product design. The major drawback of using COTS components in embedded design is that the manufacturer of the COTS component may withdraw the product or discontinue the production of the COTS at any time if a rapid change in technology occurs, and this will adversely affect a commercial manufacturer of the ‘embedded system which makes use of the specific COTS product. 2.2 MEMORY ‘Memory is an important part of a processor/controller based embedded systems. Some of the proces- sors/controlfers contain built in memory and this memory is referred as on-chip memory, Others do not contain any memory inside the chip and requires external memory to be connected with the control- ler/processor to store the control algorithm. [tis called off-chip memory. Also some working memory is required for holding data temporarily during certain operations. This section deals with the different types of memory used in embedded system applications. ‘The Typical Embedded System B23 2.2.1 Program Storage Memory (ROM) ‘The program memory or code storage memory of an embedded system stores the program instructions and it ean be classified into different types as per the block diagram representation given in Fig. 2.8 Masked ROM (MROM) Fig.28) Classification of Program Memory (ROM) ‘The code memory retains its contents even afer the power to itis tumed off. It is generally known as non-volatile storage memory. Depending on the fabrication, erasing and programming techniques they are classified into the following types. 2.2.1.1 Masked ROM (MROM) Masked ROM is a one-time programmable device, Masked ROM ‘makes use of the hardwired technology for storing data. The device is factory programmed by masking and metallisation process at the time of production itself, according to the data provided by the end user. ‘The primary advantage of this is low cost for high volume production. They are the least expensive type of solid state memory. Different mechanisms are used for the masking process of the ROM, like 1. Creatiow of an enhancement or depletion mode transistor through channel implant. 2. By creating the memory cel either using a standard transistor or high threshold transistor. Inthe high threshold mode, the supply voltage required to tum ON the transistor is above the normal ROM IC operating voltage. This ensures that the transistor is always off and the memory cell stores always log ). Masked ROM is a good candidate forstoring the embedded firmware for low cost embedded devices. ‘Once the design is proven and the firmware requirements are tested and frozen, the binary data (The firmware eross compiled/assembled to target processor specific machine code) comesponding 10 it can be given to the MROM fabricator, The limitstion with MROM based firmware storage isthe inability to modify the device firmware against firmware uperades, Since the MROM is permanent in bit storage, it is not possible to alter the bit information. 2.2.1.2 Programmable Read Only Memory (PROM) /(OTP) Unlike Masked ROM Memory, ‘One Time Programmable Memory (OTP) or PROM is not pre-programmed by the manufacturer. The ‘end user is responsible for programming these devices. This memory has nichrome or polysilicon wires arranged in a matrix. These wires can be finctionally viewed as fuses. It is programiued by a PROM programmer which selectively burns the fuses according tothe bit pater to be stored. Fuses which are not blown/bumed represents a logic “1” whereas fuses which are blown/bumed represents a logic “O". ‘The default state is logic “I”. OTP is widely used for commercial production of embedded systems ‘whose proto-typed versions are proven and the code is finalised. Itis a low cost solution for commercial production. OTPs cannot be reprogrammed, a dns nde Se 2.2.1.3 Erasable Programmable Read Only Memory (EPROM) OTPs are not useful and worth for development purpose. During the development phase the code is subject to continuous chang- sand using an OTP each time to load the code is not economical. Erasable Programmable Read Only ‘Memory (EPROM) gives the flexibility tore-program the same chip. EPROM stores the bit information by charging the floating gate of an FET. Bit information is stored by using an EPROM programmer, which applies high voltage to charge the floating gate. EPROM contains a quartz crystal window for erasing the stored information. If the window is exposed to ultraviolet rays for a fixed duration, the entire memory will be erased. Even though the EPROM chip is flexible in terms of re-programmability, itneeds to be taken out of the circuit board and put in a UV eraser device for 20 to 30 minutes. So itis tedious and time-consuming process. 2.2.1.4 Electrically Erasable Programmable Read Only Memory (EEPROM) As the name indicates, the information contained in the EEPROM memory can be altered by using electrical signals at the register/Byte level. They can be erased and reprogrammed in-circuit. These chips include a chip ‘erase mode and in this mode they can be erased in a few milliseconds. It provides greater flexibility for system design. The only limitation is their capacity is limited when compared with the standard ROM (A few kilobytes). 2.2.1.5 FLASH FLASH is thelatest ROM technology and is the 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 organ- ised as sectors (blocks) of pages. FLASH memory stores information in an array of floating gate MOS- FET transistors. The erasing of memory can be done at sector level or page level without affecting the other sectors or pages. Each sector/page should be erased before re-prozramming. The typical erasable capacity of FLASH is 1000 cycles. W27C512 from WINBOND (ww.w.winbond.com) is an example of ‘64KB FLASH memory. 2.2.1.6 NVRAM Non-voiatile 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 single package. The life span of NVRAM is expected to be around 10 years. DS/6#4 from MaxinvDallas is an example of 32KB NVRAM. 2.2.2 Read-Write Memory/Random Access Memory (RAM) RAM js the data memory or working memory of the controller/processor, Controller/processor can read from it and write to it. RAM is volatile, meaning when the power is turned off, all the contents are destroyed. RAM is a direct access memory, meaning we can access the desired memory location directly without the need for traversing through the entire memory locations to reach the desired ‘memory position (ie. random access of memory location). 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. Magnetic tapes, CD ROMs, ete. are examples of sequential access ‘memories. RAM generally falls into three categories: Static RAM (SRAM). dynamic RAM (DRAM) __ and non-volatile RAM (NVRAM) (Fig. 29). 2.2.2.1 Static RAM (SRAM) Static RAM stores data in the form of voltage. They are made up of flip-flops. Static RAM is the fastest form of RAM available. In typical implementation, an SRAM cell (bit) is realised using six transistors (or 6 MOSFETs). Four of the transistors are used for building the ‘The Typical Embedded System p39 Read Write Memory (RAM) Classitieationot Working Memory (AM Iatch (Aip-flop) part of the memory cell and two for controlling the access. SRAM is fast in operation due to its resistive networking and switching capabilities. In its simplest representation an SRAM cell can be visualised as shown in Fig. 2.10: Bit Line B\ Bit Line B SRAM cal plementation This implementation in its simpler form can be visualised as two-cross coupled inverters with read/ write control through transistors, The four transis tors in the middle form the cross-coupled inverters. Data wo This can be visualised as shown in Fig. 2.11 ‘write From the SRAM implementation diagram, itis clear that access to the memory cell is controlled by the line Word Line, which controls the access transistors (MOSFETs) Q5 and Q6. The access tan- (73.23) Vieealfeation of SRAM cell sistors control the connection to bit Hines B & B\. In ‘order to writea value to the memory cell, apply the desi make B= | and B\=0; For writing 0, make B= 0 and B\ Write conrol Read control value to the bit control lines (For writing 1, =1) and assect the Word Line (Make Word line A, Introduction to Embedded Systems high). This operation latches the bit written in the flip-flop. For reading the content of the memory cell, assert both B and B\ bit lines to 1 and set the Word line to 1. ‘The major limitations of SRAM are low capacity and high cost. Sinee a minimum of six transistors are required to build a single memory cell, imagine how many memory cells we can fabricate on a sili- con water 2.2.2.2 Dynamic RAM(DRAM) Dynamic RAMstoresdata — in the form of charge. They are made up of MOS transistor gates. The advantages of DRAM are its high density and low cost compared to SRAM. The disadvantage is that since the information is stored ss charge it gets leaked off with time and Word tine 10 prevent this they need to be refreshed periodically. Special circuits called DRAM controllers are used for the refreshing ‘operation. The refresh operation is done periodically in mil " seconds interval. Figure 2.12 illustrates the typical implementa T tion of a DRAM cell. > ‘The MOSFET acts as the gate for the incoming and outgo- x ing data whereas the capacitor acts as the bit storage unit, Table aa given below summarises the relative merits and demerits of SRAM and DRAM technology. SRAM cell DRAM ceil Male un of 6 CMOS transistors (MOSFET) Made up ofa MOSFET ana capacitor Doesn't equite refreshing Regios rereshing Low capacity (Less dense) igh capacity Highly dense) More expensive oss expensive Fastin operation. Typical acees time is 10ns Slow in operation due to reffesh requirements, Typical access time is 6Ons. Write operation is faster than read speraton 2.2.2.9 NVRAM Non-volatile RAM is a random access memory with battery backup. It coniains 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 single package. NVRAM is used for the non-volatile storage of results of operations or for setting up of flags, etc. The life span OE NVRAM is expend tobe acand 10 yea. DSIT44 fom MaimDalls isan rampls for 32KB 2.2.3 Memory According to the Type of Interface ‘The interface (connection) of memory with the processoricontroller can be of various types. It may be 1 parallel interface {The perallel data lines (D0-D7) for an 8 bit processor/controller will be connected 10 D0-D7 of the memory] or the interface may be a serial interface like I2C (Pronounced as T Square C. Itisa 2 line serial interface) or it may be an SPI (Serial peripheral interface, 2n line interface where nn stands for the total number of SPI bus devices in the system). It can also be of a single wire intercon- nection (like Dallas 1-Wire interface), Serial interface is commonly used for data storage memory like EEPROM. The memory density of a serial memory is usually expressed in terms of kilebits, whereas ‘The Typical Embedded System 133 4 that of a parallel interface memory is expressed in terms of kilobytes, Atmel Corporations AT24C512 is an example for serial memory with capacity 512 kilobits and 2-wire interfuce. Please refer 10 the section ‘Communication Interface’ for more details on 12C, SPI and 1-Wire Bus. 2.2.4 ‘Memory Shadowing Generally the execution of a program ora configuration from a Read Only Memory (ROM) is very slow (120 t0 200 ns) compared to the execution from a random access memory (40 10 70 ns). From the time ing parameters itis obvious that RAM access is about three times as fast as ROM access. Shadowing of memory is a technique adopted to solve the execution speed problem in processor-based systems. In computer systems and video systems there will be a configuration holding ROM called Basic Input ‘Output Configuration ROM or simply BIOS. In personal computer systems BIOS stores the hardware configuration information Tike the address assigned for various serial ports and other non-plug ‘n’ play devices, ete, Usually it is read and the system is configured according to it during system boot up and it is time consuming. Now the manufactures included a RAM behind the logical layer of BIOS at its ‘same address as a shadow to the BIOS and the first step that happens during the boot up is copying the BIOS to the shadowed RAM and write protecting the RAM then disabling the BIOS reading. You may be thinking that what a stupid idea it is and why both RAM and ROM are needed for holding the same data. The answer is: RAM is volatile and it cannot hold the configuration data which is copied from the BIOS when the power supply is switched off. Only a ROM can hold it permanently. But for high system performance it should be accessed from a RAM instead of accessing from a ROM. 2.2.5 Memory Selection for Embedded Systems Embedded systems require a program memory for holding the control algorithm (Fora super-loop based design) or embedded OS and the applications designed to nun on top of it (for OS based designs), data ‘memory for holding variables and temporary data during task execution, and memory for holding non- ‘volatile data (like configuration data, look up table etc) which ate modifiable by the application (Unlike program memory. which is non-volatile as well unalterable by the end user). The memory requirement for an embedded system in terms of RAM and ROM (EEPROM/FLASH/NVRAM) is solely dependent fon the type of the embedded system and the applications for which it is designed. There is no hard and fast rule for calculating the memory requirements. Lot of factors need to be considered when selecting the type and size of memory for embedded system. For example, if the embedded system is designed using SoC or a microcontroller with on-chip RAM and ROM (FLASH/EEPROM), depending on the ap- plication need the on-chip memory may be sufficient for designing the total system. AS a rule of thumb, identify your system requirement and based on the type of processor (SoC or microcontroller with on- chip memory) used for the design, take a decision on whether the on-chip memory is sufficient or exter- nal memory is required. Let's consider a simple clectronic toy design as an example. As the complexity of requirements are less and data memory requirement are minimal, we can think of a microcontroller with a few bytes of internal RAM, a few bytes or kilobytes (depending on the number of tasks and the complexity of tasks) of FLASH memory and a few bytes of EEPROM (if required) for designing the system, Hence there is no need for external memory at all, A PIC microcontroller device which satisfies the /O and memory requirements can be used in this ease. Ifthe embedded design is based on an RTOS, the RTOS requires certain amount of RAM for its execution and ROM for storing the RTOS image (Image is the common name givea for the binary data gencratcd by the compilation of all RTOS source files). Normally the binary code for RTOS kemel containing all the services is stored in a non-volatile memory (Like FLASH) as either compressed or non-compressed data. During boot-up of the device, a Introdction to Embeckted Systems the RTOS files are copied from the program storage memory, decompressed if required and then loaded to the RAM for execution. The supplier of the RTOS usually gives a rough estimate on the run time RAM requirements and program memory requirements for the RTOS. On top of this add the RAM requirements for executing user tasks and ROM for storing user applications, On a safer side, always add a buffer value to the total estimated RAM and ROM size requirements. A smart phone device with ‘Windows mobile operating system isa typical example for embedded device with OS. Say 64MB RAM and 128MB ROM are the minimum requirements for running the Windows mobile device, indeed you need extra RAM and ROM for running user applications. So while building the system, count the memory for that also and arrive at a value which is always at the safer side, so that you won’t end up in a situation where you don’t have sufficient memory to install and run user applications, There are two parameters for representing a memory. The first one is the size of the memory chip (Memory density expressed in terms of number of memory bytes per chip). There is no option to get a memory chip with the exact required number of bytes. Memory chips come in standard sizes like $12bytes, 1024bytes (1 kilobyte), 2048bytes (2 kilobytes), 4Kb," Kb, 16Kb, 32Kb, 64Kb, 128K, 256%, $12Kb, 1024Kb (1 megabytes), ete. Suppose your embedded application requires only 750 bytes of RAM, you don’t hhave the option of getting a memory chip with size 750 bytes, the only option left with is to choose the memory chip with a size closer to the size needed. Here 1024 bytes is the least possible option. We cannot go for 512 bytes, because the minimum requirement is 750 bytes. While you select a memory size, always keep in mind the address range supported by your processor. For example, for a processor controller with 16 bit address bus, the maximum number of memory locations that can be addressed is 2!6 = 65536 bytes = 64Kb. Hence it is meaningless to select a 128Kb memory chip for a processor with 16bit wide address bus. Also, the eatire memory range supported by the processor/controller may not be available to the memory chip alone. It may be shared batween LO, other ICs and memory. Suppose the address bus is 16bit wide and only the lower 32Kb address range is assigned to the memory chip, the memory size maximum required is 32Kb only. It is not worth to use a memory chip with size 64K in such a situation. The second parameter that needs to be considered in selecting a memory is the word size of the memory. The word size refers to the number of memory bits that can be read\rite together ata time. 4, 8, 12. 16, 24, 32, etc. are the word sizes supported by memory chips. Ensure that the word size supported by the memory chip matches with the data bus width of the processor/controllet. FLASH memory is the popular choice for ROM (program storage memory) in embedded applica- tions. It is a powerful and cost-effective solid-state siorage technology for mobile electronics devices and other consumer applications. FLASH memory comes in two major variants, namely, NAND and NOR FLASH. NAND FLASH is a high-density low cost non-volatile storage memory. On the other hand, NOR FLASH is less dense and slightly expensive. But it supports the Execute in Place (XIP) technique for program execution. The XIP technology allows the execution of code memory from ROM itself without the need for copying it to the RAM as in the case of conventional execution method. It is 1 good practice to use a combination of NOR and NAND memory for storage memory requirements, where NAND can be used for storing the program code and or data like the data captured in a camera device. NAND FLASH doesn’t support XIP and if NAND FLASH is used for storing program code, a DRAM ean be used for copying and executing the program code, NOR FLASH supports XIP and it can be used as the memory for bootloader or for even storing the complete program code. ‘The FEPROM data storage memory is available as ether serial interface or parallel interface chip. If the processoricontroller of the device supports serial interface and the amount of data to write and read to and from the device is less, itis better to have a serial EEPROM chip. The serial EEPROM saves the address space of the total system. The memory capacity of the serial EEPROM is usually expresse Tee Ritotes The Typical Embedtied System ih bits or kilobits. $12 bits, IKbits, 2Kbits, 4Kbits, ete. are examples for serial EEPROM memory repre- sentation. For embedded systems with low power requirements like portable devices, choose low power memory devices. Ceriain embedded devices may be targeted for operating a extreme environmental conditions like high temperature, high humid area, etc. Select an industrial grade memory chip in place of the commercial grade chip for such devices. 2.3 SENSORS AND ACTUATORS AL the very beginning of this chapter it is already mentioned that an embedded system is in constant interaction with the Real world and the controlling/monitoring functions executed by the embedded system is achieved in accordance with the changes happening to the Real world. The changes in sys- ‘tem environment or variables are detected by the sensors connected to the input port of the embedded system. Ifthe embedded system is designed for any controlling purpose, the system will produce some cchanges in the controlling variable to bring the controlled variable to the desired value. Itis achieved through an actuator connected to the output port of the embedded system. If the embedded syste designed for monitoring purpose only, then there is no need for including an actuator in the system. For ‘example, take the case of an ECG machine, It is designed to monitor the heart beat status of a patient and it cannot impose a control over the patient’s heart beat and its order. The sensors used here are the different electrode sets connected to the body of the patient. The variations are captured and presented to the user (may be a doctor) through a visual display or some printed chart 2.3.1 Sensors Assensor is a transducer device that converts energy from one form to another for any measurement or control purpose. This is what I “by-hearted” during my engineering degree from the transducers paper. If we look back to the “Smart” running shoe example given at the end of Chapter 1, we can identify that the sensor which measures the distance between the cushion and magnet in the smart running shoe isa magnetic hall effect sensor (Please refer back), 2.3.2 Aetuators Actustor isa form of transducer device (mechanical or electrical) which converts signals o correspond- ing physical action (motion). Actuator acts as an output device. Looking back to the “Smart” running shoe example given at the end of Chapter |, we can see that the gctuaior sed fr adjusing the positon ofthe cushioning element amier stepper moto Pease eer back). 2.3.3 The I/O Subsystem The 1/0 subsystem of the embedded system facilitates the interaction of the embedded system with the external world. As mentioned earlier the interaction happens through the sensors and actuators connect ed to the input and output ports respectively of the embedded system. The sensors may not be directly interfaced to the input ports, instead they may be interfaced through signal conditioning and translating systems like ADC, optocoupler, etc. This section illustrates some of the sensors and setuators used in embedded systems and the I/O systems to facilitate the interaction of embedded systems with extemal world, es, Introduction to Embedded Systems 2.3.3.1 Light Emitting Diode (LED) Light Emitting Diode (LED) is an important output device for visual indication in any embedded system. LED can be used as an indicator for the status of various signals or situations. Typical examples are indicating the presence of power conditions like ‘Device ON’, “Battery low’ or “Charging of battery’ for a battery operated handheld embedded devices. Light Emiting Diode is a p-n junction diode (Refer Analog Electron- ics findamenials to refresh your memory for p-n junction diode ©)and it © contains an anode and a cathode. For proper functioning of the LED, the anode of it should be connected to ve terminal of the supply voltage and cathode to the -ve terminal of supply voliage. The current lowing through the LED must be limited toa value below the maximum current that it can conduct. A resister is used in series between the power supply and the LED. ane to limit the current through the LED. The ideal LED interfacing circuit is “LED interfacing, shown in Fi LEDs can be interfaced to the por pin of a processor/controller in two ways. In the first method, the anode is directly connected to the port pin and the port pin drives the LED. In this approach the port pin ‘sources’ current to the LED when the port pin is at logic High (Logic ‘I°). In the second method, the cathode of the LED is connected to the port pin of the processor/controller and the anode to the sup- ply voltage through a current limiting resistor. The LED is turned on when the port pin is at logic Low (Logic 0’). Here the port pin ‘sinks’ current. If the LED is directly connected to the port pin, depending ‘on the maximum current that a port pin can source, the brightness of LED may not be to the required level. In the ascond approach, the current is directly sourced by the power supply and the port pin acts as the sink for current. Here we will get the required brightness for the LED. 2.3.3.2 T-Segment LED Display The 7-segment LED display is an output device for displaying alpha numeric characters. It contains 8 light-emitting diode (LED) segments arranged in a special form. Out of the 8 LED segments, 7 are used for displaying alpha numeric characters and 1 is used for representing ‘decimal point” in decimal number display, Figure 2.14 explains the ar- rangement of LED segments in a 7-segment LED display. ‘The LED segments are named A to G and the deci- mal point LED segment is named as DP. The LED seg- ments A to G and DP should be lit accordingly to display numbers and characters. For example, for displaying the number 4, the segments F, G, B and C are lit. For dis- playing 3, the segments A, B, C, D, G and DPare lt. For displaying the character ‘a’, the segments B, C, D, E and G are lit. All these 8 LED segments need to bbe connected to one port of the processor/controller for displaying alpha numeric digits. The 7-segment LED displays are available in two different configurations, namely; Common Anode and Common Cathode. In the common anode configuration, the anedes of the & segments are connected commonly ‘whereas in the common cathode configuration, the $ LED segments share a common cathode line. Figure 2.15 illustrates the Common Anode and Cathode configurations. Based on the configuration of the 7-segment LED unit, the LED segment’s anode or cathode is con- nected to the port of the processor/controller in the order ‘A’ segment to the least significant por: pin and DP segment to the most significant port pin. Veo ‘The Typical Embedded System ‘Common Anode LED Display Cathode Common Cathode LED Display Common anede and cathode conlgerations of T-egment LED Display ‘The current flow through each of the LED segments should be limited to the maximum value sup- ported by the LED display unit. The typical value for the current falls within the range of 20mA. The ‘current through each segment can be limited by connecting a current limiting resistor to the anode or cathode of each segment. The value for the current limiting resistors can be calculated using the current value from the electrial parameter listing of the LED display. For common eathode configurations, the anode of each LED segment is connected to the port pins of the port to which the display is interfaced. The anode of the common anode LED display is connected to the SV supply voltage through a current limiting resistor and the cathode of each LED segment is con- nected to the respective port pin lines, For an LED segment to lit in the Common anode LED eonfigura- tion, the port pin to waich the cathode of the LED segment is connected should be set at logic 0. z ‘7-segment LED display is a popular choice for low cost 3 LED ‘embedded applications like, Public telephone call monitoring VO interface devices, point of sale terminals, etc. 2.3.3.3 Optocoupler_Optocoupler is solid state device [oto tasinad 10 isolate two parts of a circuit. Optocoupler combines an LED and a photo-transistor in a single housing (package). Figure (Bg-2.10) Anoptocoupler device 2.16 illustrates the functioning of an optocoupler deviee. In electronic circuits, an optocoupler is used for suppressing interference in data communication, circuit isolation, high voltage separation, simultaneous separation and signal intensification, etc. Optocouplers can be used in either input cizeuits or in output circuits. Figure 2.17 ilustrats the usage VO interface ‘Cc ATESES| LED. upstate Be e O’p interface pa Ke Proto wansital eel [ita aT Opeocoupler | sirocostroter Opwcoupler 1eMcTEM fas us Tecra pscorter tn tape and Output ctrutt Eh IneoductonteEnbeated sens of optocoupler in input cireuit and output circuit of an embedded system with a microcontroller as the system core. Optocoupler is available as ICs from different semiconductor manufacturers. The MCT2M IC from Fairchild semiconductor (hitp://www.fairchildsemicomv/) is an example for optocoupler IC. 2.3.3.4 Stepper Motor A stepper motor is an electro-mechanical device which generates diserete displacement (motion) in response to dc electrical signals. It differs from the normal de motor in its ‘operation, The de motor produces continuous rotation on applying de voltage whereas a stepper motor produces discrete rotation in response to the de voltage applied to it. Stepper motors are widely used in industrial embedded applications, consumer clectronic products and robotics control systems. The paper feed mechanism of a printer/fax makes use of stepper motors for its functioning. Based on the coil winding arrangemenis, a two-phase stepper motor is classified into two. They are: 1. Unipolar 2. Bipolar a 1. Unipolar A unipolar stepper motor contains two windings per gtd Oo) NS c phase. The direction of rotation (clockwise or anticlockwise) of stepper motor is controlled by changing the direction of current flow. Current in one direction flows through one coil and in the op- posite direction flows through the other coil. It is easy to shift the Bio direction of rotation by just switching the terminals to which the coils are connected. Figure 2.18 illustrates the working of a two- ‘unipolar stepper motor. TL une eel anc ei nolbnad deny hace woipler sep ‘current in opposite directions for phase 1 (only one of them will be carrying current ata time). Similarly, B and D carry currentin opposite directions for phase 2 (anly one of them will be carrying current at atime). 2.Bipolar A bipolar stepper motor contains single winding per phase. For reversing the motor rota- tion the current flow through the windings is reversed dynamically. It requires complex circuitry for current flow reversal. The stator winding details for a two phase unipolar stepper motor is shown in Fig. 2.19. ‘The stepping of stepper motor can be implemented in different ways by changing the sequence of ac- tivation of the stator windings. The different stepping modes supported by stepper motor are explained below. Full Step _In.the full step mode both the phases are energised simukancously. The coils A, B, C and D are energised in the following order: Step CoA CoB CoC Coll D 1 4H H t L 2 LC 4 H L 3 L L 4 H 4 a L L Ht It should be noted that out of the two windings. only one winding of a phase is energised at atime. ‘The Typical Embedded System B32 Stator Winding details fora 2 Phase unipolar aterper moter Wave Step Inthe wave step mode only one phase is energised at atime and each coils of the phase is energised alternatively. The coils A, B, C and D are energised in the following order: Step CoA CoB Ca CoD 1 " 1 L L 2 L uw v L 3 I tL Hu L 4 v if L if Half Step _[t uses the combination of wave and full step. It has the highest torque and stability. The coil energising sequence for half step is given below. Step Calf Col GOI Colt 1 a 1 L L 2 " " L L 3 L H c L 4 L H " b 5 L 1 H L 6 B L u u 1 L L L " 8 # L L 8 EL Introduction to Embedded Systems ‘The rotation of the stepper motor can be reversed by reversing the order in which the coil is energised. ‘Two-phase unipolar stepper motors are the popular choice for embedded applications, The current requirement for stepper motor is little high and hence the port pins of a microcontroller’processor may not be able to drive them directly. Also the supply voltage required to operate stepper motor varies normally in the range SV to 24 V. Depending on the current and voltage requirements, special driving circuits are required to interface the stepper motor with microcontroller/processors. Commercial off the-shelf stepper motor driver ICs are available in the market and they can be directly interfaced to the microcontroller port, ULN2803 is an octal peripheral driver array available from ON semiconductors and ST microslecironiss for driving a SV stepper motor. Simple driving circuit can also be built using transistors The following circuit diagram (Fig. 2.20) illustrates the interfacing of a stepper motor through a driver circuit connected to the port pins of a microcontroller/procesior. Interfacing of stopper motor hroagh driver cleat 2.3.3.5 Relay Relay is an electro-mechanical device. In embedded application, the “Relay” unit acts as dynamic path selectors for signals and power. The ‘Relay’ unit contains a relay coil made up of in- sulated wire on a metal core and a metal armature with one or more contacts. ‘Relay’ works on electromagnetic principle. When a voliagc is applicd to the relay coil, current flows through the coil, which in turn generatesa magnetic field. The magnetic field attracts the armature core and moves the contact point. The movement of the contact point changes the power'signal flow path. ‘Relays’ are available in different configurations. Figure 2.21 given below illustrates the widely used relay configurations for embedded applications. a3, 23f ] ‘Single pole single ‘Single pole single Single peal double ‘seesaw ally = a (ERB) etey conngurations ‘The Typical Embedded System pa The Single Pole Single Throw configuration has only one path for information flow. The path is cither open or closed in normal condition. For normally Open Single Pole Single Throw relay, the cir cuit is normally open and it becomes closed when the relay is energised. For normally closed Single Pole Single Throw configuration, the circuit is narmally closed and it becomes open when the relay is energised. For Single Pole Double Throw Relay, there are two paths for information flow and they are selected by energising or de-energising the relay. The Relay is normally controlled using a relay driver circuit connexted to the port pin of the proces- soricontroller. A transisior is used for building the relay driver circuit, Figure 2.22 illustrates the same, pop Sysayaoany 109 Keay =| C ‘Transistorbased Relay driving circuit A free-wheeling diode is used for free-wheeling the voltage produced in the opposite direction ‘when the relay coil is de-energised. The freewheeling diode is essential for protecting the relay and the transistor, Most of the industrial relays are bulky and requires high voltage to operate. Special relays called ‘Reed’ relays are available for embedded application requiring switching of low voltage DC signals. 2.3.3.6 Piezo Buzzer Piezo buczer isa piezoelectric device for generating audio indications in em- bedded application. A piezoelectric buzzer contains a piezoelectric diaphragm which produces audible sound in response to the voltage applied to it. Piezoelectric buzzers are available in two types. ‘Self> ‘driving’ and “External driving’. The 'Self-driving’ circuit contains all the necessary components to gen- erate sound st a predefined tone. It will generate a tone on applying the voltage. External driving piezo bbuzzers supports the generation of different tones. The tone ean be varied by applying a variable pulse train to the piezoelectric buzzer. A piezo buzzer can be directly interfaced to the port pin of the proces- soricontrol. Depending on the driving current requirements, the piezo buzzer can also be interfaced using a transistor based driver circuit as in the case ofa *Relay”. 2.3.3.7 Push Button Switch It is an input device. Push button switch comes in two configurations, namely “Push o Make" and ‘Push to Break’. In the “Push to Make" configuration, the switch is normally in the open state and it makes a circuit contact when it is pushed or pressed. In the "Push to Break’ con figuration, the switch is normally in the closed state and it breaks the circuit contact when itis pushed ‘or pressed, The push button stays in the ‘closed" (For Push to Make type) or ‘open’ (For Push to Break type) state as long as it is kept in the pushed state and it breaks/makes the circuit connection when it BB Introductio to Embedded Systm is released. Push button is used for generating a mo- Vee Vee imeniary pulse. In embedded application push button is generally used as reset and start switch and pulse ] eneratot. The Push button is normally connected to the port pin of the host processor/controller. Depend- port pin Port pin ing on the way in which the push button interfaced to the controller, it can generate either a ‘HIGH’ pulse or KE a ‘LOW’ pulse. Figure 2.23 illustrates how the push J button can be used for generating LOW’ and “HIGH’ pulses 2.3,3.8 Keyboard Keyboard is an input device “LOW” Pulse genervor HUGH" Pulse generator for user intrfacing. If the number of keys required és vay limited, pish button switches can bo used and. E229) Posh basen wettin santtguentions they can be directly interfaced to the pont pins for reading. However, there may be situations demanding a large number of keys for user input (eg. PDA device with alpha-numeric Keypad for user data entry). In such situations it may not be possible to inter- face each keys to a por pin due to the limitation in the number of general purpose port pins available for the processoriconioller in use and moreover itis wastage of port pins. Matrix keyboard is an optimum solution for handling lange key requirements. t greatly reduces the number of interface comnections. For example, for interfacing 16 keys, inthe direct interfacing technique 16 port pins are required, whereas in the matric keyboard only 8 Fines are required, The 16 keys are arranged in a 4 columa x 4 Row matrix Figure 2.24 illustrates the connection of Keys in a matrix keyboard. in matrix keyboard, the keys are arranged in matrix fashion (ie. they are connected in @ row and column style). For detecting a key press, the keyboard uses the scanning technique, where each row of the matric is pulled low and the columns are read. After reading the status of each columns correspond- ing to.a row, the row ix pulled high and the next row is pulled low and the status ofthe columns are read This process is repeated until the scanning for all rows are completed. When a row is pulled low and if a key connected to the row is pressed, reading the column to which the key is connected will give logic 0, Since keys are mechanical devices, there i a possibility for de-bounce issues, which may give mul- tiple key press effect fora single key press, To prevent this, a proper key de-bouneing technique should be applied. Hardware key de-bouncer circuits and software key de-botnce techniques are the key de- bouncing techniques available. The software key de-bouncing technique doesn't require any aldtional hardware and is easy to implement. In the software de-bouncing technique, on detecting 2 key-press, the key is read again after a de-bounce delay. Ifthe key press is genuine one, the state of the key will remain as ‘pressed’ on the second read also, Pull-up resistors are connected to the column lines to limit the curren that flows wo the Row line ona key press, 2.3.3.9 Prograramable Peripheral Interface (PPI) Programmable Peripheral Interface (PPI) devices are used for extending the /O capabilities of processors/controllers. Most of the processors! controllers provide very limited number of /O and data ports and at times it may require more number of 10 ports than the one supported by the controller/processor. A programmable peripheral interface device expands the /O capabilities of the processoricontroller. 825544 is a popular PPI device for Sbit processors/controllers. 82554 supports 24 1/0 pins and these VO pins ean be grouped as either three ‘8-bil paraliel ports (Port A, Port B and Port C) or two Sbit paraile! ports (Port A and Port B) with Port C in any one of the following configurations: Tae Typical Embeckied System a4 Vee To microcontwller processor port ‘To microcontroller /processor port ‘Matric keyboard Tateracing 1. As8 individual 1/0 pins 2, Two Abit ports namely Port Cupper (Cy) and Port Chower (C) ‘This is configured by manipulating the control register of $2534. The control register holds the con- figuration for Port A, Port B and Port C. The bit details of control register is given below: D7 Dé bs pay ps D2 bi Do ‘The table given below explains the meaning and use of each bit. Bit Description po Port C Lower (C,) /0 mode selector DO= 1; Sets C, as input port DO =0; Sets C; as output port Di Tort B 1/0 mode selector ‘DI =1; Sets port B as input port D1 =0; Sets pon B as ouput port DS, D6 D7 Introduction to Embedded Systems Mode selecior for port C lower and pot B D2=0; Mode 0— Port B functions as Sbit /O Port. Port C lower functions as 4bit port. D2= 1; Mode 1 — Handshake mode, Port B uses 3 bits of Port C as handshake signals ‘Port C Upper (Cy) VO mode selector “D3 = 1; Sets C,yas input port D3=0; Sets Cyas output por Port A 1/0 mode selector D4= 1, Sets Port Aas input port D4=0, Sets Port A as output port “Mode selecior for port C upper and port A D6 D5= 00; Mode 0 ~ Simple /0 mode D6 DS = 01; Mode 1 - Handshake mode. Port A uses 3 bits of Port C as handshake signals D6DS5= 1X; Mode 2, X can be 0 or 1 = Port A functions as bi-directional port ‘Control/Data mode selector for port C DI= 1; VO mode. Bit setteset (BSR) mode, Functions as the control/satus lines for ports A and B. “The bits of port C can be set or reset just as iF they were output ports. Please refer to the 82554 datasheet available at http://www. intersil con/data/fn/fn2969.pdf for more ddctals about the different operating modes of 8255. Figure 2.25 illustrates the generic interfacing of a 82554 device with an it processoricontroller with 16bit address bus (Lower order Address bus is multiplexed with data bus). ay 5 Cin See nee Pins 341027 ey . Higher order rae — oe {AS ALS) decoder os ¢ oy |_—_________lapins ont ae Interfacing of #255 with an @ it microcontroller ‘The ports of 8255 éan be configured for different modes of operation by the processor/controller. ‘The Typical Embedded System 2.4 COMMUNICATION INTERFACE Communication interface is essential for communicating with various subsystems of the embedded system and with the external world. For an embedded product, the communication interface can be Viewed in two different perspectives; namely; Device/board level communication interface (Onboard Communication Interface) and Product level communication interface (Extermal Communication Inter- face). Embedded product is a combination of different types of components (chips/devices) arranged on 4 printed cireuit board (PCB). The communication channel which interconnects the various components within an embedded product is referred as device/board level communication interface (onboard com- munication interface). Serial interfaces like 12C, SPI, UART, 1-Wire, ete and parallel bus interface are examples of ‘Onboard Communication Interface Some embedded systems are self-contained units and they don’t require any interaction and data transfer with other sub-systems or extemal world, On the other hand, certain embedded systems may be «part ofa large distributed systemand they require interaction and data transfer between various devic- es and sub-modules, The ‘Product level communication interface’ (External Communication Interface) 's responsible for dats transfer between the embedded system and other devices or modules. The exter- nal communication interface can be either a wired media or a wireless media and it can be a serial or a parallel interface. Infrared (IR), Bluetooth (BT), Wireless LAN (Wi-Fi), Radio Frequency waves (RF), GPRS, etc. are examples for wireless communication interface. RS-232C/RS-422/RS-485, USB, Eth- emet IEEE 1394 port, Parallel port, CF-I interface, SDIO, PCMCIA, ete. are examples for wired inter- faces. It is not mandatory that an embedded system should contain an external communication interface, Mobile communication equipment is an example for embedded system with external communication interface, ‘The following section gives you an overview of the various ‘Onboard’ and “External” communica tion interfaces for an embedded product. We will discuss about the various physical interfece, firmware requirements and initialisation and communication sequence for these interfaces in a dedicated book titled “Device Interfacing’, which is planned under this series. 2.4.1 Onboard Communication Interfaces Onboard Communication Interface refers to the different communication channels/buses for intercon- necting the various integrated circuits and other peripherals within the embedded system. The following section gives an overview of the various interfaces for onboard communication. 2.4.1.1 Inter Integrated Circuit (2C) Bus The Inter Integrated Circuit Bus 12C-Pronounced “T squiare C*) is a synchronous bidirectional half duplex (one-directional communication at a given point of time) two wire serial interface bus. The concept of 12C bus was developed by “Philips semi- conductors’ in the early 1980s. The original intention of 12C was to provide un easy way of connection between a microprocessor/microcontroller system and the peripheral chips in television sets. The I2C bus comprise of two bus lines, namely; Serial Clock-SCL and Serial Data-SDA. SCL line is respon- sible for generating synchronisation clock pulses and SDA is responsible for transmitting the serial data across devices. 12C bus isa shared bus system to which many numiber of I2C devices can be connected. Devices connected to the I2C bus can act as either ‘Master’ device or ‘Slave’ device. The ‘Master device is responsible for controlling the communication by inititing/terminating data transfer, sending data and generating necessary synchronisation clock pulses. ‘Slave’ devices wait for the commands Introduction to Embedded Systems from the master and respond upon receiving the commands. ‘Master’ and ‘Slave’ devices can act as cither transmitter or receiver. Regardless whether a master is acting as transmitter or receiver, the syn- cchronisation clock signal is generated by the ‘Master’ device only. 12C supports raulti masters on the same bus. The following bus interface diagram shown in Fig. 2.26 illustrates the connection of master ‘and slave devices on the 12C bus. SCL SDA ve uw RC bus (Fo29 src es toertacing, ‘The 12C bus interface is built around an input buffer and an open drain or collector transistor. When ‘the bus is in the idle state, the open drain/collector transistor will be in the floating state and the output lines (SDA and SCL) switch to the ‘High Impedance’ state. For proper operation of the bus, both the bus lines should be pulled to the supply voltage (+SV for TTL family and +3.3V for CMOS family devices) ‘using pull-up resistors. The typical value of resistors used in pull-up is 2.2K. With pull-up resistors, the ‘output lines of the bus in the idle state will be “HIGH’, ‘The address of a 12C device is assigned by hardwiring the address lines of the device to the desired logic level. The address to various 12C devices in an embedded device is assigned and hardwired at the ‘time of designing the embedded hardware. The sequence of operations for communicating with an 12C slave device is listed below: 1, The master device pulls the clock line (SCL) of the bus to “HIGH" 2. ‘The master device pulls the data line (SDA) ‘LOW’, when the SCL line is at logic ‘HIGH’ (This is the ‘Start’ condition for data transfer) 3 3. ‘The master device sends the addess (7 bit or 10 bit wide) of the ‘slave" device to which it wants te communicate, over the SDA line. Clock pulses are generated at the SCL line for synchronising the bit reception by the slave device. The MSB of the data is always transmitted first. The data in the bus is valid during the HIGH’ period of the clock signal ‘The Typical Embedded System 4. The master device sends the Read or Write bil (Bit value = 1 Read operation; Bit value = 0 Write operation) according to the requirement 5. The master device waits for the acknowledgement bit from the slave device whose address is sent fon the bus along with the Read/Write operation command, Slave devices connected to the bus compares the address received with the address assigned to them 6. The slave device with the address requested by the master device responds by sending an ac- knowledge bit (Bit value= 1) over the SDA line 7. Upon receiving the acknowledge bit, the Master device sends the 8bit data to the slave device over SDA line, ifthe requested operation is “Write to device’. Ifthe requested operation is *Read from device", the slave device sends data to the master over the SDA line 8. The master device waits for the acknowledgement bit from the device upon byte transfer complete fora write operation and sends an acknowledge bit to the Slave device for a read operation 9. The master device terminates the transfer by pulling the SDA line “HIGH’ when the clock line SCL is at louie “HIGH (Indicating the ‘STOP" condition) 12C bas supporis three different deta rates, They are: Standard mode (Data rate up to 1OOkbits/sec (100 kbps), Fast mode (Data rate up to 400kbits/sce (400 kbps)) and High speed mods (Data rate up to 3.4Mbits’sec (3.4 Mbps)). The firs: generation I2C devices were designed to support data rates only up to 100kbps. The new generation 12C devices are designed to operate at data rates up to 3.4Mbits/sev. 2.4.1.2 Serial Peripheral Interface (SPI) Bus ‘The Serial Peripheral Interface Bus (SPI) is a syn- chronous bi-directional full duplex four-wire serial interface bus. The concept of SPI was introduced by Motorola. SPI isa single master multi-stave system. I is possible to have a system where more than one ‘SPI device can be master, provided the condition only one master device is active at any given point of ime, is satisfied. SPI requires four signal lines for communication. They are: Master Out Slave In (MOS): Signal line carrying the data from master to slave device. It is also known as Slave InpuvSlave Data tn (SUSDI) Master In Slave Out (MISO): Signal line carrying the data from slave to master device, It is also known as Slave Output (SO/SDO) Serial Clock (SCLK): Signal line carrying the clock signals Slave Select (SS): Signal line for slave device select. It is an active low signal ‘The bus interface diagram shown in Fig. 2.27 illustrates the connection of master and slave devices ‘on the SPI bus. ‘The master device is responsible for generating the clock signal. It selects the required slave device by asserting the corresponding slave device's slave select signal ‘LOW". The data out line (MISO) of all the slave devices when not selected floats at high impedance stat. ‘The serial data transmission through SPI bus is fully configurable. SPI devices contain a certain set of registers for holding these configurations. The sevial peripheral control register holds the various con- figuration parameters like master/slave selection for the device, baudrate selection for communication, clock signal control, et. The status register hokis the status of various conditions for transmission and reception. ‘SPI works on the principle of “Shift Register’. The master and slave devices contain a special shift register for the data to transmit or receive. The size or the shift register is device dependent. Normally itisa multiple of 8. During transmission from the master (o slave, the data in the master’s shift register is shifted out to the MOS! pin and it enters the shift register ofthe slave device through the MOS! pin of the slave device. At the same time the shifted out data bit from the slave device’s sift register enters Fi sti nbd MosI SCL MISO MISO seu Most Most Shve 1 Master (Microprocessor! ‘Contrllee) Shve2 SPldevice (eeiLcd) | Soy SS UY SPI bus (FoR) serps tatertacteg the shift register of the master device through MISO pin. In summary, the shift registers of “master” and “slave’ devices form a circular buffer. For some devices, the decision on whether the LS/MS bit of data needs to be sent out first is configurable through configuration register (e.g. LSBF bit of the SPI control register for Motorola's 6SHC!2 controller) When compared to I2C, SP! busis most suitable for applicationsrequiring transfer of data in‘ streams’, ‘The only limitation is SP] doesn't support an acknowledgement mechanism. 2.4.1.3 Universal Asynchronous Receiver Transmitter (UART) Universal Asynchronous Re- ‘ceiver Transmitter (UART) based data transmission is an asynchronous form of serial data transmission, UART based serial data transmission doesn't require a clock signal to synchronise the transmitting end and receiving end for transmission. Instead it relies upon the pre-defined agreement between the trans- itting device and receiving device. The serial communication settings (Baudrate, number of bits per byte, parity, number of start bits and stop bit and flow control) for both transmitter and receiver should be set as identical. The start and stop of communication is indicated through inserting special bits in the data stream, While sending a byte of data, a start bit is added first and a stop bit is added at the end of the bit stream. The least significant bit of the data byte follows the ‘stat’ bit. ‘The ‘start bit informs the receiver that a data byt is about o arrive. The receiver device starts polling its ‘receive line’ as per the baudrate setiings. Ifthe baudrate is ‘x’ bits per second, the time slot available for one bit is I/x seconds, The receiver unit polls the receiver line at exactly half of the time slot avail- able for the bit. If parity is enabled for communication, the UART of the trensmitting device adds a par- ity bit (bit value is 1 for odd number of Is in the transmitted bit stream and 0 for even number of Is). The UART of the recciving device calculates the parity ofthe bits received and compares it with the reecived parity bit for error checking. The UART of the receiving device discards the ‘Start’, ‘Stop’ and “Parity’ ‘The Typical Embedded System 49 bit from the received bit stream and converts the received serial bit data to a word (In the 1x 1x0, case of 8 bits/byte, the byte is formed with the paal \ ae recsived 8 bits withthe fist received bit as the axD RxD LSB and last received data bit as MSB). For proper communication, the *Transmit Tine’ of the sending device should be con- nected to the “Receive line’ of the receiving device, Figure 2.28 illustrates the same, In addition to the serial data transmission function, UART provides hardware handshak- RXD: Recsiver line ing signal support for controlling the serial a toe UART chips are aailable fom dif ee ferent semiconductor manufacturers. National Semiconductor's 8250 UART chip is considered as the standard setting UART. It was used in the origi- ral IBM PC, Nowadays most ofthe microprocessorscontrollrs are availdble wit integrated UART funetionality nd they provide built-in instruction support for serial data transmission and reception, 2.4.1.4 1-Wire Interface _|-wireinterface is an asynchronous balf-duplex communication protocol developed by Maxim Dallas Semiconductor (http:/Awww.maxim-ic.com). It is also known as Dallas 1-Wire® protocol. It makes use of only a single signal line (wire) called DQ for communication and follows the master-slave communication model. One of the key feature of I-wire bus is that it allows power to be sent along the signal wire as well. The 12C slave devices incorporate internal capacitor (typically of the order of 800 pF) to power the device from the signal line. The I-wire interface supports a single master and one or more slave devices on the bus. The bus interface diagram shown in Fig, 2.29 illustrates the connection of master and slave devices on the I-wire bus. Yee ak =| be Sine! Beall Iwi device | (9: DS2760 Baty | Gu | reir) ase | ee (coprocessor v Conia) be sive? j c exo, cx] SEEPROM) , —= ps0 Introduction to Embedded Systems Every I-wire device contains a globally unique 64bit identification number stored within it, This ‘unique identification number can be used for addressing individual devices present on the bus in case there are multiple slave devices connected to the I-wire bus. The identifier has three parts: an Sbit family code, a 48bit serial number and an Sbit CRC computed fiom the first 56 bits, The sequence of operation for communicating with a L-wire slave device is listed below. 1. The master device sends a ‘Reset’ pulse on the I-wire bus. 2. The slave device(s) present on the bus respond with a “Presence” pulse, 3. ‘The master device sends a ROM command (Net Address Command followed by the 64bit address of the device). This addresses the slave device(s) to which it wants to initiate a communication, 4. The master device sends a readiwrite function command to read/write the internal memory or register of the slave device. 5. ‘The master initiates a Read dataWrite data from the device or to the device ‘All communication over the 1-wire bus is master initiated. The communication over the !-wirs bus divided into timestots of 60 microseconds. The ‘Reset’ pulse occupies 8 time slots. For starting a com- ‘munication, the master asserts the reset pulse by pulling the |-wire bus “LOW” for at least 8 time slots (4803). If ‘slave" device is present on the bus and is ready for communication it should respond to the master with a ‘Presence’ pulse, within 60s of the release of the ‘Reset’ pulse by the master. The slave device(s) responds with a “Presence” pulse by pulling the I-wire bus ‘LOW? for a minimum of | time slot (60hs). For writing abit value of 1 on the 1-wire bus, the bus master pulls the bus for 1 to 15ys and then releases the bus forthe rest ofthe time slot. bit value of 0" is written on the bus by master pulling the bus for « minimum of time slot (6011s) anda maximum of 2 time slots 120418). To Read a bit from the slave device, the master pulls the bas ‘LOW’ for | to 15s. Ifthe slave wants to send a bit value *!" ‘in response to the read request from the master, it simply releases the bus for the rest of the time slot. If the slave wants to sead a bit value ‘0’, it pulls the bus LOW’ for the rest of the time slot. 2.4.1.8 Parallel Interface The on-boand parallel interface is normally used for communicating with peripheral devices which are memory mapped to the host of the system. The host processoricontroller of the embedded system contains a parallel bus and the device which supports parallel bus can directly connect to this bus system, The communication through the parallel bus is controlled by the eontrol nal interface between the device and the host. The ‘Control Signals’ for communication includes “Read/ Write’ signal and device select signal, The device normally contains a device select line and the device ‘becomes active only when this line is asserted by the host processor. The direction of data transfer (Host to Device or Device to Host) can be controlled through the control signal lines for ‘Read’ and *Write’. ‘Only the host processor has control over the ‘Read’ and ‘Write’ control signals. The deviee is normally ‘memory mapped to the host processor snd arange of address is assigned to it. An address decoder circuit is used for generating the chip select signal for the device, When the address selected by the processor is within the range assigned for the device, the decoder circuit activates the chip select line and thereby the device becomes active. The processor then can read or write from or to the device by asserting the corresponding control line (RD\ and WR) respectively). Strict timing characteristics are followed for paralle! communication. As mentioned earlier, parallel communication is host processor initiated. Ifa device wants to initiate the communication, it ean inform the same to the processor through interrupts, For this, the interrupt line of the device is connected to the interrupt line of the processor and the cor- responding interrupt is enabled in the host processor. The width of the parallel interface is determined by the data bus width of the host processor, It can be 4bit, 8bit, L6bit, 32bit or 64bit etc, The bus width supported by the device should be same as that of the host processor. The bus interface diagram shown in Fig. 2,30 illustrates the interfacing of deviees through parallel interface. cefreuit x: Data buss width 4: Address bus width PantlelinteaceBas Parallel data communication offers the highest speed for data transfer. 2.4.2 External Communication Interfaces ‘The External Communication Interface refers to the different communication channels/buses used by the embedded system to communicate with the external world. The following section gives an overview Of the various interfaces for external communication. 2.4.2.1 RS-232 C &RS-485 _RS-232 C (Recommended Standard number 232, revision C from the Electronic Industry Association) is a legacy, full duplex, wired, asynchronous serial communication interface. The RS-232 interface is developed by the Electronics Industries Association (ELA) during the early 1960s, RS-232 extends the UART communication signals for external data communication. UART uses the standard TTL/CMOS logic (Logic "High" corresponds to bit value 1 and Logie *Low* corresponds to bit value 0) for bit transmission whereas RS-232 follows the ELA standard for bit trans~ tission. As per the EIA standard, a logic °0" is represented with vollage between +3 and +25V and a logic “1” is represented with voltage between -3 and -25V. In EIA standard, logic *0" is known as “Space” ‘nd logic ‘1’ as ‘Mark’. The RS-232 interface defines various handshaking and control signals for com- ‘munication apart from the “Transmit” and *Receive" signal lines for data communication, RS-232 sup- ports two different types of connectors, namely; DB-9: 9-Pin connector and DB.28: 25.Pin connector. Figure 2.31 illustrates the connector details for DB-9 and DB-25. TOOOTOOOO 0000 O\coocccc00000/O0 DB2S DB B-+ and DD-25RI-231 Connector Interface pz Introduction to Embedded Systems The pin details for the two connectors are explained in the following table: Pia Nie) | Piano: (ForDB- Pin no: (For DB-2S Description Connecter) Connector) TxD 3 2 ‘Transmit Pin for Transmiting Serial Data RXD 2 3 Receive Pin for Receiving Stil Dats RIS 7 4 Requsst 0 send crs 8 5 Clear To Send DSR. 6 6 Data Set Ready GND. 5 7 ‘Signal Ground pep 1 8 Data Carrie Detect pr 4 20 Data Tenminat Ready, RI 9 2 Ring Indicator 1 Frame Ground 2 Secondary DCD 1s Secondary CTS M4 Secondary TXD 15 ‘Transmission Signal Element Timing 16 ‘Secondary RXD 7 Receiver Signal Element Timing 6 Secondary RIS 21 ‘Signal Quality detecice ° ‘No Ceanccion 10 No Connection u No Connection RB No Garinection B ‘No Connection 23 No Cenneciion RS-232 is a point-o-point communication interface and the devices involved in RS-232 communica tion are called "Data Terminal Equipment (DTE)' and ‘Data Communication Equipment (DCE). If no data flow control is required, only TXD and RXD signal lines and ground line (GND) are required for ‘data transmission and reception. The RXD pin of DCE should be connected to the TXD pin of DTE and vice versa for proper date transmission, If hardware data flow control is required for serial transmission, various control signal lines of the RS-232 connection are used appropriately, The control signals are implemented mainly for modem ‘communication and some of them may not be irrelevant for other type of devices. The Request To Send (RTS) and Clear To Send (CTS) signals co-ordinate the communication between DTE and DCE. When- ‘ever the DTE has a data to send, it activates the RTS line and if the DCE is ready to accept the data, it activates the CTS line. ‘The Typical Embectied System Bs: 9 ‘The Data Terminal Ready (DTR) signal is activated by DTE whenit isready to accept data. The Data Set Ready (DSR) is activated by DCE when it is ready for establishing a communication link. DTR should be in the activated state before the activation of DSR. ‘The Data Carrier Detect (DCD) control signal is used by the DCE to indicate the DTE that a good ignal is being received. ga fne oso (Ri mode specific sigan fr inion incon cal on th teepione ine, ‘The 25 pin DB connector contains two sets of signal lines for transmit, receive and control lines. 1 owadays DB-25 connector is obsolete and most of the desktop systems are available with DB-9 con- rectors only. ‘As perthe BIA standard RS-232 C supports baudratesup to 20Kbps (Upper limit 19.2 Kbps) The com: monly used baudrates by devices are 300bps, 1200bps, 2400dps, 9600bps, 11.52Kbps and 19.2Kbps. 9600 is the popular baudrate setting used for PC communication, The maximum operating distance sup- ported by RS-232 is $0 feet at the highest supported baudra Embedded devices contain a UART for serial communication and they generate signal levels con- forming to TTLICMOS logic. A level translator IC like MAX 232 from Maxim Dallas semiconductor is used for converting the signal lines from the UART to RS-232 signal lines for commenication. On the receiving side the received data is converted back to digital logic level by a converter IC. Converter chips contain converters for both transmitter and receiver. ‘Though RS-232 was the most popular communication interface during the olden days, the advent of other communication techniques like Bluetooth, USB, Firewire, etc are pushing down RS-232 from the scenes. Still RS-232 is popular in certain legacy industrial application: RS-232 supports only point-to-point communication and not suitable for multi-drop communication. It uses single ended data transfer technique for signal transmission and thereby more susceptible to noise and it greatly reduces the operating distance. RS-422 is another serial interface standard fiom EIA for differential data communication. It supports data rates up to 100Kbps and distance up to 400 fl. The same RS-232 connector is used at the device end and an RS-232 19 RS-422 converter is plugged in the transmission line. At the recsiver end the conversion from RS-422 to RS-232 transmitter device and receiver devices up to 10. RS-485 is the enhanced version of RS=422 and it supports multi~drop communication with up w 32 transmitting devices (drivers) and 32 receiving devices on the bus. The communication between devices in the bus uses the ‘addressing’ mechanism to identify slave devices. 2.4.2.2 Universal Serial Bus (USB) Universal Sevial Bus (USB) isa wired high speed serial bus for data communication. The first version of USB (USB!.0) was reicuscd in 1995 and was ereated by the USB core group members consisting of Intel, Microsoft, IBM, Compaq, Digital and Northern Tele- com. The USB communication system follows a star topology with a USB host at the centre aind one or more USB peripheral devices/USB hosts connected to it, A USB host can support connections up to 127, including slave peripheral devices and other USB hosts. Figure 2.32 illustrates the star topology for USB device connection. USB transmits data in packet format. Euch data packet his a standard format. The USB communies- tion is a host initiated one. The USB host contains a host controller which is responsible for controlling the data communication, including establishing connectivity with USB slave devices, packetizing and formatting the data. There are different standards for implementing the USB Host Control interface: natnely Open Host Control Interface (OHCD and Universal Host Control Interface (UHC). ss Inwoduction to Embedded Systems The physical connection between a USB peripheral de- viee and master device is established with a USB cable. ‘The USB cable supports communication distance of up to Peripheral ‘5 metres. The USB standard uses two different types of deed connector at the ends of the USB cable for connecting the USB peripheral device and host device. “Type A’ connector is used for upstream connection (connection with host) and ‘Type B connector is used for downstream connection (con- nection with slave device). The USB connector present in Peripheral USBhost Peripheral ‘desktop PCs or laptops are examples for “Typa A’ USB YiCe! (Hub) device 3 connector. Both Type A and Type B connectors contain 4 pins for communication. The Pin details for the connectors are listed in the table given below. tren (Pine? Pim mime ——Decrignion (Hib) WER Yes Cari power (54 (QNDE De 5 itera daa carrerline Peripheral Peripheral we D+ Ditdereatial data exit line device 4 device 5 GES: an, ‘Groundsigna ine USB Device Connection topology USB uses differential signals for date transmission, It improves the noise immunity. USB interface has the ability to supply power to the connecting devices. ‘Two connection lines (Ground and Power) of the USB interface are dedicated for earrying power. It can supply power up to 500 mA at 5 V. I is sufficient to operate low power devices. Mini and Micro USB connectors are available for small form factor devices like portable media players, Each USB device contains a Product ID (PID) and a Vendor ID (VID). The PID and VID are embed- ded into the USB chip by the USB device manufacturer. The VID for a device is supplied by the USB standards forum. PID and VID are essential for loading the drivers corresponding to 3 USB device for communication. ‘USB supports four different types of data transfers, namely; Control, Bulk, Isochronou and Inter- rupt. Control transfer is used by USB system software to query, configure and issue commands to the USB device. Bulk transfer is used for sending a block of data to a device. Bulk transfer supports error checking and correction. Transferring data to aprinter is an example for bulk transfer. Isochronous data transfer is used for real-time data communication. In Isochronous transfer, data is transmitted as streams in real-time. Isochronous transfer dossn’t support error checking and re-ransmission of data in case of any transmission loss. All streaming devices like audio devices and medical equipment for data collec~ tion make use of the isochronous transfer. Interrupt transfer is used for transferring small amount of data. Interrupt transfer mechanism makes use of polling technique 10 see whether the USB device has any data to send. The frequency of polling is determined by the USB device and it varies from | to 255 nilliseconds. Devices like Mouse and Keyboard, which transmits fewer amounts of data, uses Interrupt transfer. USB.ORG (www.usb.org) is the standards body for defining and controlling the standards for USB ‘communication. Presently USB supports four different data rates namely; Low Speed (1.SMbps), Full Speed (I2Mbps), High Speed (480Mbps) and Super Speed (4.8Gbps). The Low Speed and Full Speed specifications are defined by USB 1.0 and the High Speed specification is defined by USB 2.0. USB 3.0, The Typical Embedded System ay defines the specifications for Super Speed. USB 3.0 is expected to be in action by year 2009, There isa move happening towards wireless USB for data transinission using Ulira Wide Band (UWB) technol- ogy. Some laptops are already available in the market with wireless USB suppor. 2.4.2.3 IEEE 1394 (Firewire) IEEE 1394 is a wired, isochronous high speed serial communica- tion bus. It is also known as High Performance Serial Bus (HPSB), The research on 1394 was started by Apple Inc, in 1985 and the standard for this was coined by IEEE. The implementation of it is avail- able from various players with different names. Apple Inc's (swwapple.com) implementation of 1394 protocol is popularly known as Firewire. i:LINK is the 1394 implementation from Sony Corporation Gviv.sony.net) and Lyn is the implementation from Texas Instruments (www.ti.com). 1394 supports peer-to-peer connection and point-to-multipoint communication allowing 63 devices to be connected fon the bus in a troe topology. 1394 is a wired serial interface and it can support a cable length of up to 15 feet for interconnection. The 1394 standard has evolved a lot from the first version /EEE 1394-1995 released in 1995 to the recent version JEEE 1394-2008 released in June 2008. The 1394 standard supports a data rate of 400 to 3200Mbits/second. The /EEE 1394 uses differential data transfer (The information is sent using dif- ferential signals through a pair of twisted cables. Itincreases the noise immunity) and the interface cable supports 3 types of connectors, namely; 4-pin connector, 6-pin connector (alpha connector) and 9 pin connecior (beta connector). The 6 and 9 pin connectors carry power also to support external devices (Incase an embedded device is connected to a PC through an IEEE 1394 cable with 6 or 9 pin connec~ tor interface, it can operate from the power available through the canneetor) It can supply unregulated power in the range of 24 to 30V. (The Apple implementation is for battery operated devices and it can supply a voltage in the range 9 to 12V.) The table given below illustrates the pin details for 4, 6 and 9 pin connectors. Pin mame Piano: (4 Pin Plaine: (6Pin Pin no: (9 Pia Description. Connector) Connector) Connector) Power ' 8 ‘Unregulated DC supply. 24 to 30V ‘Signal Ground 2 6 Groiind connection TPB 1 3 ' Disrereatal Signal line for Signal Hine B TrB+ i 4 z Difeential Signal line for Sion fine B. TPA 3 s 3 Didfeteatal Signal Lie for Signal line A ‘TAs 4 6 4 ‘Differential Signal fine for Signa Fine A TRAS) s Shield for the differential signal line A Normally grounded TPRS) e Shield for the differential signal tine 1 ‘Normally grounded Ne 7 No connection There are two differential data transfer lines A and B per connector. Ina 1394 cable, normally the dif ferential lines of A are connected to B (TPA+ to TPB+ and TPA-lo TPB-) and vice versa. 1394 is a popular communicstion interface for connecting embedded devices like Digital Camera, Camcorder, Scanners to desktop computers for data transfer and storage. Unlike USB interface (Except USB OTG), JEEE 1394 doesn’t require a host for communicating between devices. For example, you ean directly connect a seanner witha printer for printing, The data- EL Introduction to Embedded Systems rate supported by 13394 is far higher than the one supported by USB2.0 interface. The 1394 hardware ‘implementation is much costlier than USB implementation. 2.4.2.4 Infrared (IrDA) Infrared (IrDA) is a serial, half duplex, line of sight based wireless tech- nology for data communication between devices, It is in use from the oklen days of communication ‘aid you may be very familiar with jt, The remote control of your TY, VCD playes, ete, works on In- frared data communication principle. Infrared communication technique uses infrared waves of the

You might also like