Embedded Systems - Tutorialspoint

3y ago
236 Views
34 Downloads
806.27 KB
17 Pages
Last View : 2m ago
Last Download : 3m ago
Upload by : Nadine Tse
Transcription

Embedded Systems

Embedded SystemsAbout the TutorialWe can broadly define an embedded system as a microcontroller-based, software-driven,reliable, real-time control system, designed to perform a specific task. It can be thought of as acomputer hardware system having software embedded in it.An embedded system can be either an independent system or a part of a large system. In thistutorial, we will explain all the steps necessary to design an embedded system and use it.AudienceThis tutorial has been designed to help the students of electronics learn the basic-to-advancedconcepts of Embedded System and 8051 Microcontroller.PrerequisitesBefore proceeding with this tutorial, you should have a good understanding of the concepts ofbasic electronics such as circuits, logic gates, etc.Disclaimer & Copyright Copyright 2015 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt.Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute, or republish anycontents or a part of contents of this e-book in any manner without written consent of thepublisher.We strive to update the contents of our website and tutorials as timely and as precisely aspossible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd.provides no guarantee regarding the accuracy, timeliness, or completeness of our website or itscontents including this tutorial. If you discover any errors on our website or in this tutorial,please notify us at contact@tutorialspoint.comi

Embedded SystemsTable of ContentsAbout the Tutorial. iAudience . iPrerequisites . iDisclaimer & Copyright . iTable of Contents . ii1.EMBEDDED SYSTEMS – OVERVIEW. 1System . 1Embedded System . 1Characteristics of an Embedded System . 1Basic Structure of an Embedded System . 32.EMBEDDED SYSTEMS – PROCESSORS . 4Processors in a System . 4Types of Processors . 4Microprocessor . 4Microcontroller . 5Microprocessor vs Microcontroller . 63.EMBEDDED SYSTEMS – ARCHITECTURE . 7Von Neumann Architecture . 7Harvard Architecture . 8Von-Neumann Architecture vs Harvard Architecture . 8CISC and RISC . 94.EMBEDDED SYSTEMS – TOOLS AND PERIPHERALS. 10Compilers and Assemblers .10Debugging Tools in an Embedded System .11ii

Embedded SystemsSimulators .11Microcontroller Starter Kit .11Emulators.12Peripheral Devices in Embedded Systems .12Criteria for Choosing Microcontroller .125.EMBEDDED SYSTEMS – 8051 MICROCONTROLLER . 14Brief History of 8051 .148051 Flavors / Members .14Comparison between 8051 Family Members .14Features of 8051 Microcontroller .15Block Diagram of 8051 Microcontroller .156.EMBEDDED SYSTEMS – I/O PROGRAMMING . 16I/O Ports and their Functions .16Dual Role of Port 0 and Port 2 .19Hardware Connection of Pins .19I/O Ports and Bit Addressability .21Single-Bit Instructions .227.EMBEDDED SYSTEMS – TERMS . 23Program Counter .23Reset Vector .23Stack Pointer .23Infinite Loop .23Interrupts .24Little Endian Vs Big Endian .248.EMBEDDED SYSTEMS – ASSEMBLY LANGUAGE. 25Structure of Assembly Language .25iii

Embedded SystemsAssembling and Running an 8051 Program .26Data Type .27Assembler Directives.28Labels in Assembly Language .289.EMBEDDED SYSTEMS – REGISTERS . 29Storage Registers in 8051 .29ROM Space in 8051 .3110. EMBEDDED SYSTEMS – REGISTER BANK / STACK . 34RAM Memory Space Allocation in 8051 .34Register Banks in 8051 .34Default Register Bank .35How to Switch Register Banks .35Stack and its Operations .3511. EMBEDDED SYSTEMS – INSTRUCTIONS . 37Loop and Jump Instructions .37Other Conditional Jumps.38Unconditional Jump Instructions.39Calculating the Short Jump Address .39CALL Instructions.4012. EMBEDDED SYSTEMS – ADDRESSING MODES. 41Immediate Addressing Mode .41Direct Addressing Mode .42Register Direct Addressing Mode .43Register Indirect Addressing Mode .44Indexed Addressing Mode .45iv

Embedded Systems13. EMBEDDED SYSTEMS – SPECIAL FUNCTION REGISTERS . 4714. EMBEDDED SYSTEMS – TIMER / COUNTER . 49Timers of 8051 and their Associated Registers .49Different Modes of Timers .51Initializing a Timer .52Reading a Timer .52Detecting Timer Overflow .5215. EMBEDDED SYSTEMS – INTERRUPTS . 53What is Polling? .53Interrupt Service Routine .54Interrupt Vector Table .54Steps to Execute an Interrupt .55Edge Triggering vs. Level Triggering.55Enabling and Disabling an Interrupt .56Interrupt Priority in 8051 .57Interrupt inside Interrupt .57Triggering an Interrupt by Software .57v

1. Embedded Systems – OverviewEmbedded SystemsSystemA system is an arrangement in which all its unit assemble work together according to a set ofrules. It can also be defined as a way of working, organizing or doing one or many tasksaccording to a fixed plan. For example, a watch is a time displaying system. Its componentsfollow a set of rules to show time. If one of its parts fails, the watch will stop working. So wecan say, in a system, all its subcomponents depend on each other.Embedded SystemAs its name suggests, Embedded means something that is attached to another thing. Anembedded system can be thought of as a computer hardware system having softwareembedded in it. An embedded system can be an independent system or it can be a part of alarge system. An embedded system is a microcontroller or microprocessor based systemwhich is designed to perform a specific task. For example, a fire alarm is an embeddedsystem; it will sense only smoke.An embedded system has three components: It has hardware. It has application software. It has Real Time Operating system (RTOS) that supervises the application softwareand provide mechanism to let the processor run a process as per scheduling byfollowing a plan to control the latencies. RTOS defines the way the system works. Itsets the rules during the execution of application program. A small scale embeddedsystem may not have RTOS.So we can define an embedded system as a Microcontroller based, software driven, reliable,real-time control system.Characteristics of an Embedded System Single-functioned – An embedded system usually performs a specialized operationand does the same repeatedly. For example: A pager always functions as a pager. Tightly constrained – All computing systems have constraints on design metrics, butthose on an embedded system can be especially tight. Design metrics is a measure ofan implementation's features such as its cost, size, power, and performance. It must6

Embedded Systemsbe of a size to fit on a single chip, must perform fast enough to process data in realtime and consume minimum power to extend battery life. Reactive and Real time – Many embedded systems must continually react tochanges in the system's environment and must compute certain results in real timewithout any delay. Consider an example of a car cruise controller; it continuallymonitors and reacts to speed and brake sensors. It must compute acceleration or deaccelerations repeatedly within a limited time; a delayed computation can result infailure to control of the car. Microprocessors based – It must be microprocessor or microcontroller based. Memory – It must have a memory, as its software usually embeds in ROM. It doesnot need any secondary memories in the computer. Connected – It must have connected peripherals to connect input and output devices. HW-SW systems – Software is used for more features and flexibility. Hardware isused for performance and security.Advantages Easily Customizable Low power consumption Low cost Enhanced performance7

Embedded SystemsDisadvantages High development effort Larger time to marketBasic Structure of an Embedded SystemThe following illustration shows the basic structure of an embedded system: Sensor – It measures the physical quantity and converts it to an electrical signal whichcan be read by an observer or by any electronic instrument like an A2D converter. Asensor stores the measured quantity to the memory. A-D Converter – An analog-to-digital converter converts the analog signal sent bythe sensor into a digital signal. Processor & ASICs – Processors process the data to measure the output and storeit to the memory. D-A Converter – A digital-to-analog converter converts the digital data fed by theprocessor to analog data. Actuator – An actuator compares the output given by the D-A Converter to the actual(expected) output stored in it and stores the approved output.8

2. Embedded Systems – ProcessorsEmbedded SystemsProcessor is the heart of an embedded system. It is the basic unit that takes inputs andproduces an output after processing the data. For an embedded system designer, it isnecessary to have the knowledge of both microprocessors and microcontrollers.Processors in a SystemA processor has two essential units: Program Flow Control Unit (CU) Execution Unit (EU)The CU includes a fetch unit for fetching instructions from the

nature. Can perform multiple tasks at a time. For example, on computer we can play music while writing text in text editor. Single task oriented. For example, a washing machine is designed for washing clothes only. RAM, ROM, I/O Ports, and Timers can be added externally and can vary in numbers. RAM, ROM, I/O Ports, and Timers cannot be added .

Related Documents:

2. Embedded systems Vs General Computing system Page 4 Sec 1.2 ; 3. History of embedded systems , classification of embedded system Page 5,6 Sec 1.3 , Sec 1,4 . 4. Major application area of embedded sys Page 7 Sec 1.5 5. Purpose of embeded system Page 8 Sec 1.6 6. Typical Embedded sys: Core of embedded system Page 15 Chap 2 : 7. Memory Page 28

tutorialspoint.com or google.com these are domain names. A domain name has two parts, TLD (Top Level Domain) and SLD (Second level domain), for example in tutorialspoint.com, tutorialspoint is second level domain of TLD .com, or you can say it's a subdomain of .com TLD. There are many top level domains available, like .com,

CO4: Investigate case studies in industrial embedded systems Introduction to Embedded systems, Characteristics and quality attributes (Design Metric) of embedded system, hardware/software co-design, Embedded micro controller cores, embedded memories, Embedded Product development life cycle, Program modeling concepts: DFG, FSM, Petri-net, UML.

The Heart of Java SE Embedded: Customize Your Runtime Environment Embedded Systems: The Wave of the Future Embedded systems are computer-based bu t unlike desktop computers and their applications. An embedded system's computer is embedded in a device. The variety of devices is expanding daily.

players, digital cameras, video game consoles, microwave ovens and temperature measurement systems. Real Time Embedded Systems A real time embedded system is defined as, a system which gives a required o/p in a particular time.These types of embedded systems

The network embedded system is a fast growing area in an embedded system application. The embedded web server is such a system where all embedded device are connected to a web server and can be accessed and controlled by any web browser. Examples; a home security system is an example of a LAN networked embedded system .

Introduction to Embedded Systems - Shibu K.V, Mc Graw Hill. REFERENCE BOOKS: Embedded Systems - Raj Kamal, TMH. Embedded System Design - Frank Vahid, Tony Givargis, John Wiley. Embedded Syst

Real-Time Operating Systems are often used in embedded systems They simplify use of hardware, ease management of multiple tasks, and adhere to real-time constraints Power is important in many embedded systems with RTOSs . Specialized or static memory management common 14 Robert Dick Embedded System Design and Synthesis