EMBEDDED SYSTEMS
Subject Code : 10EE665 IA Marks : 25 No. of Lecture Hrs./
Week
: 04 Exam
Hours
: 03
Total No. of Lecture Hrs. : 52 Exam Marks : 100 PART -A UNIT - 1 & 2
CONCEPT OF EMBEDDED SYSTEM DESIGN: Components, classification, skills required. Embedded Micro controller cores: Architecture of 6808 and 6811.Embedded Memories ROM variants, RAM. Applications of embedded system: Examples of Embedded systems SOC for cell less bar code scanner. 10 Hours UNIT - 3
TECHNOLOGICAL ASPECTS OF EMBEDDED SYSTEM: Interfacing between analog and digital blocks, Signal conditioning, digital signal processing, DAC & ADC interfacing, Sample & hold, multiplexer interface Internal ADC interfacing (excluding 6805 & 6812), Data Acquisitio n System and Signal conditioning using DSP. 10 Hours UNIT - 4
DESIGN TRADE OFFS DUE TO PROCESS INCOMPATIBILITY, THERMAL CONSIDERATIONS: Issues in embedded system design. Design challenge, design technology, trade offs. Thermal considerations. 6Hours
CITSTUDENTS.IN
Page 2 PART -B
UNIT -5 & 6
Software aspects of Embedded Systems, real time programming Languages, operating systems. Programming concepts and embedded programming in C.Round Robin, Round Robin with interrupts, function queue-scheduling architecture, Real time OS architecture, selecting
architecture. Introduction to RTOS. 12 Hours
UNIT -7 & 8
Subsystem interfacing with external systems user interfacing, Serial I/O devices, Parallel port interfaces: Input switches, Key boards and Memory interfacing.
Case study: Embedded velocity PID controller, PI controller with a PWM actuator. 14Hours
TEXT BOOKS:
1. Embedded Microcomputer systems: Real time interfacing-Valvano, J.W, Cengage Learning,2nd Edition 5th Indian reprint,2009
2. The Art of Designing Embedded systems-Ganssle, Jack, Newness
Table of contents
Unit Title Page no
UNIT - 1 & 2 CONCEPT OF EMBEDDED SYSTEM DESIGN: Components, classification, skills required. Embedded Micro controller cores:
5
Architecture of 6808 and 6811.Embedded Memories ROM variants,
RAM. Applications of embedded system Examples of Embedded systems SOC for cell less bar code scanner.
UNIT - 3 TECHNOLOGICAL ASPECTS OF EMBEDDED SYSTEM:
Interfacing between analog and digital blocks,
22
Signal conditioning, digital signal processing,
DAC & ADC interfacing, Sample & hold, multip lexer interface Internal
ADC interfacing (excluding 6805 & 6812), Data Acquisition System and Signal
conditioning using DSP.
UNIT - 4 DESIGN TRADE OFFS DUE TO PROCESS INCOMPATIBILITY, THERMAL
CONSIDERATIONS:
37
Issues in embedded system design.
Design challenge, design technology, trade offs. Thermal considerations
UNIT -5 & 6 Software aspects of Embedded Systems,
51
Page 4 systems.
Programming concepts and embedded programming in C.
Round Robin, Round Robin with interrupts, function queue-scheduling architecture, Real time OS architecture, selecting architecture. Introduction to RTOS.
UNIT -7 & 8
Subsystem interfacing with external systems
user interfacing, 70
Serial I/O devices, Parallel port interfaces: Input switches, Key boards and Memory interfacing.
Case study: Embedded velocity PID controller,
PI controller with a PWM actuator
UNIT - 1 & 2
CONCEPT OF EMBEDDED SYSTEM DESIGN: Components, classification, skills required. Embedded Micro controller cores: Architecture of 6808 and 6811.Embedded Memories ROM variants, RAM. Applications of embedded system: Examples of Embedded systems SOC for cell less bar code scanner.
Components of an Embedded System
An embedded system has three main components: Hardware, Software and real time operating system i) Hardware
• Power Supply • Processor • Memory • Timers
• Serial communication ports • Output/Output circuits
• System application specific circuits
ii) Software: The application software is required to perform the series of tasks. An embedded system has software designed to keep in view of three constraints: • Availability of System Memory
• Availability of processor speed
• The need to limit power dissipation when running the system continuously in cycles of wait for events, run , stop and wake up.
iii) Real Time Operating System: (RTOS) It supervises the application software and provides a mechanism to let the processor run a process as per scheduling and do the switching from one process (task) to another process.
Page 6 Classification
We can classify embedded systems into three types as follows :
1. Small Scale Embedded Systems : These systems are designed with a single 8- or 16-bit microcontroller; they have little hardware and software complexities and involve board -level design. They may even be battery operated. When developing embedded software for these, an editor, assembler and cross assembler, specific to the microcontroller or processor used, are the main programming tools. Usua lll y, ‗C‘ is used for developing these systems. ‗C‘ program compilation is done into the assembly, and executable codes are then appropriately located in the system memory. The software has to fit within the memory available and keep in view the need to limit power dissipation when system is running continuously.
2. Medium Scale Embedded Systems : These systems are usually designed with a single or few 16- or 32-bit microcontrollers or DSPs or Reduced Instruction Set Computers (RISCs). These have both hardware and software complexities. For complex software design, there are the following programming tools: RTOS, Source code engineering tool, Simulator, Debugger and Integrated Development Environment (IDE). Software tools also provide the solutions to the hardware complexities. An assembler is of little use as a programming tool. These systems may also employ the readily available ASSPs and IPs (explained later) for the various functions—for example, for the bus interfacing, encrypting, deciphering, discrete cosine transformation and inverse transformation, TCP/IP protocol stacking and network connecting functions. [ASSPs and IPs may also have to be appropriately configured by the system software before being integrated into the system-bus.
3. Sophisticated Embedded Systems : Sophisticated embedded systems have enormous hardware and software complexities and may need scalable processors or configurable processors and programmable logic arrays. They are used for cutting edge applications that need hardware and software co-design and integration in the final system; however, they are constrained by the processing speeds available in their hardware units. Certain software functions such as encryption and deciphering algorithms, discrete cosine transformation and inverse transformation algorithms, TCP/IP protocol stacking and network driver functions are implemented in the hardware to obtain additional speeds by saving time. Some of the functions
of the hardware resources in the system are also implemented by the software. Development tools for these systems may not be readily available at a reasonable cost or may not be available at all. In some cases, a compiler or retargetable compiler might have to be developed for these.
Skills Required
An embedded system designer has to develop a product using the available tools within the given specifications, cost and time frame.
1. Skills for Small Scale Embedded System Designer: Author Tim Wilmshurst in the book referred above (see page 4), has said that the following skills are needed in the individual or team that is developing a small-scale system: ―Fu lll understanding of microcontrollers with a basic knowledge of computer architecture, digital electronic design, software engineering, data communication, control engineering, motors and actuators, sensors and measurements, analog electronic design and IC design and manufacture‖. Specific skilll s willl be needed in specific situations. For example, control engineering knowledge will be needed for design of control systems and analog electronic design knowledge will be needed when designing the system interfaces. Basic aspects of the following topics will be described in this book to prepare the designer who already has a good knowledge of the microprocessor or microcontroller to be used.
Computer architecture and organization. Memories.
Memory allocation. Interfacing the memories.
Burning (a term used for porting) the executable machine codes in PROM or ROM. Use of decoders and demultiplexers.
Direct memory accesses. Ports.
Device drivers in assembly. Simple and sophisticated buses.
Page 8
C programming elements. Memory optimization.
Selection of hardware and microcontroller.
Use of ICE (In-Circuit Emulators), cross-assemblers and testing equipment. Debugging the software and hardware bugs by using test vectors.
A designer interested in small-scale embedded systems may not need at all concepts of interrupt latencies and deadlines and their handling, the RTOS programming tools.
2. Skills for Me dium Scale Embe dde d Sys te m De s igne r: ‗C‘ programming and RTOS programming
and program modeling skills are a must to design a medium-scale embedded system. Knowledge of the following becomes critical.
Tasks and their scheduling by RTOS.
Cooperative and preemptive scheduling. Inter processor communication functions.
Use of shared data, and programming the critical sections and re -entrant functions. Use of semaphores, mailboxes, queues, sockets and pipes.
Handling of interrupt-latencies and meeting task deadlines.
Use of various RTOS functions.
Use of physical and virtual device drivers.
A designer must have access to an RTOS programming tool with Application Programming Interfaces (APIs) for the specific microcontroller to be used. Solutions to various functions like memory allocation, timers, device drivers and interrupt handing mechanism are readily available as the APIs of the RTOS. The designer needs to know only the hardware organization and use of these APIs. The microcontroller or processor then represents a small system element for the designer and a little knowledge may suffice.
3. Skills for Sophis ticate d Embe dde d Sys te m De s igne r: A team is needed to co-design and solve the
high level complexities of the hardware and software design. An embedded system hardware engineer should have full skills in hardware units and basic knowledge of ‗C‘, RTOS and other programming tools.
Software engineer should have basic knowledge in hardware and a thorough knowledge of ‗C‘, RTOS and other programming tools. A final optimum design solution is then obtained by system integration.
Micro controlle r core s : Archite cture of 6808 and 6811
Archite cture of 6808
The 6808 is an advanced 8-bit MCU IP Core with highly sophisticated, on chip peripheral capabilities. 6808 soft core is binary-compatible with the industry standard 68HC08 8-bit microcontroller and can achieve a performance 45-100 million instructions per second. There are two configurations of DF6808: Harvard where data and program buses are separated and von Neumann with common program and data bus DF6808 has FAST architecture that is 3.2 times faster compared to original implementation. Core in standard configuration has integrated on chip major peripheral function. The 6808 Microcontroller Core contains full-duplex UART (Asynchronous serial communications interface (SCI), and Synchronous Serial Peripheral Interface SPI.
Page 10 The main 16-bit, free-running timer system has implemented two input capture lines and two output- compare lines. Self-monitoring circuitry is included on-chip to protect against system errors. A computer operating properly (COP) watchdog system protects against software failures. An illegal opcode detection circuit provides a nonmaskable interrupt if illegal opcode is detected. Two software-controlled power-saving modes, WAIT and STOP, are available to conserve additional power. These modes make the DF6808 IP Core especially attractive for automotive and battery-driven applications.
DF6808 is fully customizable, which means it is delivered in the exact configuration to meet users requirements. There is no need to pay extra for not used features and wasted silicon. It includes fully automated test bench with complete set of tests allowing easy package validation at each stage of SoC design flow.
Features
FAST architecture, 3.2 times faster than the original implementatio n Software compatible with industry standard 68HC08
Configurable Harvard or Von Neumann architectures 64 bytes of System Function Registers space (SFRs) Up to 64k bytes of Program Memory
Up to 64k bytes of Data Memory
De-multip lexed Address/Data Bus to allow easy connection to memory Two power saving modes: STOP, WAI
Ready pin allows Core to operate with slow program and data memories Fully synthesizable, static synchronous design with no internal tri-states No internal reset generator or gated clock
Scan test ready
Technology independent HDL source code Core can be fully customized
800 MHz virtual clock frequency compared to original implementation
6811: 8-bit FAST Microcontrollers Family
Document contains brief description of 6811 core functionality. The 6811 is a advanced 8 -bit MCU IP Core with highly sophisticated, on chip peripheral capabilities. 6811 soft core is binary-compatible with the industry standard 68HC11 8-bit microcontroller and can achieve a performance 45-100 million instructions per second. DF6811 has FAST architecture that is 3.8 times faster compared to original implementation. Core in standard configuration has integrated on chip major peripheral function.
There are two serial interfaces: an asynchronous serial communications interface (SCI) and a separate synchronous serial peripheral interface (SPI).
The main 16-bit, free-running timer system has implemented three input capture lines, five output-compare lines, and a real-time interrupt function. An 8-bit pulse accumulator subsystem can count external events or measure external periods. Self-monitoring circuitry is included on- chip to protect against system errors. A computer operating properly (COP) watchdog system
Page 12 interrupt if illegal opcode is detected. Two software-controlled power-saving modes, WAIT and STOP, are available to conserve additional power. These modes make the DF6811 IP Core especially attractive for automotive and battery-driven applications. The DF6811 have built in the development support features designed into DF6811. The LIR signal is intended as a debugging aid. This signal is driven to active low for the first bus cycle of each new instruction, making it easy to reverse assemble (disassemble) instructions from the display of a logic analyzer. DF6811 is fully customizable, which means it is delivered in the exact configuration to meet users requirements. There is no need to pay extra for not used features and wasted silicon. It includes fully automated testbench with complete set of tests allowing easy package validation at each stage of SoC design flow.
Features
FAST architecture, 3,8 times faster than the original implementatio n Software compatible with industry standard 68HC11
10 times faster multiplication 16 times faster divisio n
64 bytes of remapped System Function Registers space (SFRs) Up to 16M bytes of Data Memory
De-multip lexed Address/Data Bus to allow easy connection to memory Two power saving modes: STOP, WAI
Embedded Memories
In a system, there are various types of memories. Figure below shows a chart for the various forms of memories that are present in systems.
These are as follows:
Internal RAM of 256 or 512 bytes in a microcontroller for registers, temporary data and stack
Internal ROM/PROM/EPROM for about 4 kB to 16 kB of program (in the case of microcontrollers). (iii) External RAM for the temporary data and stack (in most systems).
Internal caches (in the case of certain microprocessors).
EEPROM or flash (in many systems saving the results of processing in nonvolatile memory: for example, system status periodically and digital-camera images, songs, or speeches after a suitable format compression).
External ROM or PROM for embedding software (in almost all no microcontroller-based systems). (vii) RAM Memory buffers at the ports.
(viii) Caches (in superscalar microprocessors).
Table gives the functions assigned in the embedded systems to the memories. ROM or PROM or EPROM embeds the embedded software specific to the system
Random-access memory (RAM) is a form of computer data storage. A random-access device
Page 14 location, so data can be accessed quickly in any random order. In contrast, other data storage media such as hard disks, CDs, DVDs and magnetic tape, as well as early primary memory types such as drum memory, read and write data only in a predetermined order, consecutively, because of mechanical design limitations. Therefore the time to access a given data location varies
significantly depending on its physical location
Applications of embedded system
Embedded Systems has witnessed tremendous growth in the last one decade. Almost all the fast developing sectors like automobile, aeronautics, space, rail, mobile communications, and electronic payment solutions have witnessed increased use of Embedded technologies. Greater value to mobility is one of the prominent reasons for the rise and development of Embedded technologies.
Initially, Embedded Systems were used for large, safety-critical and business-critical applications that included
Rocket & satellite control Energy production control Telephone switches
Air Traffic Control
Embedded Systems research and development is now concerned with a very large proportion of the advanced products designed in the world. In one way, embedded technologies run global transport industry that includes avionics, space, automotive, and trains. But, it is the electrical and electronic appliances like cameras, toys, televisions, home appliances, audio systems, and cellular phones that really are the visual interface of Embedded Systems for the common consumer.
Advanced Embedded Technologies are deployed in developing
Process Controls (energy production and distribution, factory automation and optimization) Telecommunica tions (satellites, mobile phones and telecom networks),
Energy management (production, distribution, and optimized use) Security (e-commerce, smart cards)
Health (hospital equipment, and mobile monitoring)
In the last few years the emphasis of embedded technologies was on achieving feasibility, but now the trend is towards achieving optimality. Optimality or optimal design of embedded systems means
Targeting a given market segment at the lowest cost and delivery time possible Seamless integration with the physical and electronic environment
Understanding the real-world constraints such as hard deadlines, reliability, availability, robustness, power consumption, and cost
Automobile sector
Automobile sector has been in the forefront of acquiring and utilizing Embedded technology to produce highly efficient electric motors. These electric motors include brushless DC motors, induction motors and DC motors, that use electric/electronic motor controllers.
European automotive industry enjoys a prominent place in utilizing Embedded technology to achieve better engine control. They have been utilizing the recent Embedded innovations such as brake-by-wire and drive-by-wire.
Embedded technology finds immediate importance in electric vehicles, and hybrid vehicles. Here Embedded applications bring about greater efficiency and ensure reduced pollution. Embedded technology has also helped in developing automotive safety systems such as the
Anti-lock braking system (ABS)
Electronic Stability Control (ESC/ESP) Traction control (TCS)
Automatic four-wheel drive
Aerospace & Avionics
Aerospace and Avionics demand a complex mixture of hardware, electronics, and embedded software. For efficient working, hardware, electronics and embedded software must interact with
Page 16
Creating Embedded systems on time
Taking the budgetary constraints into consideration
Ensuring that the complex software and hardware interactions are right
Assembling components that meet specifications and perform effectively together Understanding the larger context of the embedded software
Adopting the latest in Embedded technology like the fly-by-wire
Telecommunications
If ever there is an industry that has reaped the benefits to Embedded Technology, for sure, it is only Telecommunications. The Telecom industry utilizes numerous embedded systems from telephone switches for the network to mobile phones at the end-user. The Telecom computer network also uses dedicated routers and network bridges to route data. Embedded engineers help in ensuring high-speed networking. This is the most critical part of embedded applications. The Ethernet switches and network interfaces are designed to provide the necessary bandwidth. These will allow in rapidly incorporating Ethernet connections into advanced embedded applications.
Consumer Electronics
Consumer electronics has also benefited a lot from embedded technologies. Consumer electronics includes
Personal Digital Assistants (PDAs) MP3 players Mobile phones Videogame consoles Digital cameras DVD players GPS receivers Printers
CITSTUDENTS.IN
Even the household appliances, that include microwave ovens, washing machines and dishwashers, are including embedded systems to provide flexibility, efficiency and features. The latest in embedded applications are seen as advanced HVAC systems that uses networked thermostats to more accurately and efficiently control temperature.
In the present times, home automation solutions are being increasingly built on embedded technologies. Home automation includes wired and wireless-networking to control lights, climate, security, audio/visual, surveillance, etc., all of which use embedded devices for sensing and controlling.
Railroad
Railroad signaling in Europe relies heavily on embedded systems that allows for faster, safer and heavier traffic. Embedded technology has brought a sea of change in the way Railroad Signals are managed and Rail traffic in large volumes is streamlined.
The Embedded technology enabled Railroad Safety Equipment is increasingly being adopted by Railway networks across the globe, with an assurance of far lesser Rail disasters to report. VECTOR Institute prepares embedded students for the challenges associated with Railroad industry.
Electronic payment solutions sector
In the present times there is stiff competition amongst embedded solutions providers to deliver innovative, and high-performance electronic payment solutions that are easy to use and highly secure. Embedded engineers knowledgeable in trusted proprietary technology develop the secure, encrypted transactions between payment systems and major financial institutions.
The market for mobile payments systems is growing rapidly. It is driven by retailers, restaurants, and other businesses that want to service customers anywhere, anytime. With the use of mobile devices, mostly mobile phones becoming very popular, embedded technologies compatible with mobile are being developed to promote payment systems.
Page 18 Smart cards industry
Smart cards, though began prominently as either a debit or a credit card, are now being introduced in personal identification and entitlement schemes at regional, national, and international levels. Smart cards are appearing now as Citizen Cards, drivers‘ licenses, and patient cards.
We also come across contactless smart cards that are part of ICAO biometric passports aim to enhance security for international travel. Europe enjoys precedence in the use of Smart cards. All the E-services (e-banking, e-health, e-training) are based on the leading edge in smart-card related technologies.
Example of Embedded systems SOC for cell less bar code scanner.
System on chip (SoC)
Lately, embedded systems are being designed on a single silicon chip, called System on chip (SoC). SoC is a new design innovation for embedded systems. An embedded processor is a part of the SoC VLSI circuit. A SoC may be embedded with the following components: multiple processors, memories, multiple standard source solutions, called IP (Intellectual Property) cores and other logic and analog units. A SoC may also have a network protocol embedded into it. It may also embed an encryption function unit. It can embed discrete cosine transforms for signal processing applications. It may embed FPGA (Field Programmable Gate Array) cores. For a number of applications, the GPP (microcontrollers, microprocessors or DSPs) cores may not suffice. For security applications, killer applications, smart card, video game, palm top computer, cell phone, mobile-Internet, hand-held embedded systems, Gbps transceivers, Gigabits per second LAN systems and satellite or missile systems, we need special processing units in a VLSI designed circuit to function as a processor. These special units are called Application Specific Instruction Processors (ASIP). For an application, both the configurable processors (called FPGA cum ASIP processors) and non-configurable processors (DSP or Microprocessor or Microcontrollers) might be needed on a chip.
Block Diagram
A barcode reader (or barcode scanner) is an electronic device for reading printed barcodes. Like a flatbed scanner, it consists of a light source, a lens and a light sensor translating optical impulses into electrical ones. Additionally, nearly all barcode readers contain decoder circuitry analyzing the barcode's image data provided by the sensor and sending the barcode's content to the scanner's output port.
Design Considerations Features
TMS320C54x™ DSPs
Page 20
100% code-compatible with C5000 devices
16-bit, fixed-point DSPs with power dissipation as low as 40 mW Single and multi-core products delivering 300-532 MIPS
Three power-down modes
Integrated RAM and ROM configurations Ultra-thin packaging Audio Power Amplifier Efficient Class-D operation
Only three external components (TPA2005D1)
Internal gain (TPA3007D1: 12, 18, 23.6, 36dB) Independent gain control ('2005D1) THD+N = 0.2% at 1kHz; PSRR = -73 dB ('3007D1) & -75dB ('2005D1) Touch Screen Controller
Integrated 4-wire touch screen controller Highly programmable
Direct battery measurement
Stereo audio DAC with 48ksps sampling rate SPI interface Audio DAC
Accepts 16- to 24-bit data; Left, Right I2S Format; wide sampling frequency - 5kHz to 200kHz
Hardware controlled
Benefits
Audio Power Amplifier
Eliminates need for heat sink Reduces board space
Minimizes noise Excellent audio fidelity
Touch Screen Controller
Fully automated modes of operation
Controls resolution, speed, timing & averaging Monitors battery voltage
High-quality audio playback
Direct serial bus connection to controller
Audio DAC
Flexible interface to processor Simplifies system design Minimizes noise
Page 22 UNIT - 3
TECHNOLOGICAL ASPECTS OF EMBEDDED SYSTEM : Interfacing between analog and digital blocks, Signal conditioning, digital signal processing, DAC & ADC interfacing, Sample & hold, multiplexer interface Internal ADC interfacing (excluding 6805 & 6812), Data Acquisitio n System and Signal conditioning using DSP.
Analog-to-digital and digital-to-analog I/O concepts
Analog refers to physical quantities that vary continuously instead of discretely. Physical phenomena typically involve analog signals. Examples include temperature, speed, position, pressure, voltage, altitude, etc. Microprocessors work with digital quantities (values taken from the discrete domain). For a digital system to interact with analog systems, conversion between analog and digital values is needed. Building blocks to perform the conversions are: (1) Digital to analog converters (DACs), (2) Analog to digital converters (ADCs). A digital to analog converter has a digital input that specifies an output whose value changes in steps. These step changes are in volts or amperes. The analog to digital converter has an input that can vary from a minimum to a maximum value of volts or amperes. The output is a digital number that represents the input value.
Transducers
A device that converts a process variable (ex. Car speed) into an electrical signal or vice versa. Sensors (Input transducers): Potentiometer (position); strain gauge, piezoelectric device (force); thermistor, thermocouple (temperature); photoconductive cell, phototransistor (light); current transformer, SENSEFET (current); microphone (sound), etc.
Actuators (Output transducers): solenoids, relays, speakers; darlington transistors, triacs, etc.
Some common sensors
Signal Conditioning
Signal conditioning is sometimes necessary because raw sensor outputs are not always suitable for analog-to-digital conversion.
• Amplification: Op amps are preferred because of their performance characteristics
Open Loop gain: several hundred thousand, input current ~0, output impedance ~0.
• Filtering: LPF
Page 24 Concepts and terminology
De finitions
• Offset: minimum value
• Span: maximum value – minimum value of Some common spans: range of 0 V to 5 V: span = 5 V
range of –12 V to 12 V: span = 24 V range of 4 mA to 20 mA: span = 16 mA
• Weight: The analog change corresponding to a change in a bit in the digital number. • Step size: span / 2n
(Typically, the digital representation is an unsigned n- bit integer) (n is the number of bits in the corresponding digital code. e.g. n=0 for a 1-bit number) • Resolution: Same as step size. Weight of the LSB.
Example: Analog signal in range +5 to -5 volts, 8- bit ADC: Offset = – 5 V
Span = 10 V
Step size = 10 / 256 = 39.1 mV
Notice that the MSB has a weight of 5 V (= span/ 2), and the LSB has a weight of .0391 V
Equations
Analog number = (bn-1 2–1 +… b0 2-n) x step size + offset
= (digital number x step size) + offset
Digital number = (analog number – offset) / (step size)
These equations hold true as long as the numbers are within the range. If the input of an A/D is below the minimum or above the maximum of the range, the corresponding digital value will be minimum or maximum, respectively. In practice, extreme input swing beyond the specified range may damage the device.
Example:
6-bit D/A converter, analog output range:-2.5 to 5 volts. Calculate the analog output when the input is %010101 (decimal 21) Offset: -2.5 V Span: 7.5 V Step size: 0.1172 V Analog number = 21 x 0.1171 –2.5 = -0.039 V
Example: As an example the following table lists some values for -5 V to +5 V analog ranges to 8-bit digital conversion:
Analog (V) Digital (hex)
-5 00 -3.75 20 -2.5 40 -1.25 60 0 80 1.25 A0 2.5 C0 3.75 E0 5-0.0391=4.961 FF Digital-to-Analog Converters
A DAC takes an n- bit digital input and output a corresponding analog voltage. DAC systems normally consist of three components: (a) A reference voltage, (b) The DAC itself, (c) An op amp for output buffering.
Page 26 Many digital-to-analog converters use R-2R ladder network. Inverted ladder type of network is shown in the figure below. The switches are analog switches controlled by digital signals. The output voltage (V) is proportional to the binary input. Each branch of the ladder network contributes current whose value is proportional to the bit weight of that branch. The amplifier circuit sums the current components to produce a voltage proportional to the binary input.
CITSTUDENTS.IN
Interfacing DAC to microprocessor system
DAC integrated circuits are available with different bit resolutions. In principle, any DAC can be interfaced to any microprocessor system. In practice, some combinations of DACs and
microprocessors are easier than others and require much simpler hardware and software in the interface. Here, interfacing a 12-bit DAC to an 8-bit microprocessor will be considered. This will serve to show how to mate different bit resolutions with different size data buses. Also, the importance of double buffering will be illustrated.
Page 28 The figure given above shows an interface for a microprocessor operating in expanded multiplexed mode. The latches are used to convert a sequence of 2 bytes into one 12 -bit word. To output a 12-bit word, the microprocessor writes the data in two steps. First, it puts the upper 4 bits on the lower nibble of the data bus. Then it selects the latch address. The address decoder decodes the address and drives the latch chip select input low. Also, the microprocessor d rives the address line A0 low so that only the 4-bit latch accepts data from the data bus. Then the microprocessor repeats the sequence for the lower 8 bits except that it drives A0 high. The other purpose of the latches is to provide the double buffering. The updated latch data is not transferred to the DAC until the microprocessor drives the control line to latch in data to the buffer in the DAC. DAC does not change its output until Ḹ is driven low. Note that this is important when there is a change in the upper nibble.
Analog-to-Digital Converters
The function of ADCs is to quantize the analog voltage and then output the corresponding digital code value. As with the DAC conversion, a full- scale analog voltage will be divided into 2 quantization levels or steps for an n- bit digital coding scheme. Several techniques are used to do the conversion. Among them successive approximation which has a medium conversion speed (nominally 20 ms) is common in computer systems.
The ADC has a built in DAC. A sample and hold circuit stores an analog input. The ADC logic steps through a sequence of trial-and-error guessing to find the digital equivalent of the input. It begins the sequence by sending a digital signal that is at midrange to the DAC. The analog output Vout from the DAC is compared to the analog input Vin from the sample-and-hold circuit.
Thus, the ADC determines whether the analog input is above, at or below half scale. It continues determining to which half of the next range selection the analog input belongs.
CITSTUDENTS.IN
DIGITAL +- ---,
OUTPUT
DONE
CONVfRSION _ ,
VIN from on onolog sample end hold circuit
COt.lP.ARATOR
LOGIC
DAC
v
1----'-- oOUT analog
(a)
Block Diagram of Successive-ApproximationSystem
Cout high if VIN > VOUT
Cout low if V1N S VOUT
(b)
Operation of ComparatorPage 30
Successive Approximation example
STEP 1 Start with 05 = 1 Guess Low Keep 05 = 1 STEP 2 Start with 04 = 1 Keep 04 = 1 Guess Low
STEP 3 Start with 03 = 1
Reset 03 = 0
Guess High
68HC11 A/D Converter
The 68HC11 has a built-in A/D subsystem, but it does not have a D/A, although it can easily be interfaced to one. External D/A converter such as DAC0808 ( 8-bit D/A) can be used. 68HC11 uses an A/D which in turn uses a D/A to generate internal signals as part of the process to convert analog to digital. This is common to many types of A/Ds.
68HC11 supports 8 input ADC channels
Channels are located on port E (Channel 0 on PE0, Channel 1 on PE1, etc.)
In performing A/D conversions, 4 conversions are performed as a "block," each taking 32 cycles -- 128 cycles total
Control registers:
o OPTION ($ 1039): ADPU and CSEL bits
o ADCTL ($ 1030): Control and status information
Page 32 o ADR1 - ADR4 ($ 1031 - $1034): Result registers
More detailed description for conversion
DAC is replaced by a series of capacitors that are charged to the voltages that correspond to the weights of each bit
• During the sample mode, the capacitors are charged. This total charge is proportional to the input analog signal. For the duration of the conversion process, this total charge remains conserved. The A/D switches to the hold mode and then to the approximation mode. The approximation mode is a sequence of successive approximation steps that switches different capacitors to modify the input voltage to the comparator. The result of each step sets or resets a corresponding bit in a successive approximation register (SAR). • VRH is normally set to the signal maximum (analog value for digital data $FF) and VRL is
set to minimum (analog value of $00). However, VRH should not be higher than 6 V and
VRL should not be lower than ground, and VRH - VRL should be greater than 2.5 V.
• 8-bit outputs from four successive conversions are placed into analog data registers ADR1-ADR4.
68HC11 A/D related Registers
The MCU on the EVB has an 8-bit register at location $1030 that is the A/D‘s control and status register (ADCTL). Bits 0-5 are the control bits and may be read from or written to. Bit 6 is not used and is always read as logic 0. Bit 7 is a status bit and can only be read. Data written to this bit is ignored.
Data Acquisition Systems (DAS)
Data acquisition systems (DAS) interface between the real world of physical parameters, which are analog, and the artificial world of digital computation and control. With current emphasis on digital systems, the interfacing function has become an important one; digital systems are used widely because complex circuits are low cost, accurate, and relatively simple to implement. In addition, there is rapid growth in the use of microcomputers to perform difficult digital control and measurement functions. Computerized feedback control systems are used in many different industries today in order to achieve greater productivity in our modern industrial societies.
Page 34 paper production, oil refining, chemical manufacturing, textile production, cement manufacturing, and others. The devices that perform the interfacing function between analog and digital worlds are analog-to-digital (A/D) and digital-to-analog (D/A) converters, which together are known as data converters. Some of the specific applications in which data converters are used include data telemetry systems, pulse code modulated communications, automatic test systems, computer display systems, video signal processing systems, data logging systems, and sampled data control systems. In addition, every laboratory digital multimeter or digital panel meter contains an A/D converter.
BASIC DATA ACQUISITION SYSTEM
Besides A/D and D/A converters, data acquisition and distribution systems may employ one or more of the following circuit functions:
• transducers, • amplifiers, • filters,
• nonlinear analog functions, • analog multiplexers, • sample-holds.
The interconnection of these components is shown in the diagram of the data acquisition portion of a computerized feedback control system in Figure 1. The input to the system is a physical parameter such as temperature, pressure, flow, acceleration, and position, which are analog quantities. The parameter is first converted into an electrical signal by means of a transducer; once in electrical form, all further processing is done by electronic circuits.
Next, an amplifier boosts the amplitude of the transducer output signal to a useful level for further processing .
Transducer outputs may be microvolt or milll ivolt level signals, which are then amplified to 1 to 10 V levels. Furthermore, the transducer output may be a highimpedance signal, a differential
signal with common-mode noise, a current output, a signal superimposed on a high voltage, or a combination
The amplifier, in order to convert such signals into a high-level voltage, may be one of several specialized types. The amplifier is frequently followed by a low-pass active filter that reduces high-frequency signal components, unwanted electrical interference noise, or electronic noise from the signal. The amplifier is sometimes also followed by a special nonlinear analog function circuit that performs a nonlinear operation on the high-level signal. Such operations include squaring, multiplication, division, rms conversion, log conversion, or linearization. The processed analog signal next goes to an analog multiplexer, which switches sequentially between a number of different analog input channels each input is in turn connected to the output of the multiplexer for a specified period of time by the multiplexer switch. During this connection time, a sample-hold circuit acquires the signal voltage and then holds its value while an A/D converter converts the value into digital form. The resultant digital word goes to a computer data bus or to the input of a digital circuit.
Thus the analog multiplexer, together with the sample hold, time shares the A/D converter with a number of analog input channels. The timing and control of the complete DAS is done by a digital circuit called a programmer sequencer, which in turn is under the control of the computer.
In some cases, the computer itself may control the entire DAS. While this is perhaps the most
Page 36 signals, low-level multiplexing is sometimes used with the amplifier following the multiplexer. In such cases, just one amplifier is required, but its gain may have to be changed from one channel to the next during multiplexing. Another method is to amplify and convert the signal into digital form at the transducer location and send the digital information in serial form to the computer. Here, the digital data must be converted to parallel form and then multiplexed onto the computer data bus.
Signal conditioning using DSP
The use of a digital signal processor offers the designer the ability to compensate for, or to completely avoid, the limitations outlined in the last section. The effects of residual null signal and transducer non-linearity can be compensated by digital error correction, while the use of digital demodulation techniques make the system insensitive to spurious phase shifts up to ±90 degrees. A software correction algorithm is easily able to compensate for static errors in the output measurement by means of a software correction map. The software determines a correction offset y interpolation between the nearest points in the map and applies it to the measurement – a simple process taking only a few CPU cycles. The correction map is stored in internal non-volatile memory, and can be programmed during routine calibration of the transducer.
UNIT – 4
DESIGN TRADE OFFS DUE TO PROCESS INCOMPATIB ILITY, THERMAL CONSIDERATIONS:
Issues in embedded system design. Design challenge, design technology, tradeoffs. Thermal considerations.
Issues in embedded system design
Embedded computers typically have tight constraints on both functionality and implementation. In particular, they must guarantee real time operation reactive to external events, conform to size and weight limits, budget power and cooling consumption, satisfy safety and reliability requirements, and meet tight cost targets.
Real time/reactive operation
Real time system operation means that the correctness of a computation depends, in part, on the time at which it is delivered. In many cases the system design must take into account worst case performance. Predicting the worst case may be difficult on complicated architectures, leading to overly pessimistic estimates erring on the side of caution. The Signal Processing and Mission Critical example systems have a significant requirement for real time operation in order to meet external I/O and control stability requirements.
Reactive computation means that the software executes in response to external events. These events may be periodic, in which case scheduling of events to guarantee performance may be possible. On the other hand, many events may be aperiodic, in which case the maximum event arrival rate must be estimated in order to accommodate worst case situations. Most embedded systems have a significant reactive component.
Design challenge:
Worst case design analyses without undue pessimism in the face of hardware with statistical performance characteristics e.g., cache memory.
Page 38 Small size, low weight
Many embedded computers are physically located within some larger artifact. Therefore, their form factor may be dictated by aesthetics, form factors existing in pre-electronic versions, or having to fit into interstices among mechanical components. In transportation and portable systems, weight may be critical for fuel economy or human endurance. Among the examples, the Mission Critical system has much more stringent size and weight requirements than the others because of its use in a flight vehicle, although all examples have restrictions of this type.
Design challenges:
Non-rectangular, non-planar geometries.
Packaging and integration of digital, analog, and power circuits to reduce size.
Safe and reliable
Some systems have obvious risks associated with failure. In mission-critical applications such as aircraft flight control, severe personal injury or equipment damage could result from a failure of the embedded computer. Traditionally, such systems have employed multiply-redundant computers or distributed consensus protocols in order to ensure continued operation after an equipment failure.
However, many embedded systems that could cause personal or property damage cannot tolerate the added cost of redundancy in hardware or processing capacity needed for traditional fault tolerance techniques. This vulnerability is often resolved at the system level as discussed later.
Design challenge:
Low-cost reliability with minimal redundancy.
Harsh environment
Many embedded systems do not operate in a controlled environment. Excessive heat is often a problem, especially in applications involving combustion (e.g., many transportation applications). Additional problems can be caused for embedded computing by a need for protection from vibration, shock, lightning, power supply fluctuations, water, corrosion, fire, and general physical abuse. For example, in the Mission Critical example application the computer must function for a guaranteed, but brief, period of time even under non-survivable fire conditions.
Design challenges:
Accurate thermal modeling.
De-rating components differently for each design, depending on operating environment.
Cost sensitivity
Even though embedded computers have stringent requirements, cost is almost always an issue (even increasingly for military systems). Although designers of systems large and small may talk about the importance of cost with equal urgency, their sensitivity to cost changes can vary dramatically. A reason for this may be that the effect of computer costs on profitability is more a function of the proportion of cost changes compared to the total system cost, rather than compared to the digital electronics cost alone. For example, in the Signal Processing system cost sensitivity can be estimated at approximately $1000 (i.e., a designer can make decisions at the $1000 level without undue management scrutiny). However, with in the Small system decisions increasing costs by even a few cents attract management attention due to the huge multiplier of production quantity combined with the higher percentage of total system cost it represents.
Design challenge:
Variable "design margin" to permit tradeoff between product robustness and aggressive
Page 40 Design challenge
Design matrics:
A Design metric is a measure of implementations features such as cost, size, performance and power. Embedded system
must cost less
must be sized to fit on a single chip. must perform in real time (response time
The embedded system designer must be designed to meet the desired functionality. Apart meeting the functionality, should also consider optimizing numerous design metrics.
Common design metrics that a design engineer should consider:
NRE( non recurring engineering Cost) : The one time monetary cost of designing the system.
Unit cost: Monetary cost of manufacturing each copy of the system, excluding NRE cost.
Size: physical space required by the system. Often measured in terms of bytes in case of software, and no. of gates in terms of hardware.
Performance: execution/response time of the system.
Power: The amount of power consumed by the system, which may define lifetime of the battery and cooling requirement of IC. More power means more heat.
Flexibility: ability to change the functionality of the system.
Time to prototype: time needed to build a working system w/o incurring heavy NRE.
Time to market: time required to develop & released to the market.
Maintainability: ability to modify the system after its release to the market.
Correctness: our confidence that we have implemented system‘s functionality correctly. Safety: probability that the system does not cause any harm.
Metrics typically compete with one another: improving one often leads to worsening of
Page 42 Time to Market Design Metric:
De s ign me tric compe tition
The time to market: Introducing an embedded system early to the market can make big difference in terms of system‘s profitability
Market windows generally will be very narrow, often in the order of few months. Missing this window can mean significant loss in sales.
Time to Market
(A) Market window and simplified revenue model for computing revenue loss
Let‘s investigate the loss of revenue that can occur due to delayed entry of a product in the market. We can use a simple triangle model y axis is the market rise, x axis to represent the point of entry to the market. The revenue for an on time market entry is the area of the triangle labeled ‗on time‘ and the revenue for a delayed entry product is the area of the triangle labeled ‘Delayed‘. The revenue loss for a delayed entry is the difference of these triangle‘s areas.
% revenue loss = ((on time – Delayed)/on time)*100 % The area of on time triangle = ½ * base * height
W -- height the market raise
D -- Delayed entry (in terms of weeks or months) 2W – product‘s life time
Area of on time triangle = ½*2W*W
Area of delayed triangle=1/2*(W-D+W)*(W-D)
%age revenue loss = (D (3W- D)/2W*W) * 100 % Ex: product‘s life time is 52 weeks
Delay of entry to the market is 4 weeks Percentage revenue loss = 22%
By converting behaviour on general-purpose processors to assembly code, and by converting behaviour on single purpose processors to a connection of register-transfer components and state machines. The designer then refines the RT level specification into a logic specification. The NRE and Unit cost Design metrics:
Unlike other design metric the best technology choice will depend on the no of units.
Tech: A would result in NRE cost $2000 unit cost $100
B $30000 $30
C 100000 $2
Page 44 Total cost= NRE cost + unit cost* no of units
Per product cost = total cost/no of units
= NRE cost/no of units + unit cost
The performance Design metric:
Performance of a system is a measure of how long the system takes to execute our desired tasks. There are several measures of performance. The two main measures are:
Latency or response time
Throughput : no of tasks that are processed in unit
‗speed up‘ is a method of comparing performance of two systems Speed up of A over B = performance of A/performance of B.
DESIGN TECHNOLOGY:
Design technology involves the manner in which we convert our concept of desired system functionality into an implementation. We must not only design the implementation to optimise design metrics, but we must do so quickly.
Variations of a top-down design process have become popular in the past decade, an ideal form of which is illustrated in the figure. The designer refines the system through several abstraction levels. At the system level the designer describes the desired functionality in an executable language like C. This is called system specification.
The designer refines this specification by distributing portions of it among several general and/or single purpose processors, yielding behavioural specifications for each processor.
The designer refines these specifications into register-transfer (RT) specifications
Finally, the designer refines the remaining specifications into an implementation consisting of machine code for general purpose processors and a design gate level net list for single purpose processors.
Deal top-down design process, and productivity improvers .
There are three main approaches to improving the design process for increased productivity, which we label as compilation/synthesis, libraries/IP, and test/verification. Several other approaches also exist.
Compilation/Synthesis
Compilation/Synthesis lets a designer specify desired functionality in an abstract manner, and automatically generates lower-level implementation details. Describing a system at high abstraction levels can improve productivity by reducing the amount of details, often by an order of magnitude, that a design must specify.
Page 46 A logic synthesis tool converts Boolean expressions into a connection of logic gates (called a net list). A register-transfer (RT) synthesis tool converts finite-state machines and register-transfers into a data path of RT components and a controller of Boolean equations. A behavioral synthesis tool converts a sequential program into finite-state machines and register transfers. Likewise, a software compiler converts a sequential program to assembly code, which is essentially register- transfer code. Finally, a system synthesis tool converts an abstract system specification into a set of sequential programs
on general and single-purpose processors.
The relatively recent maturation of RT and behavioral synthesis tools has enabled a unified view of the design process for single-purpose and general-purpose processors. Design for the former is commonly known as ―hardware design,‖ and design for the latter as ―software design.‖ In the past, the design processes were radically different – software designers wrote sequential programs, while hardware designers connected components.
The co-design ladder: Recent maturation of synthesis enables a unified view of hardware and software.
Libraries/IP
Libraries involve re-use of pre-existing implementations. Using libraries of existing implementations can improve productivity if the time it takes to find, acquire, integrate and test a library item is less than that of designing the item oneself. A logic-level library may consist of layouts for gates and cells. An RT-level library may consist of layouts for RT components, like registers, multiplexors, decoders, and functional units. A behavioral-level library may consist of commonly used components, such as compression components, bus interfaces, display controllers, and even general purpose processors. The advent of system-level integration has caused a great change in this level of library.
Test/Verification
Test/Verification involves ensuring that functionality is correct. Such assurance can prevent time-consuming debugging at low abstraction levels and iterating back to high abstraction levels. Simulation is the most common method of testing for correct functionality, although more formal verification techniques are growing in popularity. At the logic level, gate level simulators provide output signal timing waveforms given input signal waveforms.
Page 48 Likewise, general-purpose processor simulators execute machine code. At the RT-level, hardware description language (HDL) simulators execute RT-level descriptions and provide output waveforms given input waveforms. At the behavioral level, HDL simulators simulate sequential programs, and co- simulators connect HDL and general purpose processor simulators to enable hardware/software co- verification. At the system level, a model simulator simulates the initial system specification using an abstract computation model, independent of any processor technology, to verify correctness and completeness of the specification.
More productivity improve rs
There are numerous additional approaches to improving designer productivity. Standards focus on developing well-defined methods for specification, synthesis and libraries. Such standards can reduce the problems that arise when a designer uses multiple tools, or retrieves or provides design information from or to other designers. Common standards include language standards, synthesis standards and library standards.
Languages focus on capturing desired functionality with minimum designer effort. For example, the sequential programming language of C is giving way to the object oriented language of C++, which in turn has given some ground to Java. As another example, state -machine languages permit direct capture of functionality as a set of states and transitions, which can then be translated to other languages like C.
Frameworks provide a software environment for the application of numerous tools throughout the design process and management of versions of implementations. For example, a framework might generate the UNIX directories needed for various simulators and synthesis tools, supporting application of those tools through menu selections in a single graphical user interface.
Thermal considerations
Embedded Applications differ from the typical desktop, server and mobile markets. Some of the different requirements for embedded applications include higher ambient temperatures, need for higher max component temperature spec, low platform power, long life support, small form factors, and extended usage conditions (24 x 7 x 365 operation). Due to these differences there are special considerations for
component and system level thermal solution design. Thermal solution design requires an engineer to fully understand the system and various form factor boundary conditions and component level attributes. This document will define thermal cooling schemes: passive, active and fan less thermal solutions and their difference via the three modes of heat transfer (conduction, convection, and radiation). The thermal performance metrology will be explained, using a thermal resistance calculation and how to apply to Intel components. The methodology will highlight typical Intel component specifications such as TJ -MAX, TCASE-MAX, TAMBIENT and Thermal Design Power (TDP). In addition some thermal features such as the Digital Thermal Sensor (DTS) and Thermal Monitor will be explained.
Computing platform component power has decreased as a result of silicon technology improvement. However, it is still critical to cool the components to adequately ensure a product‘s long-life reliability. In embedded applications, there are challenges which are more demanding than the general computing systems such as desktops, notebooks, and workstations/servers. The major differences are the target usage model and operating environment. Typically, embedded applications are in harsh environments, such as outdoors, factory assembly lines, and telecomm base stations. Conversely, the usual desktop, mobile, and workstation/ server are typically deployed in homes, offices, and data centers where there are controlled environmental conditions.
Intel provides a wide variety of embedded processors and chipsets that have features and specifications that are suited for embedded markets. These components typically have high maximum temperatures limits, long life availability and features such as Digital Thermal Sensor and Enhanced Intel SpeedStep® Technology. All of these features will aid the embedded thermal engineer in designing robust thermal solutions for Intel Architecture.
Cooling Methods
There are three basic types of thermal solutions for electronics cooling: passive thermal solutions, active thermal solutions and fan less thermal solutions. The type of cooling solution used in an embedded system will vary depending on the form factor, component specifications, and boundary conditions. All thermal solutions rely on the three modes of heat transfer to dissipate the heat from the component: conduction, convection and radiation.