You are on page 1of 78

Embedded Systems

By

P.DEVABALAN
Assistant Professor Dept.of IT N.P.R.College of Engg. & Tech.,

EMBEDDED SYSTEMS UNIT I FUNDAMENTALS OF EMBEDDED SYSTEMS 9 Definition and classification Overview of processors and hardware units in an embedded system Software embedded into the system Exemplary embedded systems Embedded Systems on a Chip (SOC) and the use of VLSI designed circuits. UNIT II DEVICES AND BUSES FOR DEVICES NETWORK 9 I/O devices Device I/O types and examples Synchronous ISO Synchronous and asynchronous communications from serial devices Examples of internal serial communication devices UART and HDLC Parallel port devices Sophisticated interfacing features in devices/ports Timer and counting devices 12C, USB, CAN and advanced I/O serial high speed buses ISA, PCI, PCI-X, CPCI and advanced buses. UNIT III PROGRAMMING CONCEPTS AND EMBEDDED PROGRAMMING IN C, C++ 9 Programming in Assembly Language (ALP) vs high level language C program elements Macros and functions Use of pointers NULL pointers Use of function calls Multiple function calls in a cyclic order in the main function pointers Function queues and interrupt service routines Queue pointers Concepts of embedded programming in C++ Objected oriented programming Embedded programming in C++ C program compilers Cross compiler Optimization of memory codes. UNIT IV REAL TIME OPERATING SYSTEMS PART 1 9 Definitions of process, tasks and threads Clear cut distinction between functions ISRS and tasks by their characteristics Operating system services Goals Structures Kernel Process management Memory management Device management File system organization and implementation I/O subsystems Interrupt routines handling in RTOS. REAL TIME OPERATING SYSTEMS : RTOS task scheduling models Handling of task scheduling and latency and deadlines as performance metrics Co-operative round robin scheduling Cyclic scheduling with time slicing (Rate monotonics cooperative scheduling) Preemptive scheduling model strategy by a scheduler Critical section service by a preemptive scheduler Fixed (Static) real time scheduling of tasks. INTER PROCESS COMMUNICATION AND SYNCHRONISATION: Shared Data problem Use of semaphore(s) Priority inversion problem and deadlock situations Inter process communications using signals Semaphore flag or mutex as resource key Message queues Mailboxes Pipes Virtual (Logical) sockets Remote Procedure Calls (RPCs). UNIT V REAL TIME OPERATING SYSTEMS PART 2 9 Study of micro C/OS II or VX works or any other popular RTOS RTOS system level functions Task service functions Time delay functions Memory allocation related functions Semaphore related functions Mailbox related functions Queue related functions Case studies of programming with RTOS Understanding case definition Multiple tasks and their functions Creating a list of tasks Functions and IPCS Exemplary coding steps.

TEXT BOOKS 1. Wayne Wolf, Computer as Components Principles of Embedded Computing System Design, Morgan Kaufmann Publishers, Harcourt India Private Limited, First Indian Reprint, 2001. 2. Rajkamal, Embedded Systems Architecture - Programming and Design, Tata McGraw - Hill, First reprint, 2003. REFERENCES 1. Steve Heath, Embedded Systems Design, Newnes, 2nd Edition, 2003. 2. David E. Simon, An Embedded Software Primer, Pearson Education, First Indian Reprint, 2000. 3. Frank Vahid and Tony Givargis, Embedded Systems Design - A Unified Hardware / Software Introduction, John Wiley, 2002. 4. Heath, Embedded System Design, 2nd Edition, Elsevier India Private Limited, 2005.

SOFTWARE Components in Embedded Systems

Programming Languages: 1. Machine code 2. Assembly language 3. High level languages ie., C, C++

Software Tools:

Editor Assembler Compiler Linker Debugger

Simulator Loader Stethoscope Trace scope IDE

24-Nov-10

P.DEVABALAN Asst.Prof / IT

13

What is an Embedded System?

Embedded system is a Hardware with Software embedded in it, for a dedicated application.

DRIVES

24-Nov-10

P.DEVABALAN Asst.Prof / IT

SMART Embedded Systems

24-Nov-10

P.DEVABALAN Asst.Prof / IT

SMART Embedded Systems

24-Nov-10

P.DEVABALAN Asst.Prof / IT

SMART Embedded Systems

24-Nov-10

P.DEVABALAN Asst.Prof / IT

3 MAIN COMPONENTS of Embedded System

HARDWARE Processor, RAM, ROM, ADC, DAC, Timers, Ports, etc. APPLICATION SOFTWARE written in Assembly, C, C++, Java, etc. RTOS (to supervise the Application Software) C OS-II, Win CE, VxWorks, Embedded Linux, etc.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

CLASSIFICATION of Embedded Systems

SMALL SCALE: 8/16 bit CPU, little H/w, less S/w complexity, No RTOS, Battery operated. MEDIUM SCALE: 16/32 bit C or DSPs, Complex H/w & S/w design, RTOS Source code Engg tools, IDE. SOPHISTICATED: Configurable processors, Cutting edge applications, Highly complex H/w and S/w design,

24-Nov-10

P.DEVABALAN Asst.Prof / IT

SKILLS for Embedded System Engineer

HARDWARE:
P / C, DSPs, Memories, Peripheral devices, sensors, Computer architecture, Digital electronics, Electronic system design, Control system, Data communication.

SOFTWARE: IDE - Editor, Assemblers, Compilers, Linkers, Debuggers, Simulator. Programming languages - Assembly, C, C++, Java RTOS Vxworks, Win CE, RTLinux, etc.

COMPONENTS of Embedded System Hardware

24-Nov-10

P.DEVABALAN Asst.Prof / IT

10

PROCESSORS for Embedded Systems

PROCESSOR ALU Control Unit

Types of Processor General Purpose Processor (c, P, DSP, EP,MP) Application Specific System Processor Multiprocessor system GPP/ASIP core with other hardware integrated in ASIC chip.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

11

OTHER HARDWARE for Embedded Systems

1. Power supply circuit 2. Memory 3. I/O Ports 4. Timers - EPROM, RAM, EEPROM (flash), CACHE - 8255 (PPI), 8251 (UART) - 8253

5. ADC / DAC - ADC0809, DAC0800 6. Display & Keyboard Controllers - 8279 7. Programmable Interrupt Controllers - 8259

24-Nov-10

P.DEVABALAN Asst.Prof / IT

12

SOFTWARE Components in Embedded Systems

Programming Languages: 1. Machine code 2. Assembly language 3. High level languages ie., C, C++

Software Tools:

Editor Assembler Compiler Linker Debugger

Simulator Loader Stethoscope Trace scope IDE

24-Nov-10

P.DEVABALAN Asst.Prof / IT

13

Software Development Chain

24-Nov-10

P.DEVABALAN Asst.Prof / IT

14

HARDWARE in Exemplary Embedded Systems


MOBILE PHONE
Processor Bus Size Architecture Cache Memory ROM EEPROM RAM I/O Ports DAC & ADC Modulation / Demodulation DSP instructions Multi processor on a Chip 32 RISC Yes 1 MB 32 KB 1 MB KBD & Display ports Yes Yes Yes

24-Nov-10

P.DEVABALAN Asst.Prof / IT

15

SOFTWARE in Exemplary Embedded Systems


MOBILE PHONE
Editor Interpreter Assembler Cross Assembler Compiler Locator Simulator Source code Engg tools RTOS IDE Stethoscope
24-Nov-10 P.DEVABALAN Asst.Prof / IT

yes No No No yes yes yes yes yes yes yes


16

Exemplary SOC for Mobile Phone

24-Nov-10

P.DEVABALAN Asst.Prof / IT

17

Types of I/O Devices

24-Nov-10

P.DEVABALAN Asst.Prof / IT

18

Structure of Serial Port

24-Nov-10

P.DEVABALAN Asst.Prof / IT

19

Structure of Parallel Port

24-Nov-10

P.DEVABALAN Asst.Prof / IT

20

BUSES for Communication

Buses Serial
I2C, CAN, USB,

Parallel
ISA, EISA, PCI,

I2C : Bus for communication between multiple ICs. CAN: Bus used in automobiles with centrally controlled network. USB: Bus for communication between CPU and devices like mouse, etc. ISA, EISA, PCI are standard buses for parallel communication used in PCs, computer network devices, etc.
24-Nov-10 P.DEVABALAN Asst.Prof / IT 21

Types of TIMERS

Timers

Hardware Timer

Software Timer

24-Nov-10

P.DEVABALAN Asst.Prof / IT

22

Structure of Hardware Timer

24-Nov-10

P.DEVABALAN Asst.Prof / IT

23

Usage of TIMERS

1 2 3 4 5 6 7 8 9 10

Real Time Clock (RTC) for the system Initiating an Event after a preset time delay Initiating an Event after a comparison of preset times Capturing the count value in timer on an event Finding time interval between two events Watchdog timer Baud rate control for Serial communication Scheduling of various tasks in RTOS Time slicing of various tasks Time division multiplexing

24-Nov-10

P.DEVABALAN Asst.Prof / IT

24

Programming Embedded Systems in Assy & C

Assembly 1. Full use of processor specific instructions.

C, C++ 1. Software development cycle is short due to usage of functions, std library functions, modular programming approach, Top down design, etc. 2. Data type declarations make programming easy. 3. Type checking eliminates errors. 4. Usage of Control structures like if-then, do-while, for, etc. 5. Portability to different hardware and OS.

2. Machine codes are Compact. 3. Device driver code needs only few assembly instructions.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

25

Programming Embedded Systems using C++

Combines the advantage of OOPS, C & Assembly. Special features: Data Encapsulation, inheritance, etc. Advantages : Reusability of software components.

Disadvantages: Standard C++ programming makes code complex and lengthy, due to features like Templates, Multiple inheritance, Exception handling, Virtual base classes, Namespaces, etc. Solution : Special version of C++ (Embedded C++) has provision for selective disabling of features.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

26

Phases of Software Development

1.

a) Complete Specification of the System. b) Specification of the data, functions, tasks,.. Definition and Analysis c) System behaviour of the System d) Constraints of Design Requirement e) Human machine interaction f) Expected life cycle g) Validation criteria & time delivery schedule Development The process of software Designing, Coding and Testing. a) Correction of bugs b) Addition of extra functions as per changing environment

2.

3.

Support

24-Nov-10

P.DEVABALAN Asst.Prof / IT

27

S/w development of Typical application (Automobiles)

Development of a Embedded system in a Car to monitor Instrument clusters, Engine performance, Automatic Gear box, Brakes, etc., the typical code will be as follows
Watch Recording data of usage / malfunction Engine speed Vehicle speed Odometer Wake-up / Sleep down Fuel Alarms Coolant Temperature Light Control Automatic gear box
24-Nov-10 P.DEVABALAN Asst.Prof / IT

1254 168 399 557 999 252 376 4781 537 1925
(Total 11643 LOC)

207

28

Source Code Engineering tool

It is a tool for source code development, compiling, debugging and testing. eg. SNiFF+ from WindRiver Systems Features of SNiFF+ Comprehension, Navigation and Browsing Editing Configuring (selective disabling of C++ features)
Compiling

Debugging

24-Nov-10

P.DEVABALAN Asst.Prof / IT

29

Code / Memory Optimization

It is a process of making the code compact and fitting into a small memory space without affecting code performance. Techniques for code optimization: Use of unsigned byte Avoiding std lib functions, when simple coding is possible. Usage of Assy code, when target processor is well known.
Usage of Global Variable, when no chance for shared data problem.

Reduce usage of frequent function calls. Usage of delete / free, to release the used memory. Disabling the used features of C++.
24-Nov-10 P.DEVABALAN Asst.Prof / IT 30

Process / Tasks / Threads

Process : It is a sequentially running program with its state.

Task

: An application consisting of tasks controlled by scheduling mechanism of an OS.

Threads : Light weighted sub-process in application program, controlled by process control entity.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

31

Comparison of Function / ISR / Task

Function

ISR

Task

- Set of instructions for performing an actions.

- ISR is independent

- Task is independent. - Sync done by RTOS.

- Called by Proc/Task/ISR. - Call from H/w & S/w. - Each Fn has a context - Provision for nested Function calls. - ISR has Priority.

- Scheduler runs one - Each ISR has Context. task at a time.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

32

Inter Process Communication (IPC)

24-Nov-10

P.DEVABALAN Asst.Prof / IT

33

Inter Process Communication (IPC)

IPC:

Some information generated by a processes / tasks, by setting / resetting a flag / value, or generates an output so that it lets another process take note / use of it.

Types: 1) Signal 2) Semaphores (flags, mutex, resource key, counting) 3) Queues, Pipes or Mailbox (eg. LCD display in Mobile Time, Ph No.) 4) Sockets (eg. COM port in PC to connect modem, port 80 web server) 5) Remote Procedure Calls (RPC) for distributed processes

24-Nov-10

P.DEVABALAN Asst.Prof / IT

34

Shared Data Problem & its Solutions

Shared Data Problem: Conflict arising on a common variable due to usage by multiple tasks / processes on it. Eg. Interrupt changing the subsequent bits while processing a 32 bit data on a 8-bit CPU.

Solutions:

1) Use of modifier Volatile 2) Use of Re-entrant functions 3) Putting shared variable in circular queues 4) Disabling interrupts on execution of Critical section 5) Using Semaphores

24-Nov-10

P.DEVABALAN Asst.Prof / IT

35

Semaphore & its types

Types of Semaphores:

1) Single, 2) Multiple, 3) Mutex 4) P & V 5) Counting


36

24-Nov-10

P.DEVABALAN Asst.Prof / IT

GOALS of Operating System

1. Facilitating easy sharing of resource as per schedule and allocation. 2. Facilitating easy implementation of application software. 3. Optimally scheduling the processes on one / more CPU. 4. Maximizing the system performance without any security breach. 5. Providing the management functions for Processes, tasks, etc. 6. Providing the management functions for Devices, Files, etc. 7. Providing easy interface and management functions for network & protocols. 8. Providing portability of application software on different hardware. 9. Providing interoperability of application on different networks. 10. Providing common set of interfaces.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

37

STRUCTURE of Operating System

Application Software API System Software


(with functions other than in OS)

Eg. Device driver for Multimedia device

OS interface OS Hardware OS Interface Hardware


Consists of KERNEL
(Operated in User and Supervisory modes)

24-Nov-10

P.DEVABALAN Asst.Prof / IT

38

KERNEL of Operating System

- OS is a middle layer between Application Software & Hardware. - It consists of KERNEL and other functions not provided by Kernel. - KERNEL is operated in Supervisory mode and Other functions are operated in User Mode.

KERNEL Services

Process Management Memory Management Inter Process Communication I/O management Interrupt Control Device drivers

24-Nov-10

P.DEVABALAN Asst.Prof / IT

39

Process Management in OS

Process management consists of creation, activation, running, blocking, resumption, deactivation, deletion of processes. A. Process Creation: Initial and Subsequent process. B. Management of Created process: - Processing resource requests - Allocation of Resources (through Message / system calls) - Controlling of process through PCB. - Scheduling and synchronization

24-Nov-10

P.DEVABALAN Asst.Prof / IT

40

Memory Management in OS

A. Memory Allocation: at the time of creation of a new process / tasks. B. Memory Management after allocation: - Fixed block allocation - Dynamic block allocation - Dynamic page allocation - Dynamic data memory allocation - Dynamic address reallocation - Multiprocessor memory allocation

24-Nov-10

P.DEVABALAN Asst.Prof / IT

41

Device Management in OS

A. Manages Physical / Virtual devices (eg. Pipes & sockets). B. Three standard approach to three types of device drivers a) Programmed I/O poling b) Interrupt driven through ISR c) DMA C. Functions of Device manager It includes function like Device detection & addition, device allocation and registration, device sharing, device buffer management, device access management.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

42

File System Organization & Implementation

File is a named entity stored on secondary storage device. It contains data in different formats. Both real and Virtual files (Pipe) are managed.

Functions to Organize Files in systematic way: Open Write Read Seek Close

24-Nov-10

P.DEVABALAN Asst.Prof / IT

43

Real Time Operating System (RTOS)

RTOS is an OS for Embedded system for response time and event controlled processes. RTOS Services: Basic OS functions Time management Predictability - PM, RM, MM, DM, FSM, I/o, etc. - Time Allocation, time slicing & monitoring for efficiency. - Predicting time behaviour and initiation of task synchronization - Synchronization of Tasks using IPC. RTOS main functions - RT task scheduling and latency control

Priorities Management - Allocation and Inheritance IPC

24-Nov-10

P.DEVABALAN Asst.Prof / IT

44

Why need RTOS?

Reasons for need of RTOS

Occasions for NO need of RTOS Small scale embedded system never use RTOS. Instead of functions in RTOS, standard lib functions in C can be used. eg. malloc(), free(), fopen(), fclose(), etc.

When efficient scheduling in needed for multitasks with time constraints. Task synchronization is needed. Interrupt latency Control is essential.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

45

RTOS Task Scheduling Models

A. Control flow strategy

Complete control of i/p and o/ps. Co-operative scheduler adopts this strategy. Worst case latencies are well defined. Interrupt occurrences are predictable. Task control not deterministic. Eg.network. (Packet arrival not predictable) Pre-emptive scheduler adopts this strategy.

B. Data flow strategy

Task scheduler fns are designed with predefined time-out delays. WC latency is deterministic, because C. Control-data flow strategy the max delay is predefined. Cyclic Co-op Schd, Pre-emp Schd, Fixed time Schd, Dynamic RT Schd uses this strategy.
24-Nov-10 P.DEVABALAN Asst.Prof / IT 46

Co-operative Round robin Scheduling

Other Types of Co-operative scheduling: i) using ordered list. ii) using time slicing with timers Dis-advantages: Longer execution time of a low priority task makes a higher priority task wait until it finishes.
24-Nov-10 P.DEVABALAN Asst.Prof / IT 47

Pre-emptive Scheduling

24-Nov-10

P.DEVABALAN Asst.Prof / IT

48

Other Scheduling techniques and Critical Section

Critical Section: It is an important portion of a task, which should not be blocked as it uses a shared variable. Here, Pre-emptive scheduling leads to conflict. Other Scheduling Techniques: 1) Fixed real time scheduling of Tasks 2) Probabilistic timed Petrinets 3) Multi Thread Graphs (MTG)

24-Nov-10

P.DEVABALAN Asst.Prof / IT

49

RTOS - Real Time Operating System

A Real-Time Operating System (RTOS) is an operating system


(OS) intended for real-time applications in Embedded systems. A key characteristic of real-time operating systems is the level of its consistency concerning the amount of time it takes to accept and complete an application's task. A real-time OS has an advanced algorithm for scheduling. Key factors in an real-time OS are a minimal interrupt latency and a minimal thread switching latency.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

50

Basic functions of RTOS

24-Nov-10

P.DEVABALAN Asst.Prof / IT

51

Need for Tested RTOS

While designing a complex embedded systems, we need a tested bug free codes for the following. Multiple task functions in C or C++. Real time clock based software timers (RTCSWT). Software for Co-operative scheduler. Software for a Pre-emptive scheduler. Device drivers and Device managers. Functions for Inter Process Communications. Network functions Error handling functions and exception handling functions. Testing and System debugging software.

A readily available RTOS package provides the above functions and a lot of time is saved for coding the same.
24-Nov-10 P.DEVABALAN Asst.Prof / IT 52

Options in RTOS

Options for RTOS

Own RTOS

Linux Based RTOS

C/ OS-II
(Freeware)

PSoS VxWorks Nucleus Win CE Palm OS

24-Nov-10

P.DEVABALAN Asst.Prof / IT

53

C/OS-II (MUCOS)

C/OS-II is Free Open-source RTOS designed by Jean J. Labrosse in 1992. C/OS-II is intended for Non-commercial use. C/OS-II codes are in C and few CPU specific modules are in ASSY. C/OS-II code Port on MANY Processors that are commonly used in ES design.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

54

Features of C/OS-II
C/OS-II is a Scalable OS. C/OS-II uses Pre-emptive Scheduler (for multitasking). C/OS-II has System level functions. C/OS-II has Task service functions. C/OS-II has Task delay functions. C/OS-II has Memory allocation functions. C/OS-II has IPC functions. C/OS-II has Semaphore, Queue, Mailbox functions.

when OS or OS_ used as prefix, it denotes a function / variable is a C/OS-II function or variable. Eg. OSTaskCreate() --- C/OS-II function for TASK CREATION.
24-Nov-10 P.DEVABALAN Asst.Prof / IT 55

Source code files of C/OS-II

A. Processor dependent source files


Os_cpu.h Os_cfg.h Os_tick.c Os_cpu_c.c Os_cpu-a.s12 Processor definition header file Kernel building configuration file C file for ISR and RTOS timers Processor C codes file Assy code for task switching functions (68HC12)

24-Nov-10

P.DEVABALAN Asst.Prof / IT

56

Source code files of C/OS-II (contd..)

B. Processor independent source files


Ucos.ii.h Ucos.ii.c Os_core.c Os_time.c Os_task.c Os_mem.c Os_sem.c Os_q.c MUCOS header file MUCOS header file For RTOS core For RTOS timer For RTOS task related functions For Memory partitioning For Semaphore related functions For Queue related functions

24-Nov-10

P.DEVABALAN Asst.Prof / IT

57

RTOS System level functions

The System level functions are


void OSInit (void) void OSStart (void) void OSTickInit (void) void OSIntEnter (void) Void OSIntExit (void) OS_ENTER_CRITICAL At the beginning prior to OSStart() After OSInit() and task creating functions To initialize System timer ticks Just after the start of ISR codes before return form the ISR codes Macro to disable all interrupts

OS_EXIT_CRITICAL

Macro to enable all interrupts

24-Nov-10

P.DEVABALAN Asst.Prof / IT

58

Task Service functions

These functions are used to create task, suspend and resume, and time setting and retrieving functions.

unsigned byte OSTaskCreate ()

Must call before running a task

unsigned byte OSTaskSuspend (..) Called for blocking a task unsigned byte OSTaskResume (..) void OSTimeset (..) Unsigned int OSTimeGet (void) Called for resuming a blocked task When system time is to be set Find present count when time is read

24-Nov-10

P.DEVABALAN Asst.Prof / IT

59

Time Delay functions

MUCOS Time delay functions for the tasks are


void OSTimeDly () To delay a task by count-1 value

unsigned byte OSTimeDlyResume () To resume a task after a preset delay void OSTimeDlyHMSM () Time delay to block a task

24-Nov-10

P.DEVABALAN Asst.Prof / IT

60

Memory related functions

MUCOS memory related functions for the tasks are


OSMem *OSMemCreate () void *OSMemGet (..) unsigned byte OSMemQuery (..) unsigned byte OSMemPut () To create and initialize memory partition To find the pointer of memory control block To find pointers of memory blocks and data structures To return a pointer of memory block

24-Nov-10

P.DEVABALAN Asst.Prof / IT

61

Semaphore related functions

When a semaphore created by OS and used a resource acquiring key, it must be initialized with 1 to indicate the resource is available. MUCOS Semaphore related functions for the tasks are
OS_Event OSSemCreate () void OSSemPend (..)

To create and initialize a semaphore To check whether a semaphore is pending

unsigned short OSSemAccept (..) To check whether SemVal > 0 unsigned byte OSSemPost () unsigned byte OSSemQuery () If SemVal = 0 or more, increments, and makes a semaphore again not pending. To get semaphore information

24-Nov-10

P.DEVABALAN Asst.Prof / IT

62

Other functions

Apart from the previous said functions, MUCOS has functions related to
Mailbox

Queue

24-Nov-10

P.DEVABALAN Asst.Prof / IT

63

Automatic Chocolate Vending Machine (ACVM)

24-Nov-10

P.DEVABALAN Asst.Prof / IT

64

Applications
Medical instrumentation Military applications Aerospace research Robotics Consumer Electronics Industrial Applications Automobiles Telecommunication

24-Nov-10

P.DEVABALAN Asst.Prof / IT

65

Breakthrough in Embedded System Designs

24-Nov-10

P.DEVABALAN Asst.Prof / IT

66

Market Potential for Embedded Systems

According to analyst firm, the embedded system opportunity is expected to touch US$ 360 billion (in terms of devices) US$ 36 billion (up from the existing US$ 2 billion).

Experts also predict that there will be a ten-fold increase in the number of people employed in the embedded systems industry, from the current 60,000 professionals to over six lakh people by 2015. - Source: NASSCOM

24-Nov-10

P.DEVABALAN Asst.Prof / IT

67

Embedded Systems Companies in Bangalore

Sadhanasoft Vision Comptech Integrators Ltd Optimal Infotech Pvt. Ltd. Datamation Consultants Pvt. Ltd. Mphasis-BFL Ltd Karishma Software Ltd. Virgosys Software Pvt. Ltd. IQura Technologies Pvt. Ltd. Worldwide Infotech Inc. Intrepid Solutions Private Ltd iBilt Technologies Ltd

Click Technologies (I) Pvt. Ltd. Datamation Consultants Pvt. Ltd. Compucom Software Ltd. Surya Soft-Tech Ltd Global Automation ( Parsec Technologies (India) Ltd. Polaris Software Lab Ltd SDI Infotech Pvt. Ltd. Java Softech Pvt. Ltd. Global Software Initiatives Pvt. Ltd. iTech Workshop Pvt. Ltd.

Nihar Infoway Ltd. Koenig Solutions Pvt. Ltd. Surya Soft-Tech Ltd Mphasis-BFL Ltd Kale Consultants Ltd Binary Semantics Ltd. Cybersol Technologies Pvt Ltd Datum Technologys (India) Ltd Binary Semantics Ltd. Webspectrum Software Pvt. Ltd. Datum Technologys (India) Ltd

Infobahn (India) Pvt. Ltd. Convergent Communications (India) Pvt. Ltd. Kale Consultants Ltd Rhombus Technologies Pvt. Ltd. MindEdge Solutions Netmumbai SolutionNet India Pvt. Ltd. Gateway WebSystems Pvt. Ltd. Learnet India Ltd. KPIT Infosystems Ltd Perfect E Com Solution Pvt Ltd.

24-Nov-10

P.DEVABALAN Asst.Prof / IT

68

References

1. Rajkamal, Embedded Systems Architecture, Programming and Design, TMH, First reprint Oct. 2003 2. David E.Simon, An Embedded Software Primer, Pearson Education Asia, First Indian Reprint 2000. 3. www.embedded.com 4. www.micrcontroller.com

24-Nov-10

P.DEVABALAN Asst.Prof / IT

69

Unit-I Introduction to Embedded Systems Part-A (2 Marks) 1. Define a System. 2. What is an embedded system? 3. What are the main components of an embedded system? 4. Define embedded microcontroller. 5. What are the various classifications of embedded systems? 6. What are the two essential units of a processor on a embedded system? 7. What does the execution unit of a processor in a embedded system do? 8. Give examples for general purpose processor. 9. Define microprocessor. 10. When is Application Specific System processors (ASSPs) used in an embedded system? 11. What is the need for LCD and LED displays? 12. Define ROM image. 13. Define device driver. 14.Name some of the softwares used for the detailed designing of an embedded system. 15. What are the various models used in the design of a embedded system? 16. Give some examples for small scale embedded systems. 17. Give some examples for medium scale embedded systems. 18. Give some examples for sophisticated embedded systems. 19. Name some components available in an exemplary SoC-Smart Card? 20. What is an assembler? Part B 1. List the hardware units that must be present in the embedded systems. (16) 2. a. Explain the Exemplary applications of each type of embedded system. (08) b.Explain the different program layers in the embedded software and also the process of converting a C program into the file for ROM image with suitable block diagrams. (08) 3. Explain the Embedded System on Chip (SoC) & in VLSI circuit (16) 4. a. Explain the various form of memories present in a system (08) b. Explain the software tools in designing of an embedded system. (08)

Unit-II Devices and Buses for Devices Network Part -A (2 Marks) 1. Define synchronous communication. 2. Define iso-synchronous communication. 3. What are the two characteristics of synchronous communication? 4. Give examples for serial UART input and serial UART output devices. 5. What are the three ways of communication for a device? 6. Expand a) SPI b) SCI 7. Explain any two forms of a counter. 8. Define software timer. 9. What is I2C? 10. What are the bits in I2C corresponding to? 11. What is a CAN bus? Where is it used? 12. What is USB? Where is it used? 13. What are the two standards of USB available? 14. What are the features of the USB protocol? 15. Explain briefly about PCI and PCI/X buses. 16. Why are SPCI parallel buses important? 17. Define half-duplex communication. 18. Define full duplex communication. 19. Define Real Time Clock (RTC)? 20. Define Time-out or Time Overflow? Part B 1. a. Explain the parallel port devices. (08) b. Explain the sophisticated interfacing features in device ports. (08) 2. Explain the timer and counting devices. (16) 3. a. Explain the signal using a transfer of byte when using the I2C bus and also the format of bits at the I2C bus with diagram. (08) b. Explain CAN bus. (08) 4. Explain the following parallel communication devices: a. ISA bus (08) b. PCI and PCI/X (08) 5. a. Explain the internal serial communication devices. (08) b. Tabulate the applications of timing devices. (08)

Unit III Programming Concepts and Embedding Programming in C,C++ Part A(2 marks) 1. What is High-level language? 2. What is Development Cycle? 3. Define In-line assembly. 4. What is Object oriented programming? 5. Define Class. 6. What is a Scalar data type? 7. What is a Reference data types? 8. Define Local variable. 9. Define NULL function. 10. What is a Runtime Library? 11.What is Multiple Inheritance? 12. Define Exception handling. 13. What is IO stream? 14. What is a Foundation class? 15. What is a Class library? 16. Define Modularity and Robustness 17. What is Platform Independence? 18. What is a Preprocessor Directive? 19. Define include file and header file 20. What is a Data structure? 21. Define passing the value. 22. Define passing the reference. 23. What is a Queue? 24. What is a Stack? 25. Define List. 26. What is an ordered list? 27. Define Source code engineering tool? 28. What is an Optimization of Memory? Part B 1. a. Tabulate program elements: Macros and Functions and their uses. (08) b. Explain the use of pointers, NULL pointers. (08) 2. a. Explain the multiple function calls in the cyclic order in the main. Also write the advantages of building ISR queues. Explain it. (08) b. Explain the C program compiler and cross compiler. (08) 3. a. Explain the optimization of memory codes. (08) B.Explain in detail about embedded programming in C++. (08) 4. a. Explain the function pointers, function queues and ISR queues. (08) b. Discuss the advantages of high level language. (08)

Unit IV Real time Operating Systems Part -1 Part A (2 Marks) 1. Define process. 2. Define task. 3. Define Task Control Block (TCB) 4. Define Task state. 5. What is a thread? 6. Define Synchronization. 7. Define Inter process communication 8. What is shared data problem? 9. Define Semaphore. 10. Define Mutex. 11. What is counting semaphore? 12. What is Buffer? 13. Define P and V semaphores. 14. What is Priority inversion? 15. What is Deadlock situation? 16. Define Message Queue. 17. Define Mailbox and Pipe. 18. Define Socket. 19. Define Remote Procedure Call. Part B 1. a. Explain the goals of operating system services. (08) b. Explain the three alternative systems in three RTOS for responding a hardware source call with the diagram. (08) 2. Explain the scheduler in which RTOS insert into the list and the ready task for a. sequential execution in a co-operative round robin model. (08) b. Explain the fifteen point strategy for synchronization between the processes, ISRs, OS functions and tasks for resource management. (08) 3. a. Explain the critical section service by a preemptive scheduler. (08) b. Explain the Rate Monotonic Co-operative scheduling. (08)

Unit V Real time Operating Systems Part -2 Part A( 2 marks) 1. Name any two important RTOS. 2. What is meant by well tested and debugged RTOS? 3. What is sophisticated multitasking embedded system? 4. Name any two mailbox related functions. 5. Name any two queue related functions for the inter task communications. 6. Name some application for the Vx Works RTOS. 7. How is Vx Works TCB helpful for tasks? 8. What are the various features of Vx Works? 9. What is an active task in the context of Vx Works? 10. What are the task service functions supported by Vx Works? 11. Name any four interrupt service functions supported by Vx Works? 12. Name some of the inter process communication function. 13. Name some of the inter process communication function used for messaging 14. What are Vx Works pipes? 15. What is signal servicing function? 16. What are the different types of scheduling supported by Vx Works? 17. How are pending tasks handled in Vx Works? Part B 1. Draw and explain basic system of an Automatic chocolate vending system. (16) 2. Discuss with the diagram task synchronization model for a specific application. (16) 3. Explain the RTOS programming tool MicroC/OS-II. (16) 4. a. Explain the features of Vx Works. (08) b. Explain the case study of an embedded system for a smart card. (08)

2007 ANNA UNIVERSITY CHENNAI B.TECH INFORMATION TECHNOLOGY EMBEDDED SYSTEMS QUESTION PAPER

Course: B.Tech B.Tech Information Technology Time: Three hours

University/board: Anna University Chennai Maximum : 100 marks

Answer ALL questions PART A (10X2=20 MARKS) 1. Define system on chip( SOC) with an example. 2. Give any two uses of VLSI designed circuits. 3. Expand and explain HDLC. 4. What are the characteristics of PCI bus? 5. Why do you need a cross compiler? 6. What are the advantages of building ISR queues? 7. Explain the objectives of Kernel. 8. What are the uses of semaphores? 9. What is the meaning of Task Service functions? 10. What are the queue related functions? PART B (5 X 16 =80 Marks) 11. (a) (i) Explain the various forms of memories present in a system. (8) (ii) List the hardware unit that must be present in the embedded systems.(8) Or (b) (i) Explain the different program layers in the embedded software and also the process of converting a C program into the file for ROM image with suitable block diagrams. (8) (ii) Give a brief note on Exemplary Applications of each type of Embedded system. (8)

12. (a) (i) What are the characteristics taken into consideration when interfacing a device and a port? (8) (ii) What are the Sophisticated Interfacing features in Device Ports? (8) Or (b) (i) Tabulate uses of Timer device with applications and explanations. (8) (ii) Explain the signals during a transfer of a byte when using the I2C bus and also the format of the bits at the I2C bus with diagrams. (8)

13. (a) (i) Tabulate program elements: Macros and functions and their uses.. (8) (ii) Explain the use of pointers, NULL pointers. (8) Or (b) (i) What are the advantages of using multiple function calls in cyclic order in the main? Also write the advantages of building ISR queues? (4+4) (ii) What are the programming advantages of C++? What are the disadvantages of C++? (4+4) 14. (a) (i) List the goals of Operating system services . (8) (ii) Explain three alternative systems in three RTOSs for responding to a hardware source call with diagrams. (8) Or (b) (i) What are the 15 points strategy must be taken into account for designing the code for synchronization between the processes, ISRs, OS functions and tasks and for resource management? (8) (ii) Explain a scheduler in which the RTOS inserts into a list the ready tasks for sequential execution in a cooperative round robin model. (8)

15. (a) Draw and explain basic system (ACVS) of an Automatic Chocolate Vending Machine. (16) Or (b) Discuss with a diagram Task synchronization model for a specific application. (16)

You might also like