Embedded System Concepts

0
2029
logo engineersgallery
logo engineersgallery
  1. What is an Embedded System? Give some examples of embedded system in daily life.

Ans. Embedded System is a system which hides a small computation unit inside. This computer is not general purpose computer like our Desktop PC but a small microcontroller or microprocessor. Embedded System is designed to perform specific tasks. Best example of an Embedded System is our mobile phone which includes a processing unit or no. of processing units along with peripherals like keypad/touchpad, touch screen, LCD, Communication modules etc.

There are other examples like Electronic System in washing machine, ATM machine, front panel of Microwave oven, printers, TV, set top boxes, Remote control, Dashboard of a 4-wheeler and many more. If you observe carefully we are surrounded by a no. of embedded system and use them very frequently in our day to day life.

  1. What are basic features of an Embedded System?

Ans. A good embedded system must possess following features…

  • Microcontroller based
  • Software driven
  • Reliable
  • Real time control system
  • Autonomous and human interactive
  • Operating on diverse physical variables
  • Operating in diverse environments
  1. What are various categories of an Embedded System based on complexity?

Ans. Embedded Systems can be broadly classified in three categories…

  1. Small Scale – 8/16 bit CPU, little hardware, less software complexity, no RTOS, battery operated.
  2. Medium scale – 16/32 bit uC or DSPs, Complex hardware and software design, RTOS source code engg tool, IDE.
  3. Sophisticated – Configurable processors, Cutting edge applications, highly complex hardware and software design
  4. Why PC can’t be treated as an Embedded System?

Ans. Of course PC is also embedded with a processing unit but still it can not be called as an Embedded System. The reason is very clear that PC is not supposed to do a specific task. For a bank employee PC is accountings add for his work while for an engineer it is designs add. For a doctor PC helps to analyze patient reports and for children it’s more like video game or a communication system to stay connected with their friends through social networking websites. Hence PC has different applications for different people; hence it cannot be treated as an embedded system.

5. What is difference between a PC based System and an
Embedded System?
★★
Ans. A PC based system is bulky hence difficult to be deployed specially in remote areas. For example if one wants a data logger system to monitor all the processes and events in an aircraft or on a hilly area, PC is never a suitable
option. In this case an Embedded System can do the job well consuming very small space. Also PC based system are not so cost efficient and as reliable as embedded systems.
6. Ok if embedded systems are so important and popular than why PCs still exist, why can’t we use embedded systems instead of PCs?

Ans. Well PC works with operating systems and they support comprehensive cross compilers for generating executable files for embedded systems. Hence we can never ignore the importance of PCs
7. What are the main components of an Embedded System?

Ans. Components of an embedded system depends on the application it is intended to perform. Generally an embedded system contains sensors, processor(s) and actuators. Main components of an embedded system are
Processor, Memory, Peripherals like Keypad, LCD etc.
We can classify these components in three categories
a. Hardware includes sensors, actuators, Processor, RAM, ROM, ADC, DAC, Timers, Ports etc.
b. Software includes System software and Application software. A system software can be a scheduler or an RTOS (Real Time Operating System).
c. Firmware responsible for running hardware components like disk drivers, protocol gateways etc.
8. What’s difference between a microcontroller and microprocessor?
★★
Ans. Microcontroller has a CPU along with various peripherals like timers, I/Os, Serial communication modules, Memory etc integrated on a single chip while microprocessor doesn’t. It has to be connected will all these externally as Microprocessor just has a CPU core on a chip.
9. Ok if microcontroller is so powerful then why don’t they use a microcontroller instead of microprocessor for desktops and laptops?

Ans. Actually in Desktop PCs and Laptops space efficiency is not as important as in mobile phones or other handy gadgets. Also much is expected from a Desktop or Laptop hence it’s better to integrate highly efficient processor in
terms of speed and data handling capability with peripherals outside the chip i.e. on a mother board.

10. What’s difference between RISC and CISC?
★★
Ans.
RISC CISC
1. Simple Instruction taking 1 cycle Complex instructions taking multiple cycles
2. Only LOAD/STORE instructions reference memory Any instruction may reference memory
3. Highly pipelined Not pipelined or less pipelined
4. Instructions executed by the hardware Instructions interpreted by the micro program
5. Fixed format instructions Variable format instructions
6. Few instructions and addressing modes Many instructions and no. of addressing modes
7. Complexity is in the compiler Complexity is in the micro program
8. Multiple register sets Single register set
11. What’s difference between Harvard and Von Neumann architecture?
★★
Ans. In Von Neumann architecture instructions and data are stored together in a common memory space while in Harvard they are stored separately.
Harvard architecture has separate data and instruction busses, allowing transfers to be performed simultaneously on both busses. Von Neumann architecture or Princeton architecture has only one bus which is used for both data transfers and instruction fetches, and therefore data transfers and instruction fetches must be scheduled – they cannot be performed at the same time.
12. What do you mean by clock or the operating frequency of an Embedded System?
★★
Ans. Embedded System is a digital system hence needs clock for its operation. Clock only decides the data rate for communication and timing of operations. Most of the processes in embedded system are synchronous i.e. they are
performed at clock edges. Usual clock speeds of embedded systems are few kHz to several hundred MHz.
13. What are the different methods of clocking a microcontroller?
★★
Ans. An embedded system can be clocked externally by using crystal oscillator or simpler RC oscillators. Some microcontrollers come with internal clocking mechanisms.
14. If clock frequency is higher does that mean the embedded system is better?
★★

Ans. No, it is not always true. Higher clock speed tend to higher power consumption hence the designer must be very careful while selecting an operating frequency for his system. There must be optimization between power
requirement and speed requirement. Power consumption concern is very important especially in battery operated systems.

[sam id=”4″ codes=”true”]
15. What are different types of memories involved in an Embedded System?

Ans. A typical embedded system includes RAM for temporary storage of program data and an EEPROM for storing the code. Now a day’s instead of EEPROM, microcontrollers come with FLASH memory in order to store the
programs and also for permanent data storage.

16. How code memory of the system can be optimized?
★★
Ans. Code memory optimization is very important for making the code compact and fitting into a small memory space without affecting code performance. There are various ways of code optimization…
• Use of unsigned byte
• Avoiding stdlib functions, when simple coding is possible
• Usage of Assy. Code when target processor is well known
• Usage of global variable, when no chance of shared data problem
• Reduce usage of frequent function calls
• Usage of delete/free, to release the used memory
17. What is difference between System Software and Application Software?
★★
Ans. System Software are generally Application independent like OS, Compiler, Assembler, Linker, BIOS etc. but application software is responsible for performing particular application like printing-software in a printer.
18. What is difference between Software and Firmware?
★★
Ans. Firmware is very essential software and a must for an embedded system to run its hardware. A firmware is something that is inside a chip. Like BIOS is called a firmware without which system can never run. While software is
application program that is not very essential for the device to work basic functionalities.
Example: firmware makes the CD drive work, but the software makes CDs burn.
19. What is difference between Microcontroller, FPGA, ASIC and SoC?
★★
Ans. The biggest difference between is that the microcontroller is a software based solution while the FPGA or CPLD are a hardware based solutions. An FPGA (Field Programmable Gate Array) design is programmed the hardware

way and is suited for very fast applications. A microcontroller is programmed the software way and is better suited for medium performance and control. Hence FPGA is used to realize digital hardware circuits inside a chip while a microcontroller is used to realize a software application.

On the other hand ASIC or Application Specific Integrated Circuit is application specific device made of FPGA or CPLD. Hence it is also hardwired solution for the problem and faster than microcontrollers.

SoC or system on chip. refers to chip that includes so many features on single integrated circuit like memory, timers, interrupts, I/O interfaces etc.

Microncontroller can also be called as a SoC but usually the term is used for sophisticated systems. Like a microcontroller inside a mobile phone can be called as SoC.

  1. What are the different criteria to select a microcontroller?

Ans. There are criteria like… Data size it can handle (8bit/16bit/32bit), Code size (FLASH), Clock frequency, Power Requirement, Cost and peripherals required for specific application.

  1. What’s difference between 8bit and 16bit microcontroller?

★★

Ans. A CPU can be classified on the basis of the data it can access in a single operation. An 8-bit processor can access 8 bits of data in a single operation, as opposed to a 16-bit processor, which can access 16 bits of data in a single operation….” By this definition, 32-bit microcontroller is one that able to access 32bit data in a single operation.

  1. What factor of an architecture defines no. of bytes in data types?

★★

Ans.

  1. What’s difference between a simulator and an emulator, give examples?

★★

Ans. The Simulator tries to duplicate the behavior of the device. The Emulator tries to duplicate the inner workings of the device.

Simulation — if you do not have the thermometer yet, but you want to test that this message rate will not overload you system, you can simulate the sensor by attaching a unit that sends a random number 8 times a second. You can run any test that does not rely on the actual value the sensor sends.

Emulation — suppose you have a very expensive thermometer that measures to 0.001 C, and you want to see if you can get by with a cheaper thermometer that only measures to the nearest 0.5 C. You can emulate the cheaper thermometer using an expensive thermometer by rounding the reading to the nearest 0.5 C and running tests that rely on the temperature values.

  1. What do you mean by an in-circuit emulator?

★★

Ans. An in-circuit emulator is a hardware used to debug software of an embedded system. It provides a window into the embedded system. The

programmer uses the emulator to load programs into the embedded system, run them, step through them slowly, and view and change data used by the system’s software.

  1. What’s difference between memory-mapped I/O and I/O mapped I/O?

★★

Ans. In memory mapped I/O, a chunk of the CPU’s address space is reserved for accessing I/O devices. In I/O mapped I/O, I/O devices are handled distinctly by the CPU and hence occupy a separate chunk of addresses predetermined by the CPU for I/O. In case of Memory mapped I/O the same address BUS is used for accessing both Memory (RAM) and the Registers of I/O devices.

For I/O Mapped I/O, separate address BUS is used.

As Address space is generally larger for Memory than I/O registers, the length of I/O address is larger in case of Memory Mapped I/O. for a system which uses I/O Mapped I/O, there is a requirement for an extra hardware Circuitry.

  1. What’s difference between little endian and big endian representations?

★★

Ans. Endianness refers to the way data is stored in memory. So, suppose a data containing 4 bytes: 90, AB, 12, CD where each byte requires 2 hex digits.

It turns out there are two ways to store this in memory.

Big Endian

In big endian, you store the most significant byte in the smallest address. Here’s

how it would look:

Address Value
1000 90
1001 AB
1002 12
1003 CD

Little Endian

In little endian, you store the least significant byte in the smallest address.

Here’s how it would look:

Address Value
1000 CD
1001 12
1002 AB
SHARE
Previous articlePHP Strings
Next articleSWARM ROBOTS