You are on page 1of 29

Project specific:

Explain the various parts of Arduino board


What are the various libraries available?
Which processor is there in the board?
List the Features of the processor used in the board
Explain various tools buttons provided in the platform.( Explain the IDE)
Change some part of the code
Explain a particular part of the code
How to download code in the actual physical board?
What are the various platforms available for ERTOS projects?

More about Arduino IDE at


https://www.arduino.cc/en/Guide/Introduction
https://docs.arduino.cc/software/ide-v1/tutorials/arduino-ide-v1-basics#sketch

RTOS

1. In real time operating system ____________


a) all processes have the same priority
b) a task must be serviced by its deadline period
c) process scheduling can be done only once
d) kernel is not required
View Answer
Answer: b
Explanation: None.
2. Hard real time operating system has ______________ jitter than a soft real time operating
system.
a) less
b) more
c) equal
d) none of the mentioned
View Answer
Answer: a
Explanation: Jitter is the undesired deviation from the true periodicity.
3. For real time operating systems, interrupt latency should be ____________
a) minimal
b) maximum
c) zero
d) dependent on the scheduling
View Answer
Answer: a
Explanation: Interrupt latency is the time duration between the generation of interrupt and
execution of its service.

5. In which scheduling certain amount of CPU time is allocated to each process?


a) earliest deadline first scheduling
b) proportional share scheduling
c) equal share scheduling
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
6. The problem of priority inversion can be solved by ____________
a) priority inheritance protocol
b) priority inversion protocol
c) both priority inheritance and inversion protocol
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
7. Time duration required for scheduling dispatcher to stop one process and start another is
known as ____________
a) process latency
b) dispatch latency
c) execution latency
d) interrupt latency
View Answer
Answer: b
Explanation: None.
9. Which one of the following is a real time operating system?
a) RTLinux
b) VxWorks
c) Windows CE
d) All of the mentioned
View Answer
Answer: d
Explanation: None.
10. VxWorks is centered around ____________
a) wind microkernel
b) linux kernel
c) unix kernel
d) none of the mentioned
View Answer
Answer: a
Explanation: None.

11. What is the disadvantage of real addressing mode?


a) there is a lot of cost involved
b) time consumption overhead
c) absence of memory protection between processes
d) restricted access to memory locations by processes
View Answer
Answer: c
Explanation: None.
12. Preemptive, priority based scheduling guarantees ____________
a) hard real time functionality
b) soft real time functionality
c) protection of memory
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
13. Real time systems must have ____________
a) preemptive kernels
b) non preemptive kernels
c) preemptive kernels or non preemptive kernels
d) neither preemptive nor non preemptive kernels
View Answer
Answer: a
Explanation: None.
14. What is Event latency?
a) the amount of time an event takes to occur from when the system started
b) the amount of time from the event occurrence till the system stops
c) the amount of time from event occurrence till the event crashes
d) the amount of time that elapses from when an event occurs to when it is serviced.
View Answer
Answer: d
Explanation: None.
15. Interrupt latency refers to the period of time ____________
a) from the occurrence of an event to the arrival of an interrupt
b) from the occurrence of an event to the servicing of an interrupt
c) from arrival of an interrupt to the start of the interrupt service routine
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
16. Real time systems need to __________ the interrupt latency.
a) minimize
b) maximize
c) not bother about
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
17. The amount of time required for the scheduling dispatcher to stop one process and start
another is known as ______________
a) event latency
b) interrupt latency
c) dispatch latency
d) context switch
View Answer
Answer: c
Explanation: None.
19. Priority inversion is solved by use of _____________
a) priority inheritance protocol
b) two phase lock protocol
c) time protocol
d) all of the mentioned
View Answer
Answer: a
Explanation: None.

21. In a real time system the computer results ____________


a) must be produced within a specific deadline period
b) may be produced at any time
c) may be correct
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
22. In a safety critical system, incorrect operation ____________
a) does not affect much
b) causes minor problems
c) causes major and serious problems
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
23. Antilock brake systems, flight management systems, pacemakers are examples of
____________
a) safety critical system
b) hard real time system
c) soft real time system
d) safety critical system and hard real time system
View Answer
Answer: d
Explanation: None.
24. In a ______ real time system, it is guaranteed that critical real time tasks will be completed
within their deadlines.
a) soft
b) hard
c) critical
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
25. Some of the properties of real time systems include ____________
a) single purpose
b) inexpensively mass produced
c) small size
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
26. The amount of memory in a real time system is generally ____________
a) less compared to PCs
b) high compared to PCs
c) same as in PCs
d) they do not have any memory
View Answer
Answer: a
Explanation: None.
27. What is the priority of a real time task?
a) must degrade over time
b) must not degrade over time
c) may degrade over time
d) none of the mentioned
View Answer
Answer: b
Explanation: None.

Arduino

1) What is Arduino?
Arduino is an open source electronic platform. It is based on easy-to-use
hardware and software. It able to read input signal. It is used to write and upload
the computer code to the physical board by using Arduino.

4) Why we should use Arduino?


We should use Arduino because of its features:

 It is easy to use.
 It runs on Cross platform.
 Low cost
 It is open source.

5) In which language Arduino software was written?

Arduino software was written in Java, C++ and c language.

6) What are the advantages of Arduino?


There are following features of Arduino:
 It able to read analog or digital input signals.
 We can control our functions.
 It uses c and c++ programming language.

8) What is sketch in Arduino?


In Arduino, the first terminology is the program called sketch.

9) What are the three important parts of Arduino?


Arduino has three important parts: structure , values( variables and constants)
and function.

10) What are the software structure functions?


There are two main software structure functions:

 Setup( ) function
 Loop( ) function

11) What is the use of operator in Arduino?


Operator is used to compile mathematical or logical functions.

12) How can we declare the functions?


We can declare the function by using given code:
int sum_func (int x, int y) // function declaration {

int z = 0;

z = x+y ;

return z; // return the value

}
13) Which function is used to find the length of string?
Strlen() functions is used to find the length of string.

14) How to convert string to upper case?


The my_str.toUpperCase() function is used to convert string to upper case.

15) What are the functions of time in Arduino?


In Arduino, there are four functions of time:
delay()

delayMicroseconds() :

millis()

micros()

16) What are Libraries in Arduino?


In Arduino, Libraries are collection of code that makes it easy to connect to a
sensor, display, module etc.
1. Question 1. What Is Arduino?
Answer :
Arduino is an open-source electronics platform based on easy-to-use hardware and
software. Arduino boards are able to read inputs - light on a sensor, a finger on a
button, or a Twitter message - and turn it into an output - activating a motor, turning
on an LED, publishing something online. You can tell your board what to do by
sending a set of instructions to the microcontroller on the board. To do so you use the
Arduino programming language (based on Wiring), and the Arduino Software (IDE),
based on Processing.

Over the years Arduino has been the brain of thousands of projects, from everyday
objects to complex scientific instruments. A worldwide community of makers -
students, hobbyists, artists, programmers, and professionals - has gathered around this
open-source platform, their contributions have added up to an incredible amount of
accessible knowledge that can be of great help to novices and experts alike.

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming.
As soon as it reached a wider community, the Arduino board started changing to adapt
to new needs and challenges, differentiating its offer from simple 8-bit boards to
products for IoT applications, wearable, 3D printing, and embedded environments. All
Arduino boards are completely open-source, empowering users to build them
independently and eventually adapt them to their particular needs. The software, too,
is open-source, and it is growing through the contributions of users worldwide.

2. Question 2. Why Arduino?


Answer :
Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-use
for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and
Linux. Teachers and students use it to build low cost scientific instruments, to prove
chemistry and physics principles, or to get started with programming and robotics.
Designers and architects build interactive prototypes, musicians and artists use it for
installations and to experiment with new musical instruments. Makers, of course, use
it to build many of the projects exhibited at the Maker Faire, for example. Arduino is a
key tool to learn new things. Anyone - children, hobbyists, artists, programmers - can
start tinkering just following the step by step instructions of a kit, or sharing ideas
online with other members of the Arduino community.

There are many other microcontrollers and microcontroller platforms available for
physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's
Handyboard, and many others offer similar functionality. All of these tools take the
messy details of microcontroller programming and wrap it up in an easy-to-use
package. Arduino also simplifies the process of working with microcontrollers, but it
offers some advantage for teachers, students, and interested amateurs over other
systems:

o Inexpensive - Arduino boards are relatively inexpensive compared to


other microcontroller platforms. The least expensive version of the
Arduino module can be assembled by hand, and even the pre-assembled
Arduino modules cost less than $50
o Cross-platform - The Arduino Software (IDE) runs on Windows,
Macintosh OSX, and Linux operating systems. Most microcontroller
systems are limited to Windows.
o Simple, clear programming environment - The Arduino Software (IDE)
is easy-to-use for beginners, yet flexible enough for advanced users to
take advantage of as well. For teachers, it's conveniently based on the
Processing programming environment, so students learning to program
in that environment will be familiar with how the Arduino IDE works.
o Open source and extensible software - The Arduino software is
published as open source tools, available for extension by experienced
programmers. The language can be expanded through C++ libraries, and
people wanting to understand the technical details can make the leap
from Arduino to the AVR C programming language on which it's based.
Similarly, you can add AVR-C code directly into your Arduino programs
if you want to.
o Open source and extensible hardware - The plans of the Arduino boards
are published under a Creative Commons license, so experienced circuit
designers can make their own version of the module, extending it and
improving it. Even relatively inexperienced users can build the
breadboard version of the module in order to understand how it works
and save money.
3. Question 3. What Do You Mean By Open-source Hardware?
Answer :
Open-source hardware shares much of the principles and approach of free and open-
source software. In particular, we believe that people should be able to study our
hardware to understand how it works, make changes to it, and share those changes. To
facilitate this, we release all of the original design files (Eagle CAD) for the Arduino
hardware. These files are licensed under a Creative Commons Attribution Share-Alike
license, which allows for both personal and commercial derivative works, as long as
they credit Arduino and release their designs under the same license. The Arduino
software is also open-source. The source code for the Java environment is released
under the GPL and the C/C++ microcontroller libraries are under the LGPL.

4. Question 4. How Can I Get An Arduino Board?


Answer :
You can buy an Arduino board from the official store online or from one of the
distributors listed on this page. If you'd prefer to build your own, see the Arduino
Single-Sided Serial board, which can be easily etched and assembled.

5. Question 5. Which Are The Official Arduino Boards?


Answer :
The official Arduino boards are the ones listed on the product page. These are boards
whose manufacturers work with the Arduino team to ensure a good user experience,
compatibility with the Arduino software, and a quality product. In return for their
status as official boards, the manufacturers pay a licensing fee to the Arduino team to
support the further development of the project.

In general, we restrict use of the name "Arduino" to the official boards. If you find a
product under a different name but described as "Arduino compatible", it’s probably
not an official board and doesn’t fund continued work on the project.

6. Question 6. Can I Use The Arduino Logo To Identify Non Commercial Content?
Answer :
If you're creating tutorials, managing a local community of Arduino users, opening up
an Arduino-focused page online (ie. social networks) you can use the Arduino
Community Logo! This will allow people identify better what comes directly from us,
and what comes from the community.
7. Question 7. I Want To Design My Own Board, What Should I Do?
Answer :
The reference designs for the Arduino boards are available from their specific product
pages. They're licensed under a Creative Commons Attribution Share-Alike license, so
you are free to use and adapt them for your own needs without asking permission or
paying a fee. If you're looking to make something of interest to the community, we'd
encourage you to discuss your ideas on the hardware development forum so that
potential users can offer suggestions.

Question 8. What Should I Call My Boards?


Answer :
If you're making your own board, come up with your own name! This will allow
people identify you with your products and help you to build a brand. Be creative: try
to suggest what people might use the board for, or emphasize the form factor, or just
pick a random word that sounds cool. "Arduino" is a trademark of Arduino LLC and
should not be used for unofficial variants. If you're interested in having your design
included in the official Arduino product line, please see the So you want to make an
Arduino document and contact the Arduino team. While unofficial products should
not have "Arduino" in their name, it's okay to describe your product in relation to the
Arduino project and platform. Here are a few guidelines that explain which uses we
consider reasonable.

8. Question 9. Can I Build A Commercial Product Based On Arduino?


Answer :
Yes, with the following conditions:

o Physically embedding an Arduino board inside a commercial product


does not require you to disclose or open-source any information about its
design.
o Deriving the design of a commercial product from the Eagle files for an
Arduino board requires you to release the modified files under the same
Creative Commons Attribution Share-Alike license. You may
manufacture and sell the resulting product.
o Using the Arduino core and libraries for the firmware of a commercial
product does not require you to release the source code for the firmware.
The LGPL does, however, require you to make available object files that
allow for the relinking of the firmware against updated versions of the
Arduino core and libraries. Any modifications to the core and libraries
must be released under the LGPL.
o The source code for the Arduino environment is covered by the GPL,
which requires any modifications to be open-sourced under the same
license. It does not prevent the sale of derivative software or its inclusion
in commercial products.
In all cases, the exact requirements are determined by the applicable license.
Additionally, see the previous question for information about the use of the name
“Arduino”.

9. Question 10. Can I Program The Arduino Board In C?


Answer :
In fact, you already are; the Arduino language is merely a set of C/C++ functions that
can be called from your code. Your sketch undergoes minor changes (e.g. automatic
generation of function prototypes) and then is passed directly to a C/C++ compiler
(avr-g++). All standard C and C++ constructs supported by avr-g++ should work in
Arduino.

10. Question 11. Can I Use A Different Ide To Program The Arduino Board?
Answer :
It is possible to compile programs for the Arduino using other build tools (e.g.
Makefiles and/or AVR Studio). You'll need to configure these to link against the
appropriate files in the Arduino core libraries.

11. Question 12. Can I Use An Arduino Board Without The Arduino Software?
Answer :
Sure. It's just an AVR development board, you can use straight AVR C or C++ (with
avr-gcc and avrdude or AVR Studio) to program it.

12. Question 13. Can I Program An Arduino Board Without The Arduino Ide?
Answer :
Yes, you can use Create web editor to program your board without the need of
download the classic IDE.

13. Question 14. Can I Use The Arduino Software With Other Avr Boards?
Answer :
Yes, although it may require some modifications to the Arduino core libraries.

14. Question 17. How Do I Program The Module?


Answer :
To program the littleBits Arduino module, you simply connect it to a computer
running the Arduino software via USB and connect a littleBits power module to one
of the module inputs. From there, you only need to select Arduino Leonardo in the
board dropdown menu and the port your computer has opened for it. On a Mac, it will
be something like /dev/tty.usbmodem and in Windows, it will display as COMM1 or
similar. When your sketch is ready, press upload in the IDE.

15. Question 18. The Arduino Ide Has Been Showing “uploading Sketch...” For A
Long Time. Why Hasn’t It Finished Uploading?
Answer :
Occasionally the uploading process gets hung up. Click the Upload button again and it
will restart the upload process. Uploading the sketch shouldn’t take more than 10
seconds.

16. Question 19. What Are The Different File Extensions For?
Answer :
While creating a sketch in the Arduino IDE, you have access to a number of different
file extensions for use with your source code files. Each one has its own particular use
which I'll explain below.

o .ino : This is the main extension for your sketch file(s). Your primary
sketch file must be an .ino file named the same as the directory it is
located in. You can create additional .ino files in your sketch named
however you like. Before compilation, all additional .ino files are
appended to the primary sketch file. They are copied in ascending order
based on the file name, and all are run throguh the standard process of
gathering includes and generating prototypes. For more information on
what the IDE does beofre compiling your code, visit this FAQ: What
does the IDE change in my sketch?
o .pde : This is the default extension for sketches written for the Arduino
IDE prior to the release of version 1.0. if you use an IDE version of at
least 1.0.0 or greater, you should rename your sketch file from .pde
to .ino. Also keep your IDE up to date, pre 1.0 versions do not support
many new libraries due to significant changes to the Arduino core API.
o .h : Header files, or files with the extension .h can be utilized in a
number of ways. If your sketch uses a set of constants that multiple .cpp
or .ino files may use, you can create a single location for your common
variables. Functions that are defined in different .cpp files can have their
declarations placed in a header for easy reuse.
o .cpp : This extension is a C++ source file. Sometimes a sketch becomes
quite large and you can utilize a .cpp file to separate sections of your
code. Definitions inside a .cpp file that you want to access elsewhere
should have their declarations inside a header (.h) file. This allows your
sketch to include the header, and its functionality. Also an important
point is; your .cpp files do not go through the IDE pre-compilation
modifications, and therefore have no prototypes generated. For more
information on using multiple files, visit this article: Breaking a sketch
into multiple files.
o .c : If you wish to write C code and use it within Arduino, you need to
use a .c extension instead of a .cpp file. Using a .c file alone however is
not the complete solution.
17. Question 20. Is There Another Ide For Arduino?
Answer :
There are a few different solutions you can use, there are plugins and modifications
for mainstream IDE packages. And a few talented people have created standalone
applications specifically for Arduino and AVR development.

18. Question 21. Can I Use Alternative Serial Monitors With Arduino?
Answer :
Yes, alternative serial monitors can be used. The arduino connects with the computer
using a virtual serial port over USB. This means any application on your computer can
potentially connect with the Arduino. Not to mention the fact you can write your own
programs which can talk to your project using the serial port.

I have personally used HTERM and it met all my needs. Many people have used the
other listed applications with positive results.

19. Question 22. What Does The Ide Change In My Sketch?


Answer :
The IDE makes subtle changes to the code when you compile your sketch. The
changes are not permenant as a copy of your sketch is used to do the compiling. This
is a consequence of the IDE allowing you to compile the sketch without saving into a
file, which is what the compiler requires.

In a breif rundown, the IDE does three major activities.

o Adds an include file for the Arduino core: This process is a fairly
harmless addition, if users include Arduino.h explicitly, the header has
#ifndef guards protecting it from multiple declaration errors which is
typical when including an unprotected header into multiple locations.
o Generates function prototypes: This is also a generally unobtrusive step.
As with protected include files, you can have multiple declarations of a
function, it is the definitions which must be unique.
o Collects included libraries: As the sketch is compiled in a temporary
location, the IDE needs to ensure all include paths are valid. To
accomplish this the IDE scans the sketch for all headers that match files
residing in the libraries folder, then it simply copies the library source
files into the temporary location along with the sketch.
This has been a source of error for many new Arduino users attemping to write their
own libraries. As confusing as it sounds, any library included into other libraries must
also be included in the sketch; simply so it can be copied to the temporary location.

To show a quick example of what the modifications look like; here is the
BareMinimum sketch, and its modified result.

o Before---expand source
o After----expand source
The modifications performed are great for beginners that do not know the C++
fundamentals required for building simple sketchs. The sketch looks tidier to the
novice with only a setup()/loop() implementation cluttering up the workspace.
However once you start using certain C++ features you can run into some common
pitfalls as a result of these modifications.

20. Question 23. Why Do #ifdef Macro's Stop The Sketch From Compiling?
Answer :
The IDE has been known to cause errors with certain uses of #ifdef.

21. Question 25. What Is The Arduino Language?


Answer :
There is no custom Arduino language, Arduino is the name of the project here:
Arduino.cc.

The compiler used by the IDE is called avr-gcc and it is a C++ compiler. The
languages listed below are compatible with avr-gcc and can be used to program your
sketches in the IDE.

o C
o C++
o Inline ASM
The IDE has access to a large API for use with your Arduino development boards.
The source code is freely available for you to extract and modify as you wish. The
API also sits on top of a robust and industry standard framework for manipulating the
CPU directly. So when you need more performance from your device you can leave
parts of the Arduino API out directly control the hardware. An example is port
manipulation over Arduinos digitalRead/Write functionality.

22. Question 37. Who Are Using Arduino?


Answer :
Arduino is used by students coming from almost every discipline at university level.
Art and design students were our initial user group from, but by making the system
easy to use to them, we made it easy for everybody. Many design studios, but also
research groups, started using Arduino technology for its ease of use, as it makes
things that should be easy to solve, easy to solve.

RTOS

What do you mean by a real-time system?

A real-time system is a time-bound system that has well-defined fixed time constraints.
Processing must be done within the defined constraints or the system will fail.

What is RTOS?

RTOS stands for Real-Time Operating System. It specially designed to run the application with
very precise timing and a high degree of reliability. An RTOS system must have response time
predictability and it must be deterministic.

How is RTOS different from other OS?

RTOS offers services that allow tasks to be performed within predictable timing constraints.

What are the different interprocess communications?

Semaphore, mutex, message passing, shared a memory, socket connections.


What is the kernel?

The kernel is a computer program that is the core of a computer’s operating system, with
complete control over everything in the system. On most systems, it is one of the first programs
loaded on start-up (after the bootloader). It handles the rest of the start-up as well as input/output
requests from software, translating them into data-processing instructions for the central
processing unit. It handles memory and peripherals like keyboards, monitors, printers, and
speakers.

What is multitasking in the OS?

Multitasking allows the user to run several tasks at the same time. However, only one task is
active at a time for user interaction, but the processing ability of the computer’s processors is so
fast and smooth that it gives the impression of performing multiple tasks at the same time.

What is semaphore?

Semaphore is simply a variable that is non-negative and shared between threads. This variable is
used to solve the critical section problem and to achieve process synchronization in the
multiprocessing environment. A semaphore is a signaling mechanism, and a thread that is
waiting on a semaphore can be signaled by another thread.

What is mutex?

A Mutex is a mutually exclusive object which protects the shared resources from simultaneous
access by multiple threads or processes. It acts as a gatekeeper to a section of code allowing one
thread in and blocking access to all others. This ensures that the code being controlled will only
be hit by a single thread at a time.

What Are The Different Inter Process Communications?


Answer :
semaphore, mutex, message passing, shared memory, socket connections.

embedded systems

1) Explain what is embedded system in a computer system?


An embedded system is a computer system that is part of a larger system or
machine. It is a system with a dedicated function within a larger electrical or
mechanical system.

2) Mention what are the essential components of embedded system?

Essential components of embedded system includes

 Hardware
 Processor
 Memory
 Timers
 I/O circuits
 System application specific circuits
 Application specific Software
 Real Time Operating System
 It runs a process as per scheduling and do the switching from one process to
another

3) Mention how I/O devices are classified for embedded system?

The I/O devices of embedded system are classified into two categories

 Serial
 Parallel

Serial Input Output


 Synchronous :
Audio/Video signal Audio/Video signal
 Asynchronous :
Keypad, Mouse, Modem Printer, Modem
Parallel Input Output
 Single bit :
Rotation, Threshold sensors Pulses to external circuit
 Multi bit :
Vp from ADC, sensors LCD, Printer
4) Why embedded system is useful?
With embedded system, it is possible to replace dozens or even more of hardware
logic gates, input buffers, timing circuits, output drivers, etc. with a relatively cheap
microprocessor.

5) Explain what are real-time embedded systems?


Real-time embedded systems are computer systems that monitor, respond or
control an external environment. This environment is connected to the computer
system through actuators, sensors, and other input-output interfaces.

6) Explain what is microcontroller?

The microcontroller is a self-contained system with peripherals, memory and a


processor that can be used as embedded system.

7) Mention what is the difference between microprocessor and


microcontroller?
Microprocessor is managers of the resources (I/O, memory) which lie outside of its
architecture

Microcontroller have I/O, memory, etc. built into it and specifically designed for
control

8) What does DMA address will deal with?

DMA address deals with physical addresses. It is a device which directly drives the
data and address bus during data transfer. So, it is purely physical address.

9) Explain what is interrupt latency? How can you reduce it?

Interrupt latency is a time taken to return from the interrupt service routine post
handling a specific interrupt. By writing minor ISR routines, interrupt latency can
be reduced.

10) Mention what are buses used for communication in embedded system?

For embedded system, the buses used for communication includes


 I2C: It is used for communication between multiple ICs
 CAN: It is used in automobiles with centrally controlled network
 USB: It is used for communication between CPU and devices like mouse, etc.

While ISA, EISA, PCI are standard buses for parallel communication used in PCs,
computer network devices, etc.

11) List out various uses of timers in embedded system?

Timers in embedded system are used in multiple ways

 Real Time Clock (RTC) for the system


 Initiating an event after a preset time delay
 Initiating an even after a comparison of preset times
 Capturing the count value in timer on an event
 Between two events finding the time interval
 Time slicing for various tasks
 Time division multiplexing
 Scheduling of various tasks in RTOS

12) Explain what is a Watchdog Timer?

A watchdog timer is an electronic device or electronic card that execute specific


operation after certain time period if something goes wrong with an electronic
system.

13) Explain what is the need for an infinite loop in embedded systems?
Embedded systems require infinite loops for repeatedly processing or monitoring
the state of the program. For instance, the case of a program state continuously
being verified for any exceptional errors that might just happen during run-time
such as memory outage or divide by zero, etc.

15) Explain what is semaphore?

A semaphore is an abstract datatype or variable that is used for controlling access,


by multiple processes to a common resource in a concurrent system such as
multiprogramming operating system. Semaphores are commonly used for two
purposes
 To share a common memory space
 To share access to files

16) Explain what is the difference between mutexes and semaphores?

Mutexes Semaphores
 A mutex object enables one thread into a
controlled section, forcing other threads  Semaphore allows
which tries to gain access to that section to multiple access to
wait until the first thread has moved out from shared resources
that section

 A semaphore can be
 Mutex can only be released by thread which
signaled from any other
had acquired it
thread or process.

 While for semaphore


you won’t know which
 Mutex will always have a known owner
thread we are blocking
on

 Mutex is also a tool that is used to provide  Semaphore is a


deadlock-free mutual exclusion (either synchronization tool to
consumer or producer can have the key and overcome the critical
proceed with their work) section problem

 Semaphores are usually


 Mutexes by definition are binary semaphores,
referred to counted
so there are two states locked or unlocked
locks

Differentiate microprocessors and microcontrollers?

Ans: As now you are fundamentally familiar with what is a microcontroller And
microprocessor, it is easy to recognize the significant contrasts between a
microcontroller and microprocessor.
1. Key difference in both of them is the presence of external peripheral, where
microcontrollers have RAM, ROM, EEPROM embedded in it while we have to use
external circuits in the case of microprocessors.

2. As all the peripheral of microcontrollers are on the single-chip it is compact while the
microprocessor is bulky.

3. Microcontrollers are made by using complementary metal-oxide-semiconductor


technology so they are far cheaper than microprocessors. In addition, the applications
made with microcontrollers are cheaper because they need lesser external components,
while the overall cost of systems made with microprocessors is high because of the high
number of external components required for such systems.

4. Processing speed of microcontrollers is about 8 MHz to 50 MHz, but on the contrary


processing speed of general microprocessors is above 1 GHz so it works much faster
than microcontrollers.

5. Generally microcontrollers have a power-saving system, like idle mode or power-


saving mode so overall it uses less power, and also since external components are low
overall consumption of power is less. While in microprocessors generally there is no
power saving system and also many external components are used with it, so its power
consumption is high in comparison with microcontrollers.

1. Question 1. What Is The Difference Between Embedded Systems And The System
In Which Rtos Is Running?
Answer :
Embedded system is just combination of s/w and h/w that is some embedded system
may have os some may not and rtos is an os.

OR

Embedded system can include RTOS and cannot include also. it depends on the
requirement. if the system needs to serve only event sequentially, there is no need of
RTOS. If the system demands the parallel execution of events then we need RTOS.

What Are Hard And Soft Real Time Systems?


Answer :
The hard real time systems are the one that depend on the output very strictly on time. Any late
response or delay cannot be tolerated and will always be considered a failure. The soft real time
systems on the other are not very rigid as the hard real time systems. The performance of the
system degrades with the lateness of response, but it is bearable and can be optimized to a certain
level for reuse of the result.

Why Do We Need A Infinite Loop In Embedded Systems Development? What Are The
Different Ways By Which You Can Code In A Infinite Loop?
Answer :
The infinite loops are coded in to give a delay or sleep to the program execution for a specific
amount of clock ticks. They can be implemented as:
while(;;);
for();
(or)
Loop:
goto Loop;

List various timers in embedded systems?


Every MCU has a different list of timers. Here I am mentioning a few types of timers. If
you know another one then please write a comment in the comment box I will add in this
list.

 Watchdog Timer (WDT)


 General Purpose of Timer
 Interval Timer (Programmable timer)
 Systick Timer
 Real-Time Clock (RTC)

What are the components of an embedded system?


Below I am mentioning essential components of the embedded system,

 Power supply.
 Processor.
 Memory.
 Timers-Counters.
 Communication Ports.
 I/O circuits.
 Application-Specific Circuits.
 Assembler.
 Emulator.
 Debugger.
 IDE and Compiler.

What’s the difference between a microcontroller and a microprocessor?


The below table contains some common differences between Microprocessor and
Microcontroller (Microprocessor vs. Microcontroller).

Microprocessor Microcontroller

A microprocessor has only a CPU inside them in A microController has all the things like RAM,
one or a few Integrated Circuits. Eg, 8085, 8086 etc ROM, and timer ..etc on the chip. Eg. 8051, PIC
series, etc.

Because it has only a processor, so memory and It is a complete package. You only need to attach
I/O components need to be connected externally. require external peripheral like LED, LCD, etc. The
microController has a processor along with
internal memory and I/O components.

Memory and I/O has to be connected externally, Memory and I/O are already present, and the
so the circuit becomes large. internal circuit is small.

You can’t use it in compact systems You can use it in compact systems.

Cost of the entire system is high Cost of the entire system is low
Due to external components, the total power As external components are low, total power
consumption is high. Therefore, it is not ideal for consumption is less. So it can be used with devices
the devices running on stored power like batteries. running on stored power like batteries.

Most of the microprocessors do not have power- Most of the microcontrollers offer power-saving
saving features. mode.

It is mainly used in personal computers. It is used mainly in a washing machine, MP3


players, and embedded systems.

Microprocessor has a smaller number of registers, Microcontroller has more register. Hence the
so more operations are memory-based. programs are easier to write.

Microprocessors are based on the Von Neumann Micro controllers arc based on Harvard
model architecture

It is a central processing unit on a single silicon- It is a byproduct of the development of


based integrated chip. microprocessors with a CPU along with other
peripherals.

It has no RAM, ROM, Input-Output units, timers, It has a CPU along with RAM, ROM, and other
and other peripherals on the chip. So the circuit peripherals embedded on a single chip. All most all
connection will be complicated. require things on single-chip so circuit connection
will be easy and a newbie easily interface I/O
devices.

It uses an external bus to interface to RAM, ROM, It uses an internal controlling bus.
and other peripherals.

Microprocessor-based systems can run at a very Microcontroller based systems run up to 200MHz
high speed because of the technology involved. or more depending on the architecture.

It’s used for general purpose applications that It’s used for application-specific systems.
allow you to handle loads of data.

It’s complex and expensive, with a large number of It’s simple and inexpensive with less number of
instructions to process. instructions to process.
What is interrupt latency?
It is an important question that is asked by the interviewer to test the understanding of
Interrupt. Basically, interrupt latency is the number of clock cycles that are taken by the
processor to respond to an interrupt request. This number of the clock cycle is count
between the assertions of the interrupt request and the first instruction of the interrupt
handler.

2) List few advantages and disadvantages of embedded system?

Some advantages and disadvantages of an embedded system are as follows:

o It is easy for mass production.


o It is highly reliable.
o It has very few interconnections.
o It is small in size.
o It is less expensive.
o It performs a fast operation.
o It has improved product quality.
o It optimizes the use of system resources.
o It has a low power operation.

Some disadvantages of an embedded system are as follows:

o It is hard to maintain because it is used and throws device.


o It does not offer technological improvement.
o It provides less power supply durability if it is battery operated.
o It has hard to take the backup of embedded files.

3) Explain what is embedded system?

An embedded system is a hardware system attached with software that is designed to perform a
dedicated function or a specific task, either as an independent system or as a part of a large
system.

4) What are major components of embedded system?


There are three major components of an embedded system i.e. hardware, software,
and operating system. The sub-division of these components are Processor, Memory, Timers
counters, Communication ports, Output, and Input, etc.

You might also like