Interview Questions.

Embedded Systems Interview Questions and Answers


Embedded Systems Interview Questions and Answers

Q1. Explain what is embedded gadget in a laptop system?

Ans: An embedded device is a pc system that is a part of a larger system or machine.  It is a machine with a committed function within a larger electrical or mechanical machine.

Q2. Mention what are the critical components of embedded system?

Ans: Essential additives of embedded system consists of:





I/O circuits.

System software specific circuits.


It ensures the availability of System Memory.

It exams the Processor Speed availability.

The want to restrict power lost when strolling the machine continuously.

Real Time Operating System

It runs a method as in line with scheduling and do the switching from one method to any other.

Q3. Mention how I/O gadgets are categorised for embedded gadget?

Ans: The I/O gadgets of embedded gadget are labeled into  categories:



Serial    Input    Output

·          Synchronous :    Audio/Video sign    Audio/Video sign

·          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

Q4. Why embedded system is beneficial?

Ans: With embedded system, it's miles viable to update dozens or even extra of hardware common sense gates, input buffers, timing circuits, output drivers, etc. With a fairly cheap microprocessor.

Q5. Explain what are real-time embedded structures?

Ans: Real-time embedded structures are computer structures that monitor, respond or manipulate an outside surroundings. This surroundings is connected to the computer device via actuators, sensors, and other enter-output interfaces.

Q6. Explain what is microcontroller?

Ans: The microcontroller is a self-contained machine with peripherals, reminiscence and a processor that may be used as embedded device.

Q7. Mention what's the difference among microprocessor and microcontroller?

Ans: Microprocessor is managers of the assets (I/O, reminiscence) which lie out of doors of its architecture.

Microcontroller have I/O, memory, and many others. Constructed into it and in particular designed for control.

Q8. What does DMA address will deal with?

Ans: DMA cope with offers with bodily addresses. It is a tool which directly drives the information and deal with bus at some point of statistics transfer. So, it is basically bodily cope with.

Q9. Explain what's interrupt latency? How are you able to lessen it?

Ans: Interrupt latency is a time taken to return from the interrupt service ordinary publish managing a specific interrupt.  By writing minor ISR routines, interrupt latency may be decreased.

Q10. Mention what are buses used for conversation in embedded gadget?

Ans: For embedded gadget, the buses used for communique consists of:

I2C: It is used for conversation between more than one ICs.

CAN: It is used in motors with centrally controlled network.

USB: It is used for conversation between CPU and devices like mouse, and so on.

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

Q11. List out diverse makes use of of timers in embedded device?

Ans: Timers in embedded gadget are used in more than one approaches:

Real Time Clock (RTC) for the machine.

Initiating an event after a preset time postpone.

Initiating an excellent after a evaluation of preset times.

Capturing the be counted cost in timer on an event.

Between two activities finding the time c program languageperiod.

Time slicing for numerous tasks.

Time division multiplexing.

Scheduling of various duties in RTOS.

Q12. Explain what is a Watchdog Timer?

Ans: A watchdog timer is an electronic tool or electronic card that execute particular operation after sure time period if some thing is going incorrect with an electronic machine.

Q13. Explain what is the want for an endless loop in embedded systems?

Ans: Embedded structures require endless loops for time and again processing or monitoring the kingdom of the program.  For example, the case of a application nation continuously being verified for any fantastic errors that would simply take place at some point of run-time such as reminiscence outage or divide via zero, and so on.

Q14. List out a number of the commonly observed errors in Embedded Systems?

Ans: Some of the typically discovered errors in embedded systems are:

Damage of memory gadgets static discharges and temporary modern.

Address line malfunctioning because of a quick in circuit.

Data lines malfunctioning.

Due to garbage or mistakes some memory locations being inaccessible in storage.

Inappropriate insertion of memory gadgets into the memory slots

Wrong manage signals.

Q15. Explain what is semaphore?

Ans: A semaphore is an summary datatype or variable this is used for controlling access, through a couple of procedures to a not unusual aid in a concurrent system together with multiprogramming running device.  Semaphores are normally used for two purposes:

To percentage a common memory area.

To share get admission to to files.

Q16. Explain what's the distinction between mutexes and semaphores?


Mutexes    Semaphores

 A mutex item permits one thread right into a controlled section, forcing other threads which tries to advantage get admission to to that phase to attend till the primary thread has moved out from that segment

 Semaphore lets in more than one get right of entry to to shared sources

Mutex can simplest be released by using thread which had obtained it

A semaphore may be signaled from some other thread or technique.

Mutex will always have a acknowledged owner

 While for semaphore you gained’t understand which thread we are blocking on

Mutex is also a device this is used to offer deadlock-loose mutual exclusion (either client or producer will have the key and continue with their paintings)

Semaphore is a synchronization tool to triumph over the crucial phase trouble

Mutexes via definition are binary semaphores, so there are  states locked or unlocked

Semaphores are commonly noted counted locks

Q17. When one must use recursion feature? Mention what occurs whilst recursion functions are declared inline?

Ans: Recursion function can be used while you are aware about the wide variety of recursive calls isn't always excessive. Inline capabilities assets says on every occasion it will called, it will replica the complete definition of that feature. Recursive function declared as inline creates the burden at the compilers execution.

Q18. Explain whether we are able to use semaphore or mutex or spinlock in interrupt context in Linux Kernel?

Ans: Semaphore or Mutex can't be used for interrupt context in Linux Kernel. While spinlocks can be used for locking in interrupt context.

Q19. What is lst report?


This document is likewise referred to as as listing file.

It lists the opcodes ,addresses and errors detected through the assembler.

List record is produced most effective whilst indicated with the aid of the consumer.

It may be accessed with the aid of an editor and displayed on reveal display screen or printed.

Programmer uses this record to locate the syntax mistakes and later fix them.

Q20. How is a application accomplished’ little by little’ or’ byte by means of byte’?



1   0000         ORG 0H

2   0000    7D25    MOV R5,#25H

3   0002    7F34    MOV R7,#34H

4   0004    2D    ADD A, R5

5   0005         END


A program is constantly done byte via byte.

Firstly,1st opcode 7D is fetched from place 0000 and then the value 25 is fetched from 0001.

25 is then located within the sign up R5 and application counter is incremented to factor 0002.

On execution of opcode 7F, fee 34 is copied to check in R7.

Then addition of contents of R5 and accumulater takes place.

Here all of the opcodes are eight bit forming a byte.

Q21. Explain DB.


DB is referred to as as outline byte used as a directive within the assembler.

It is used to define the 8 bit records in binary ,hexadecimal or decimal codecs.

It is the only directive that may be used to outline ASCII strings large than  characters.

DB is likewise used to allocate memory in byte sized chunks.

The assembler continually converts the numbers lnto hexadecimal.

Q22. What is EQU?


EQU is the equate assmbler directive used to outline a steady with out occupying a memory place.

It friends a steady value with facts label .

Whenever the label appears within the program ,steady cost is subsituted for label.

Advantage: The constant price occuring at numerous positions in a program may be changed immediately using this directive.

Syntax: label EQU consistent value

Q23. How are labels named in assembly language?


Label name should be specific and should comprise alphabetic letters in each uppercase and lowercase.

1st letter must constantly be an alphabetic letter.

It can also use digits and special characters ?,.,@,_,$.

Label have to not be one of the reserved phrases in meeting language.

These labels make the program plenty less complicated to examine and maintain.

Q24. Are all of the bits of flag register utilized in 8051?


The flag register additionally known as because the application reputation word uses simplest 6 bits.

The  unused bits are consumer defineable flags.

Carry, auxillary deliver, parity and overflow flags are the conditional flags used in it.

PSW.1 is a user definable bit and PSW.Five can be used as trendy motive bit.

Rest all flags indicate some or the opposite situation of an mathematics operation.

Q25.Which little bit of the flag check in is about whilst output overflows to the signal bit?


The 2d little bit of the flag sign up is ready whilst output flows to the signal bit.

This flag is also called because the overflow flag.

Here the output of the signed number operation is simply too big to be accomodated in 7 bits.

For signed numbers the MSB is used to signify the whether or not the variety is superb or negative.

It is most effective used to stumble on errors in signed number operations.Which register financial institution is used if we use the following instructions.

SETB PSW.3       A

SETB PSW.4       B

Statement A sets third little bit of flag sign in.

Statement B sets 4th bit of flag check in.

Therefore register financial institution three is initiated .

It uses reminiscence area 18H to 1FH.

The sign in financial institution is also called as R3.

Q26. Issues associated with stack and financial institution 1.


Bank 1 uses the equal RAM space because the stack.

Stack pointer is incremented or decremented in step with the rush or pop instruction.

If the stack pointer is decremented it uses places 7,6,five… which belongs to sign in financial institution zero.

If a given program makes use of R1 then stack is furnished new reminiscence region.

The push coaching may additionally take stack to region 0 i.E.It's going to run out of area.

Q27. Explain JNC.


It is a command used to leap if no convey takes place after an arithematic operation.

It is known as as jump if no carry( conditional soar practise).

Here the bring flag bit in PSW sign in is used to make decision.

The processor seems on the convey flag to look if it's miles raised or no longer.

If convey flag is 0 ,CPU fetches instructions from the cope with of the label.

Q28. Can port 0 be used as enter output port?


Yes, port 0 can be used as input output port.

Port zero is an open drain unlike ports 2,3,4.

To use it as enter or output the 10k ohm pull-up resisters are linked to it externally.

To make port 0 as enter port it have to be programmed by using writing 1 to all bits.




Which 2 ports combine to shape the sixteen bit deal with for outside memory access?

Port0 and port2 together form the sixteen bit cope with for external memory.

 Port0 makes use of pins 32 to 39 of 8051 to present the lower cope with bits(AD0-AD7)

 Port2 uses pins 21 to twenty-eight of 8051 to present the better cope with bits(A8-A15)

This sixteen bit cope with is used to get admission to external reminiscence if connected.

When linked to external memory they cannot be used as input output ports.

Q29.Can unmarried little bit of a port be accessed in 8051?


Yes, 8051 has the functionality of accessing most effective unmarried bit of a port.

Here only unmarried bit is accessed and relaxation are unaltered.

Syntax: “SETB X. Y”.

Here X is the port number and y is the preferred bit.

Example: SETB P1.2

Here the second little bit of port 1 is set to one.

Other than SETB ,CLR are there any unmarried bit commands?

There are total 6 single-bit instructions.

CPL bit : supplement the bit (bit= NOT bit).

JB bit,goal: Jump to goal if bit identical to at least one.

JNB bit,goal: Jump to goal if bit is same to 0.

JCB bit,goal: Jump to goal if bit is identical to one and then clear bit.