1. Tell me 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

2. Do you know what is lst file?

☛ This file is also called as list file.
☛ It lists the opcodes ,addresses and errors detected by the assembler.
☛ List file is produced only when indicated by the user.
☛ It can be accessed by an editor and displayedon monitor screen or printed.
☛ Progammer uses this file to find the syntax errors and later fix them.

3. Explain me what are the commonly found errors in Embedded Systems?

☛ Damage of memory devices due to transient current and static discharges.
☛ Malfunctioning of address lines due to a short in the circuit.
☛ Malfunctioning of Data lines.
☛ Some memory locations being inaccessible in storage due to garbage or errors.
☛ Improper insertion of Memory devices into the memory slots.
☛ Faulty control signals.

4. 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.

5. Explain which 2 ports combine to form the 16 bit address for external memory access?

☛ Port0 and port2 together form the 16 bit address for external memory.
☛ Port0 uses pins 32 to 39 of 8051 to give the lower address bits(AD0-AD7)
☛ Port2 uses pins 21 to 28 of 8051 to give the higher address bits(A8-A15)
☛ This 16 bit address is used to access external memory if attached.
☛ When connected to external memory they cannot be used as input output ports.

6. Tell me are all the bits of flag register used in 8051?

☛ The flag register also called as the program status word uses only 6 bits.
☛ The two unused bits are user defineable flags.
☛ Carry, auxillary carry, parity and overflow flags are the conditional flags used in it.
☛ PSW.1 is a user definable bit and PSW.5 can be used as general purpose bit.
☛ Rest all flags indicate some or the other condition of an arithmetic operation.

7. Explain me which 8051 version uses Flash ROM?

☛ Atmel Corporation is manufacturing flash ROM
☛ At 89C51 chip of atmel is using flash ROM.
☛ Here no Rom eraser is needed.
☛ Erasing process is done by the PROM burner itself.
☛ To avoid use of PROM burner the 8052 version support in-system programming.

8. Tell me why is Model transformations used in the embedded system?

Model transformations involve multiple models that are used to define different views of a system. It provides different level of granularity that it doesn't use either the top-down approach or the bottom-up approach to implement the basic functionality of the system. It is used to integrate the library components used that involves the iteration of the model that needs to be constructed. It also involves the analysis of the model so that the process can be made automated by using the construction tools. The compilation made the progress by improving the code that is written in high level language and the code generator produce the code that is required for the machine language.

9. 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.

10. Explain me 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.

Download Interview PDF

11. Please explain which 8051 version is using UV-EPROM?

☛ Ultraviolet EPROM is used in the version 8751.
☛ Here it becomes easier to erase the data using uv rays.
☛ It takes around 20 minutes to erase the data.
☛ To overcome this short coming flash ROM versions of 8751 available.

12. Do you know what is EQU?

☛ EQU is the equate assmbler directive used to define a constant without occupying a memory location.
☛ It associates a constant value with data label .
☛ Whenever the label appears in the program ,constant value is subsituted for label.
☛ Advantage: The constant value occuring at various positions in a program can be changed at once using this directive.
☛ Syntax: label EQU constant value

13. Explain me what is the need for an infinite loop in Embedded systems?

☛ Infinite Loops are those program constructs where in there is no break statement so as to get out of the loop, it just keeps looping over the statements within the block defined.
Example:
While(Boolean True) OR for(;;);
{
//Code
}
☛ Embedded systems need infinite loops for repeatedly processing/monitoring the state of the program. One example could be the case of a program state continuously being checked for any exceptional errors that might just occur during run time such as memory outage or divide by zero etc.,
☛ For e.g. Customer care Telephone systems where in a pre-recorded audio file is played in case the dialer is put on hold..
☛ Also circuits being responsible for indicating that a particular component is active/alive during its operation by means of LED's.

14. What is JNC?

☛ It is a command used to jump if no carry occurs after an arithematic operation.
☛ It is called as jump if no carry( conditional jump instruction).
☛ Here the carry flag bit in PSW register is used to make decision.
☛ The processor looks at the carry flag to see if it is raised or not.
☛ If carry flag is 0 ,CPU fetches instructions from the address of the label.

15. Tell us 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 issues related to stack and bank 1?

☛ Bank 1 uses the same RAM space as the stack.
☛ Stack pointer is incremented or decremented according to the push or pop instruction.
☛ If the stack pointer is decremented it uses locations 7,6,5… which belongs to register bank 0.
☛ If a given program uses R1 then stack is provided new memory location.
☛ The push instruction may also take stack to location 0 i.e.it will run out of space.

17. Explain me what is the need for DMAC in ES?

☛ Direct memory access is mainly used to overcome the disadvantages of interrupt and progam controlled I/O.
☛ DMA modules usually take the control over from the processor and perform the memory operations and this is mainly because to counteract the mismatch in the processing speeds of I/O units and the procesor. This is comparatively faster.
☛ It is an important part of any embedded systems,and the reason for their use is that they can be used for bursty data transfers instead of single byte approaches.
☛ It has to wait for the systems resources such as the system bus in case it is already in control of it.

18. Explain me how does Input/Output bus functions?

Input and output devices or functions allow the user to interact with the external files. Input and output functions are used to transfer the load on the bus. It uses the multiplexes having the input and output signals that remain same. Input and output buses move at the slower rate or speed than the processor speed. This increases the problem of bottleneck or the deadlock due to poor performance. There is a possibility to send more transistors for a layout to be given. These different devices may have very different speeds of communication. When programming IO bus control, make sure to take this into account.
In some systems, memory mapped IO is used. In this scheme, the hardware reads its IO from predefined memory addresses instead of over a special bus. This means you'll have simpler software, but it also means main memory will get more access requests.

19. 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

20. Explain me 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
☛ Software
☛ It ensures the availability of System Memory
☛ It checks the Processor Speed availability
☛ The need to limit power lost when running the system continuously
☛ Real Time Operating System
☛ It runs a process as per scheduling and do the switching from one process to another

21. Tell me how are labels named in assembly language?

☛ Label name should be unique and must contain alphabetic letters in both uppercase and lowercase.
☛ 1st letter should always be an alphabetic letter.
☛ It can also use digits and special characters ?,.,@,_,$.
☛ Label should not be one of the reserved words in assembly language.
☛ These labels make the program much easier to read and maintain.

22. Explain me what is interrupt latency and how can we decrease it?

1. Interrupt latency basically refers to the time span an interrupt is generated and it being serviced by an appropriate routine defined, usually the interrupt handler.
2. External signals, some condition in the program or by the occurrence of some event, these could be the reasons for generation of an interrupt.
3. Interrupts can also be masked so as to ignore them even if an event occurs for which a routine has to be executed.
4. Following steps could be followed to reduce the latency
☛ ISRs being simple and short.
☛ Interrupts being serviced immediately
☛ Avoiding those instructions that increase the latency period.
☛ Also by prioritizing interrupts over threads.
☛ Avoiding use of inappropriate APIs.

23. Explain me which port in 8051 performs a dual role?

☛ The port 3 can be used as simple input /output port or provides signals like interrupts.
☛ P3.0 and p3.1 are used for serial communication.
☛ P3.2 and P3.3 are used as external interrupts.
☛ P3.4 and P3.5 are used for timers.
☛ P3.6 and P3.7 are used as read write signals of external memory.

24. Please explain what is the difference between Hardware design and Software Design?

☛ Hardware design is designed with the collaboration of interconnected parallel components that inherits the properties of each other. Whereas, Software design is designed with sequential components, that are based on objects and threads.

☛ Hardware design structure doesn't change dynamically and it can't be created, modified or removed easily. Whereas, Software design structure can be changed dynamically and re-usability features, used to define the components. It also includes easy creation, modification and removal of the components from the software.

☛ Hardware design focuses on individual components that are represented using analytical model that uses the transfer functions. Whereas, Software design represent the components using computation model that can have abstract execution engine or it can use the virtual machine that are non-deterministic.

Download Interview PDF

25. Do you know how does the interrupts handle by using the threads?

The interrupts that comes in between the input/output operations gets detected when the input/output devices are ready. The interrupt never gets handled directly rather, it sends the interrupt signal to the thread to the input/output device that is ready to allow the thread to take necessary actions. The thread uses the signaling concept that allows the initialization to be done using the semaphore that keeps the states updated and handle the interrupt in an easy way. The input/output device getting the request and it also passes the semaphore to handle. The input/output device takes the semaphore that is ready. The thread is having the minimum latency that uses the first level interrupt handler to handle the interrupts completely. It allows the priority of the thread to be set and it doesn't allow the context to be change as well.

26. Explain me what is the function of Watchdog timer in embedded system?

The embedded system should have a function that can allow the fixing the system if anything goes wrong with it. Watchdog timer is a tool that is used in embedded system and having a long-fuse that runs several seconds. Watchdog timer includes the automated timing control that count down the number from max to 0 and when the counter reaches the zero, this WDT reset the micro-controller that gets turned off when the timer was in initial phases. Watchdog require the user to put some value before it runs out of time and reset the whole process as this can harm the data and the system. Resetting by WDT can be done when the process is half complete. Watchdog timer have the counter that is used to watch the processes that are running and if there is any issue occurs then WDT itself times out. The resetting of the system will be done to always give it the best possible way to execute the process.

27. Explain 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.

28. 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.

29. Explain me what is microcontroller?

The microcontroller is a self-contained system with peripherals, memory and a processor that can be used as embedded system.

30. Tell me can port 0 be used as input output port?

☛ Yes, port 0 can be used as input output port.
☛ Port 0 is an open drain unlike ports 2,3,4.
☛ To use it as input or output the 10k ohm pull-up resisters are connected to it externally.
☛ To make port 0 as input port it must be programmed by writing 1 to all bits.
Example:
MOV A,#0FFH
MOV P0,A

31. Please explain DB?

☛ DB is called as define byte used as a directive in the assembler.
☛ It is used to define the 8 bit data in binary ,hexadecimal or decimal formats.
☛ It is the only directive that can be used to define ASCII strings larger than two characters.
☛ DB is also used to allocate memory in byte sized chunks.
☛ The assembler always converts the numbers lnto hexadecimal.

32. Do you know what are the different types of system involved in embedded system?

Embedded systems are used to give the response in real time. So, it consists of the real time systems that allow the correct information to be passed to get the correct responses. For example, it includes of the flight control system that produce the responses in real time and it always the take the values also in real time. If any delay been caused by the system then it deals in the fatal error. The real time system includes the system that provides the response on time with the small delay. Real time systems include of many other system such as:

Hard Real-Time Systems - These are the systems that server the purpose of having constraints that are hard and it totally depends on the time to provide the response on time.

Soft Real-Time Systems - These systems serves the purpose of having few delays in giving up the responses that can tolerate small variations.

Hybrid Real-Time Systems - These systems includes the properties from both the systems and increases the performance.

33. Differentiate between mutexes vs semaphores?

☛ Semaphores is a synchronization tool to overcome the critical section problem.

☛ A semaphore S is basically an integer variable that apart from initialization is accesses only through atomic operations such as wait() and signal().

☛ Semaphore object basically acts as a counter to monitor the number of threads accessing a resource.

☛ Mutex is also a tool that is used to provide deadlock free mutual exclusion. It protects access to every critical data item. If the data is locked and is in use, it either waits for the thread to finish or awakened to release the lock from its inactive state.

34. Tell me how much time is required by an instruction for execution in 8051?

☛ Time required depends on the number of clock cycles used to execute instruction.
☛ These clock cycle are called machine cycle.
☛ Length of machine cycle of an instruction depends on frequency of crystal oscillator of controller.
☛ Also one machine cycle lasts 12 oscillator period so machine cycle is 1 12 of crystal frequency.
☛ Crystal frequency 8051 = 11.0592MHz
☛ Machine cycle = 11.0592MHz12 = 921.6KHz = 1.085micro second.

35. Do you know of the 128-byte internal RAM how many bytes are bit addressable?

☛ Only 16 bytes of the 128 bytes of RAM are bit addressable.
☛ The bit addressable RAM locations are 20H to 2FH.
☛ They are addressed as 0 to 127 (decimal) or 00 to 7F.
☛ Also the internal RAM locations 20 to 2FH are both byte and bit addressable.
☛ These 16 bytes can be by single bit instructions using only direct addressing mode.