Академический Документы
Профессиональный Документы
Культура Документы
SHIBU K V
An embedded system is an electronic/electromechanical system designed to perform a specific function and is a combination of both hardware and firmware (software)
EMBEDDED SYSTEM
To
perform a specific function Combination of both h/w and s/w May or may not contain an O.S The firmware of the embedded system is preprogrammed and it is non alterable by the end user
CLASSIFICATION OF ES
1. Based on generation 2. Complexity & performance requirements 3. Based on deterministic behavior 4. Based on triggering
First generation : 8 bit p like 8085- simple h/w f/w in assembly code Second generation : 16 bit p and 8/16 bit c instruction set much more complex Third generation : 32 bit p and 16 bit c DSP and ASIC came to picture pipelining evolved Fourth generation : advent of SOC multi core processors- making use of high performance RTES What is next?
Simple Not time critical Low performance Low cost May or may not contain o.s
medium scale embedded Slight complex in h/w and s/w Medium performance Low cost Usually contain an o.s
system:
Highly complex h/w and s/w Demanding high performance May contain multi-core processors and co processors Usually contain RTOS for task scheduling and prioritization management
Consumer electronics House hold appliances Security systems Automotive industry Telecom Computer networking systems Healthcare Measurement and instrumentation Banking & retail Card readers
Data collection/storage/representation Data communication Data processing Monitoring Control Application specific user interface
communication interface
System core
The core of the embedded system falls in to any one of the following categories 1. general purpose and domain specific processors ( p, C, DSP ) 2. ASIC(Application specific IC) 3. programmable logic devices (PLD) 4. commercial off-the-shelf components (COTS)
P Vs C
P Representing a CPU performing ALU operations according to a pre defined set of instructions It is a dependent unit requires other chips like timers , memory chips etc Doesn't contain built in I/O port Limited power saving options Mostly general purpose in in design and operation
Highly integrated chip that contains CPU, RAM, on chip ROM , timer etc
RISC
RISC VS CISC
CISC
Lesser no. of instruction Instruction pipeline Orthogonal instruction set(operates on any register and any addressing mode) Operations are performed on registers only except load and store Large no. of registers are available
Greater no. of instructions Generally no instruction pipelining Non-orthogonal instruction set Operations are performed on registers or memory Limited no. of registers are available
Programmer needs to write more code to Programmer can achieve the same with a execute a task single instruction Fixed length instruction Less silicon usage Variable length instructions More silicon usage since additional decoder logic is used for complex instruction Can be Harvard or Von Neumann
Cheaper
Allows self modifying codes( modifies while execution)
Since data memory and program memory are stored physically in different locations Since data memory and program memory are stored physically in same chip chances no chances for corruption of program for corruption of program memory memory
Specifies the order in which the data is stored in the memory in multi byte system If word length is 2 byte then data can be stored in 2 ways
Higher order of data byte at higher memory and lower order just below that Lower order of data byte at higher memory and higher order just below that
Byte 3 Byte 2 Byte 1 Byte 0 Big endian Big endian higher order byte of data at lowest address
Load content of memory location loaded to a register Stored- stores the content of data from the specified register to specified memory E.g.. Add contents of memory locations x,y and store the result in location z
Instruction pipelining
conventional instruction execution fetchdecode-execute Instruction pipelining refers to the overlapped execution of instructions Processing speed can be increased
ASIC
A micro chip designed to perform a unique application It integrates several functions to a single chip and there by reduces the cost Consumes a very small area and there by helps in the design of smaller systems Can be pre-fabricated or custom fabricated Profitable only for large volume productions
Logic devices can be classified into two (fixed and programmable) Circuits in fixed logic device are permanent- (for one function or set of functions) they can not be changed PLD offer customers a wide range of logic capacity, features, speed etc. final design is completed much faster than that of fixed logic device During design phase customers can change the circuitry as often as they want PLDs are based on re-writable memory Once design is final customers can go into many PLDs as they need
Two major types of PLDs are field programmable gate arrays and complex programmable logic devices FPGA highest logic density, most features, highest performance Offers built in h/w processors, clk management systems, device to device signaling Used in wide range of applications telecom, DSP etc
CPLD - Small amount of logic density Offer very predictable timing characteristics and so ideal for critical control applications Usually requires low amount of power Very inexpensive Ideal for cost-sensitive, battery operated Ideal of portable applications such as mobile phones
Advantages of PLD
Offer customers much more flexibility during design cycle Do not require long lead time for production part Allows customers to orders just number of parts they need, when they need them Can be reprogrammed. To add new feature simply upload a new programming file to the PLD via internet
Provides easy integration and interoperability with existing system components. May be developed around a general purpose/domain specific processor/application specific processor E.g.- remote controlled toy car control units like RF circuitry part, ADC , UV detectors etc. Readily available in the market Cheap Developer can cut down development time since no operational and manufacturing standards end user should stick to a particular vendor for a particular COTs Manufacturer of the COTS component may withdraw the product at any time
Memory
PROM
MROM
EPROM
EEPROM
MASKED ROM
One time programmable Pre programmed by the manufacturer Make use of hardwired technology for storing data Least expensive MROM is permanent in bit storage, it is not possible to alter the bit information
PROM (OTP)
Not pre- programmed by the manufacturer End user is responsible for programming Programmed by PROM programmer which selectively burns the fuses Fuses which are burned represents 0 and not burned represents 1 Can not be reprogrammed Not useful for development
EPROM
Gives flexibility to reprogram the same chip Stores information by changing the floating gate of an FET Quartz crystal window is used to erase information It needs to be taken out and put in UV eraser for 20 to 30 min which is time consuming Tedious & time consuming
EEPROM
Information can be altered by using electrical signals Can be reprogrammed in circuit Can be erased in few milliseconds Capacity is limited compared with standard ROM
FLASH
Latest and most popular Combines re programmability of EEPROM and high capacity of standard ROM Stores information in array of MOSFET Erasing can be done at sector /page level
RAM
It
is data memory Read from it & write to it RAM is volatile power turned off, content destroyed Direct access memory
RAM
SRAM, DRAM AND NVRAM SRAM- stores data in the form of voltage Made up of flip flop Fast .Typical access time is 10ns Low capacity High cost Minimum of 6 transistors are used to build a memory cell Does not require refreshing
DRAM
Made up of MOSFET and a capacitor Requires refreshing High capacity Less expensive Slow . Typical access time is 60ns NVRAM Its RAM with battery backup Contains SRAM and a minute battery Life span is around 10 years
Memory shadowing
Execution of ROM is very slow compared to RAM RAM access is three times as fast as ROM This is to solve the execution speed problem in processor based system ROM BIOS is read and the system is configured according to it during system boot up( its time consuming) During boot up copy the BIOS to the shadowed RAM and write protect the RAM then disable the BIOS reading
i/o subsystems
Facilitates the interaction o the embedded system with the external world LED: o/p device Pn junction diode Anode to +ve terminal and cathode to ve terminal A resistor in series to limit the current 7 segment LED display o/p device to display alphanumeric characters 8 LEDs a- g segments Two configurations- common anode and common cathode Used for low cost application
Optocoupler To isolate two parts or a circuit (for suppressing interference in data communication, high voltage separation etc) Combines a LED and a photo-transistor in a single package Can be used in i/p and o/p circuits Stepper motor Electro- mechanical device which generates discrete displacement in response to dc electrical signals Dc motor gives continuous rotation Consumer electronic products, robotics control, paper feed mechanism of a printer
Two phase stepper motor is classified into two. Uni polar and bi polar Unipolar: contains two winding per phase Direction of rotation is controlled by changing direction of current Current in one direction flows through one coil and in opposite direction through the other coil
Bipolar: Contains single winding per phase for reversing the motor rotation the current flow through the winding is reversed. The stepping of stepper motor can be implemented by changing sequence of activation of the stator windings
HALF STEP: Combination of wave and full step step Coil a Coil bstability Coil c Coil d Highest torque and
1 2 3 4 5 6 7 8 H H L L L L L H L H H H L L L L L L L H H H L L L L L L L H H H
RELAY
Electro-mechanical device Contains a relay coil made up of insulated wire on a metal core and a metal armature with one or more contacts When voltage is applied to relay coil , current flows and generates magnetic field which attracts armature core and moves the contact point Widely used configurations are single pole single throw normally open, single pole single throw normally closed, single pole double throw
Piezo buzzer: is a piezoelectric device for generating audio indications in embedded application Contains piezo electric diaphragm which produces sound in response to the voltage Self driving and external driving (predefined tone and different tone) Push button switch:It is an input device. Push to make and push to break (normally closed and normally opened) In the pushed state it breaks/makes circuit connection Used for generating a momentary pulse Used as reset and start in embedded application Depending on the way in which push button interfaced to the controller it can generate either a HIGH or LOW pulse
Key board: input device of user interfacing Can use push button switches , but it is a wastage of port pins So matrix key board which reduces the number of interface connections For detecting a key press uses scanning technique. To prevent de-bounce issue a technique should be applied s/w technique and h/w technique s/w easy to implement and the key is read after debounc e delay PPI: To extend i/o capabilities of processors 8255 is popular Supports 24 i/o pins which ca be grouped in to 8 bit parallel ports (port A, port B, port C)
Communication interface
For communicating with various subsystems of the embedded system and with external world
for interconnecting the various ICs and other peripherals within embedded system I2C bus (inter integrated circuit bus) Synchronous bidirectional half duplex two wire serial interface bus Comprise of two bus lines, serial clock and serial data (SCL and SDA) Many number of I2C devices can be connected Devices connected to I2C can act as master or slave device I2C bus three different data rates (100kbps,400kbps,3.4mbps)
Serial peripheral interface SPI bus: Synchronous, bidirectional, full duplex four wire serial interface bus Its a single master multi-slave system Requires four signal lines for communication (master out slave in, master in slave out, serial clock, slave select) Master device is responsible for generating the clock signal Master selects the required slave device SPI works on the principle of shift register. Master and slave devices contain a special shift register for the data to transmit or receive. Size of SR is device dependent. Normally it is a multiple of 8 Compared to I2C ,SPI is most suitable for transfer of data in streams Limitation is , it doesnt support an acknowledgement mechanism
UART (universal asynchronous Receiver Transmitter) Asynchronous form of data transmission Serial data transmission doesnt require a clock signal to synchronize the end of transmission It relies upon the pre defined agreement between the devices For proper communication the transmit line of the sending device should be connected to the receiving device It also provides h/w handshaking signal support for controlling the serial data flow Nowadays most the microprocessors are available with integrate UART functionality
1-wire interface asynchronous half duplex communication protocol It makes use of only a single signal line called DQ for communication and follows master-slave communication model It allows power to be sent along the signal wire as well.(I2C uses internal capacitor to power the device) Supports a single master and one or more slave devices Every 1-wire device contains a globally unique 64 bit id no stored within it for addressing Communication over the 1-wire bus is divided into timeslots of 60micro sec
Parallel interface:
Used for communicating with peripheral device which are memory mapped to the host of the system Device which supports parallel bus can directly connect to this bus Controlled by the control signal interface between the device and the host(rd/wr,select) Always initiated by host processor, if device wants to initiate then it should use interrupts Direction of data is controlled by rd/wr Decoder circuit activates the chip select line to activate the device
Universal serial bus:Wired high speed serial bus for data communication
Follows star topology with a USB host at the centre and one or more USB peripheral devices connected to it. Transmits data in packet format Improves the noise immunity Has the ability to supply power to the connecting devices Mini and micro USB connectors are available for small form factor devices like portable media player Supports four different types of data transfers 1 control: s/w to query, configure and issue commands to the USB device 2 Bulk: for sending block of data to a device, 3 Isochronous data: for real time data communication (data transmitted as streams in real time. Does not support error checking and retransmission. Audio devices and medical equipment) 4 Interrupt transfer: for transferring small amount of data.
IEEE 1394( Firewire): wired, isochronous high speed serial communication bus Supports peer to peer connection and point to multipoint communication Allowing 63 devices to be connected on the bus in a tree topology Can support a cable length of up to 15ft Supports data rate of 400 to 3200 Mbits/sec Supports 3 types of connectors (4pin, 6pin, 9pin) Used of devices like digital camera, camcorder for data transfer and storage Unlike USB doesnt require a host for communicating between devices (directly connect a scanner with a printer) Data rate is far higher than USB h/w implementation costlier than USB
Infrared( IrDA): serial, half duplex, line of sight based wireless technology for data( remote control of TV) Supports point to point and point to multipoint communication Communication range 10cm to 1m IR supports data rates ranging from 9600 bits/s to 16 Mbps Infrared light emitting diode is the IR source and photodiode acts as receiver Has two parts , physical link part and a protocol part Popular for file exchange and data transfer in low cost devices Even now most of the mobile phones supports IrDA
Blue tooth(BT):
low cost, low power, short range wireless technology for data and voice Supports a data rate of up to 1Mbps Range approximately 30ft Like IrDA it has two parts Each BT device has a 48 bit unique identification number Supports point to point and point to multipoint communication A device can act as master or slave Popular in mobile phones
Wi-Fi: wireless fidelity is popular for wireless communication for networked communication Supports IP protocol Each device is addressed by IP address An intermediate agent called wi-fi router Supports data rate 1Mbps- 150 Mbps Offers range of 100- 300ft
ZigBee: low power, low cost, wireless n/w protocol Supports distance upto 100m Supports Data rate of 250Kbps 3 device category ( coordinator, router, end device) Coordinator- acts as the root of the n/w. responsible of initiating the n/w and can store information about the n/w Router-for passing information from one device to other End device-for data communication Eg: smoke detector, heating control , lighting control
General packet radio service(GPRS): for transferring data over a mobile communication n/w like GSM Data is sent as packets At receiving end re constructed by combining packets The radio channel is shared between several users instead of dedicating to a cell phone user Supports IP protocol and PP protocol Mainly for mobile enabled embedded devices
Embedded firmware
Refers to the control algorithm and or the configuration settings that an embedded system developer dumps into the memory of the embedded system Various methodsWrite program in high level languages like embedded C Write the program in assembly language using the instructions supported by your applications target processor These should be converted to machine code before loading to the memory which is called HEX file creation For a beginner it is better to use HLL.(writing code is easy, highly portable, not developer dependent ) Assembly language is tedious , time consuming and highly dependent on developer
Reset circuit: to ensure that the device is not operating at a voltage level when the device is not guaranteed to operate when power ON Reset signal starts the execution from the reset vector from the address 0x0000 Either active H or active L Some micro processors/controllers contains built in reset circuitry
Brown-out protection circuit : protection circuit prevents the processor/controller from unexpected program execution behavior when the supply voltage falls below a specified voltage May lead to data corruption Essential for battery powered devices This holds the processor in reset state until it rises above the threshold voltage
Oscillator unit: is responsible for generating the clock for the processor Certain processors integrate built in oscillator and simply require an external quartz crystal for producing the clock Speed of the processor depends on clock frequency Power consumption increases with increase in clock frequency Accuracy of the program execution depends on accuracy of clock signal
Real time clock: for keeping track of time Holds information like current time, date, month, year and day of the week etc. Should function even in the absence of power. So contains a battery back up Available in the form of IC s Essential for synchronizing the operations of the OS kernel Can interrupt the OS by asserting the interrupt line OS kernel identifies the interrupt ( IRQ no) The kernel can perform necessary operations like system date time updation , managing s/w timers etc
Watchdog timer: To monitor the firmware execution and reset the system processor when the program execution hangs up. ( alt+ctl+del) Its a h/w timer It inc/dec a counter with each clock pulse and generates a reset signal when reaches 0 Most processors implement as built in or using an external IC When watchdog timeout occurs an interrupt is generated instead of resetting in modern systems and interrupt handler handles the situation in an appropriate fashion
Backbone is PCB After finalizing the components and the connection a schematic design is created and PCB is fabricated Apart from subsystems You can have resistor, capacitor, diodes etc on your board
Operates in harsh environment: the environment in which the emb.sys. deployed may be a dusty one or high temperature zone System placed in such areas should be capable to with stand all operating conditions Distributed: emb.sys. may be a part of larger system Automatic vending m/c contains card reader, vending unit etc. They are independent but work together to achieve a common goal Small size and weight: size, weight, shape etc will be one of the deciding factors to choose a product Most applications demands small sized and low weight products Power concerns: designed in such a way as to minimize the heat dissipation May require cooling fan which occupies additional space Even its a critical constraint battery operated systems, more the power consumption the less the battery life
Quality attributes of ES
QA are the non-functional requirements that need to be documented properly in any system design. If the quality attributes are more concrete and measurable it will give a positive impact on the end product Operational QA Non-operational QA
Attributes related to e.s when it is in the operational mode or online mode Response: quickness of the system How fast the system is tracking the changes in input variables In flight control application any response delay in the system will create potential damages to the safety of the flight Response time for a toy is not time critical Throughput: efficiency of the system Rate of production or operation of a defined process Rates can be expressed in terms of units of products , batched produced, or any other meaningful measurements. Generally measured in terms of benchmark (reference point) Reliability: how much % you can rely upon the proper functioning of sys. Mean time between failure MTBF (frq of failure in hr/wk/mon) & mean time to repair MTTR ( how long the system is allowed to be out of order following a failure ) are the terms used in defining the system reliability
Maintainability: deals with the support and maintenance to the end user in the case of technical issues and failures or on the basis of a routine checkup As reliability increases maintainability reduced Two types (preventive or corrective maintenance) User should replace the cartridge after n number of printouts (scheduled / periodic /preventive) If paper feeding part of the printer fails required immediate repairs (maintenance to unexpected failure/ corrective) Ideal value for availability is expressed A = MTBF / (MTBF + MTTR)
Security : confidentiality( from unauthorized disclosure), integrity ( from unauthorized modification) , availability ( from unauthorized users) Safety: deals with the possible damages that can happen to the operators or public Eg. Due to breakdown or emission of radioactive
Portability : measure of system independence If the product is capable of functioning as such in various environments processors/controllers/os Product can be ported to a new platform Should be flexible and portable Assembly language portability is poor
Per unit cost and revenue : cost will be closely monitored by both end users Proper market study should be carried out before deciding per unit cost During design and development only investment no returns Once the product is ready to sell and its introduced to the market product introduction stage In growth phase product grabs high market share During maturity phase the growth and sales will be steady and revenue reaches at its peak Product retirement/decline phase starts with the drop in sales volume, market share and revenue At some point of decline stage the manufacturer announces discontinuing of the product Unit cost is very high during the introductory stage