Interview

20 PIC Microcontroller Interview Questions and Answers

Prepare for the types of questions you are likely to be asked when interviewing for a position where PIC Microcontroller will be used.

PIC microcontrollers are a type of microcontroller that is used in a variety of electronics and embedded systems. They are known for their low power consumption and wide range of capabilities. If you are interviewing for a position that involves working with PIC microcontrollers, it is important to be prepared to answer questions about your experience and knowledge. In this article, we will review some common PIC microcontroller interview questions and provide tips on how to answer them.

PIC Microcontroller Interview Questions and Answers

Here are 20 commonly asked PIC Microcontroller interview questions and answers to prepare you for your interview:

1. What is a PIC Microcontroller?

A PIC microcontroller is a microcontroller that is based on the PIC (Peripheral Interface Controller) architecture. PIC microcontrollers are popular for use in embedded systems and are produced by a number of different manufacturers.

2. Can you explain the difference between a microprocessor and a micro-controller?

A microprocessor is a central processing unit (CPU) that has been miniaturized to fit on a single integrated circuit (IC). A micro-controller is a microprocessor that has been further miniaturized and includes additional functionality on a single IC, such as memory, input/output (I/O) ports, and a timer.

3. How many types of interrupts are supported by PIC 16F877A?

PIC 16F877A supports two types of interrupts: external interrupts and internal interrupts. External interrupts are generated by external devices, while internal interrupts are generated by the microcontroller itself.

4. What is the maximum memory available on PIC16F877A?

The maximum memory available on PIC16F877A is 4KB. This is the same for all PIC microcontrollers in the 16F series.

5. Can you explain some common features of PIC microcontrollers?

PIC microcontrollers are a type of microcontroller that is commonly used in a variety of embedded systems. Some common features of PIC microcontrollers include:

-They are typically very small and compact, which makes them ideal for use in embedded systems where space is limited.
-They have a wide range of capabilities, from very simple to very complex, which makes them versatile and adaptable to a variety of applications.
-They are relatively easy to program, which makes them a popular choice for hobbyists and those just starting out with microcontrollers.

6. Which pin(s) can be used to reset the controller?

The reset pin(s) can be found on all PIC microcontrollers. The specific pin(s) will vary depending on the model of controller.

7. What are the different modes of operation for the CCP module in PIC 16F877A?

The four modes of operation for the CCP module are:

1. Compare mode
2. Capture mode
3. PWM mode
4. Single-Shot mode

8. Does PIC support analog inputs? If yes, then what’s its range?

Yes, PIC does support analog inputs. The range will depend on the specific PIC microcontroller that you are using, but most PICs will have a range of 0-5V or 0-3.3V.

9. Is it possible to create an infinite loop with PIC MCU? If yes, then how?

Yes, it is possible to create an infinite loop with PIC MCU. To do so, you would need to create a loop that does not have a terminating condition. This can be done by creating a loop that always evaluates to true, or by creating a loop that never reaches the terminating condition.

10. What does “ADCON1” stand for in context with PIC microcontrollers?

ADCON1 is the Analog-to-Digital Control Register 1. This register controls the analog-to-digital (A/D) converter module on the PIC microcontroller.

11. Do all pins have internal pull up resistors? If no, then which ones do and why?

No, not all pins have internal pull up resistors. The pins that do have internal pull up resistors are typically used for input, since they can help to ensure a known state for the pin when no other external circuitry is connected.

12. What happens when an external voltage higher than 5V is applied to RA0/AN0?

When an external voltage higher than 5V is applied to RA0/AN0, the microcontroller will enter into an overvoltage condition. This can damage the microcontroller, so it is important to be careful when applying external voltages.

13. What is meant by a flash program memory in PIC?

A flash program memory is a type of non-volatile memory that can be erased and reprogrammed in order to store new code. This is in contrast to a ROM, which is a type of non-volatile memory that can only be read from, not written to.

14. How is data stored inside PIC devices?

PIC devices store data in a number of ways, depending on the specific device. Some PIC devices use Flash memory, while others use EEPROM or SRAM.

15. What is the best way to power a 12V motor using a PIC device?

There are a few ways to power a 12V motor using a PIC device, but the best way depends on the specific application. One option is to use a PIC device with an on-board voltage regulator to power the motor directly. Another option is to use a PIC device with an external power MOSFET to control the power to the motor.

16. What is a watchdog timer?

A watchdog timer is a hardware timer that is used to detect and recover from software faults. If the software fails to service the watchdog timer, then the timer will reset the microcontroller, which will hopefully cause the software to recover.

17. Why do we need to use a floating point library (like fplib) in our code?

There are a few reasons why we might need to use a floating point library when working with PIC microcontrollers. First, the PIC microcontroller itself might not have hardware support for floating point operations, so we need to use a library to provide that functionality. Second, even if the PIC microcontroller does have hardware support for floating point operations, it might not be as accurate or as fast as we need it to be, so using a library can help improve the performance of our code.

18. What is the minimum number of clock cycles required to execute an instruction in PIC 18?

The minimum number of clock cycles required to execute an instruction in PIC 18 is four.

19. Is it possible to write assembly language code on PIC18? If yes, then how?

Yes, it is possible to write assembly language code on PIC18. In order to do so, you will need to use a PIC18-specific assembler. There are a few different assemblers available, but we recommend using MPASM from Microchip.

20. What is the advantage of using serial communication over SPI with PIC?

Serial communication is much simpler to implement than SPI, and only requires two wires instead of four. This makes it much easier to use with PIC microcontrollers.

Previous

20 Layer 2 VPN Interview Questions and Answers

Back to Interview
Next

20 ER Diagram Interview Questions and Answers