What Are Embedded Systems?“Special purpose system which are either used as standalone or part of abig system” An Embedded System is one that has computer hardware with softwareembedded in it as one of its important components.An embedded product uses a microprocessor (or microcontroller) to doone task and one task only.A printer is an example of embedded system since the processor inside itperforms only one task; namely, getting the data and printing it
WHERE ARE THEY PRESENT ? Household appliances Integrated systems in aircrafts and missiles Cellular telephones Electric and Electronic Motor controllers Engine controllers in automobiles Calculators Medical equipment’s Videogames Digital musical instruments
The necessary tools for a microprocessor/microcontroller CPU: Central Processing Unit I/O: Input /Output Bus: Address bus & Data bus Memory: RAM & ROM Timer Interrupt
Introduction to Microprocessors“A Microprocessor is a general purpose chip used to create multifunctiondevice ”No RAM, ROM, I/O ports on CPU chip itselfCPU is stand-alone, Must add RAM, ROM, I/O ports, and timersexternally to make them functionalDesigner can decide on the amount of ROM, RAM and I/O portsExample ： Intel’s x86, Motorola’s 680x0
Introduction to Microcontrollers“A Microcontroller is a computer-on-a-chip optimized to control Electronicdevices”CPU + I/O + Timer(s) [+ ROM] [+ RAM] All on single chipLimited RAM space, ROM space and I/O pinsLow chip-count to implement a small systemLow-cost at large quantitiesDevelopment tools readily available at reasonable cost
Microprocessor System Contrasted With Microcontroller System
Microprocessor vs. MicrocontrollerMicrocontroller Microprocessor• CPU, RAM, ROM, I/O and • CPU is stand-alone, RAM, timer are all on a single chip ROM, I/O, timer are separate• Fix amount of on-chip ROM, • Designer can decide the amount RAM, I/O ports of ROM, RAM and I/O ports• For applications in which cost, power and space are critical • Expansive• Not Expansive • Versatility• Single-purpose • General-purpose
Criteria for Choosing a Microcontroller Following must be kept in mind while choosing a microcontroller Speed Packaging Power consumption The amount of RAM and ROM on chip The number of I/O pins and the timer on chip How easy to upgrade to higher performance or lower power- consumption versions Cost per unit
Microcontroller Architectures Memory 0 Address Bus Program CPU Data Bus + Data Von Neumann 2n Architecture Memory Address Bus 0 Program CPU Fetch Bus Harvard Address Bus 0 Architecture Data Bus Data
Features Of 8051 The Intel 8051 is used in embedded systems has 8-bit CPU 4k bytes ROM for the program 128 BYTES of RAM for variables 32 I/O lines ( 4 PORTS WITH 8 EACH ) 2 timers 6 interrupt sources Low cost per chip
I/0 Ports:-8051 microcontroller has four I/O ports P0, P1, P2 and P3 each use 8 pins makingthem 8 bit ports. All the ports can be used as either input or output•Port 0: Port 0 occupies a total of 8 pins (pins 32-39) .It can be used for input oroutput. To use the pins of port 0 as both input and output ports, each pin must beconnected externally to a 10K ohm pull-up resistor.•Port 1: Port 1 occupies a total of 8 pins (pins 1-8). It can be used as input oroutput. In contrast to port 0, this port does not need any pull-up resistors since italready has pull-up resistors internally.•Port 2 : Port 2 occupies a total of 8 pins (pins 21- 28). It can be used as input oroutput. Just like P1, P2 does not need any pull-up resistors since it already haspull-up resistors internally.•Port 3 : Port 3 occupies a total of 8 pins (pins 10 -17). It can be used as input oroutput. P3 does not need any pull-up resistors, the same as P1 and P2 did not.Port 3 has the additional function of providing some extremely important signalssuch as interrupts, etc.
IMPORTANT PINS VCC (Pin-40): Vcc provides supply voltage to the chip. The voltage source is +5V. GND (Pin-20): It is ground pin. RST (Pin-9): It is reset pin. Upon applying high pulse to this pin the micro controller will reset and terminate all activities. XTAL1 & XTAL2 (Pin-18,19): These 2 pins provide external clock using a quartz crystal oscillator Crystal inputs for internal oscillator. PSEN (Pin-29): Program Store Enable, the read signal for external program memory.
IMPORTANT PINSALE (Pin-30): Address Latch Enable, to latch address outputsat Port0 and Port2, used for both data and address transmission.EA (Pin-31): External Access pin should be connected to Vcc inorder to fetch code from internal program memory and to fetchcode from external program memory EA is connected to Ground.Interrupts (Pin-12,13): An interrupt is an event that disturbs themicrocontroller to inform it that a device needs its service.Timers/Counters (Pin-14,15): They are used for countinginternal or external events.
TIMER/COUNTERS IN 8051TI MER 8051 is of two types Timer T0 16-bit Timer T1 16-bitFeatures• Both Timer T0 and T1 are 16 bits wide.• When used as a “timer” the register is programmed to count internal clock pulses• When used as a “counter” the register is programmed to count external clock pulses
INTERRUPTInterrupt is an event that causes program to change its normal execution and branch up to specific subroutine putting normal program on hold. Whenever any device needs its service, the device notifies the microcontroller by sending it an interrupt signal. Upon receiving an interrupt signal, the microcontroller interrupts whatever it is doing and serves the device.
Immediate Addressing :This addressing mode is named as “immediate” because it transfers an dataimmediately to the destination operand. For example -•MOV A, #77H ; Loads 77 (hexadecimal) to A and stores in A•ADD A, #4DH ; Adds 4D (hexadecimal) to A and stores in A•MOV DPTR, #1234H ; Moves 1234 (hexadecimal) to data pointerThe ‘#’ symbol before 77H indicates that operand is a data (8 bit). If ‘#’ is notpresent then the hexadecimal number would be taken as addressRegister Addressing :Used while moving data between two registers.Moving data between two Rn registers is not allowed. For example-•ADD A, R0 ;Adds content of R0 to A and stores in A•MOV A, R1 ;Copy contents of R1 into A
Direct Addressing :There are 128 bytes of RAM in 8051 and have been assignedaddresses 00 to 7FH. Entire 128 bytes of RAM can be accessed byusing direct addressing mode. For example -•MOV R0, 088H; Save the contents of RAM location 88h to R0Register Indirect Addressing :An address is considered to be the address of an address, rather thanthe address of a value. For example -•MOV A, @R0; Moves content of address pointed by R0 to AValue inside R0 is considered as an address, which holds the data tobe transferred to Accumulator.
SYSTEMS AND APPLICATIONSEmbedded systems are more than part of human life. For instance, one cannot imagine lifewithout mobile phones for personal communication. Its presence is virtually unavoidable inalmost all facets of human endeavor.We can clearly identify the trend as to where the future of embedded systems is heading.Conventionally, chip manufacturers developed faster single core processors to meet the everincreasing performance requirements but soon they realized that increasing frequency, thoughoffered certain benefits had drawbacks too such as:• It drove to higher power consumption• Overall cost increased as the peripherals surrounding also needed to operate at matching speed, which was truly not practical in all cases, there by driving the costs.So semiconductor manufacturers recognized that the way forward is to build processors that runat lower frequency and voltages but include parallel cores onto single chip. The overallperformance increases because multicores can perform more than one task at given point oftime, so today most of our devices such as smartphones, are indeed getting smarter‘ and‘smaller’
Embedded operating systemsTraditionally embedded systems did away with an operating system (OS), it had lightweightcontrol program/monitor to offer limited I/O and memory services, however, as the systemsbecame complex, it was inevitable to have OS which offered low latency real-time response.Most of the new designs today are moving away from proprietary OS and tool chains and aremore and more opting for open source platforms both of development and deployment as thekey market differentiator for them is cost.Royalty free licensing deployment is the key for reducing the end user costs so OS like Linuxembedded and new OS such as Android are making inroads into places where traditionallyWindows CE/Vx works etc., used to play. Today many new handhelds and smart phones areembracing Android.Convergence embedded systems and applicationsThe retail segment is one of the fastest growing segments in emerging markets and the trend inretail markets is moving towards improving the user experience, which is most certainly settingtrend towards increased performance, connectivity and rich graphics, while reducing powerconsumption and size of the device.Ultrabook is a latest example which aims in reducing size of conventional laptops, whileefficiently managing power consumption and also improving performance
HealthcareElectronic medical devices and other technological innovations with the convergence of biotech,nanotech, manufacturing tech making breathtaking transformations in healthcare delivery andcreating new health care paradigms.The fastest growing markets within medical for semiconductors are home monitoring anddiagnostic device ECG, pulse rate, temperature, oxygen, blood pressure etc.Embedded digital security and surveillanceIn the ever increasing interconnected world, Digital embedded security is no more an option buta necessity as it is very critical for more transactions happening over embedded devices as frontends.Digital security and surveillance is currently in the host of new applications in the embeddedarena which is benefiting from multicore phenomenon.The applications based on computer vision and tracking offers multiple benefits in capturing, postprocessing and identification and alerting of security video in real time.TelecommunicationsIf ever there is an industry that has reaped the benefits to Embedded Technology, for sure, it isonly Telecommunications. The Telecom industry utilizes numerous embedded systems fromtelephone switches for the network to mobile phones at the end-user.
AutomotiveWith drive across the world to improve on emission controls and bring in efficiency inusage of fossil fuels, the automotive segment is challenged by various factors andembedded systems are clearly the ways and means of achieving multiple objectives inthis segment taking it from infotainment systems, engine control unit, Car-area-network,fuel management, safety systems all need embedded to be in it.EntertainmentWhile we have seen mobiles, handhelds, iPods etc., have changed the landscape of thepersonal entertainment in the world in the recent past, the emerging trend is adding moreintelligence in the personal entertainment, communication devices by converging thesocial networks, city information, location based services into a single device.Smart cards industrySmart cards, though began prominently as either a debit or a credit card, are now beingintroduced in personal identification and entitlement schemes at regional, national, andinternational levels. Smart cards are appearing now as Citizen Cards, drivers’ licenses,and patient cards.