Frequently asked interviewer's questions

Frequently asked interviewer's questions
1. How many types of interrupts are supported by PIC18F4580?

In PIC18F4580 classified into 2 Types:

  • Internal Interrupt
  • External Interrupt

Internal interrupts are generated by the internal peripherals like e.g Timer, ADC, UART, SPI,I2C, etc. while External Interrupts are generated by the external devices/Peripherals like Switches, Digital Sensor.

2. What are the Features of PIC18F4580?
  • 40 Pins low Power uc.
  • Flash Program memory: 32K bytes.
  • EEPROM Data Memory: 256 bytes.
  • SRAM Data Memory: 1536 bytes.
  • Input & Output pins : 33.
  • Timers: One 8 bit / Three 16 bit.
  • A/D Converter : 10 bit Eleven Channels.
  • PWM: 10-bit two modules.
  • MSSP: SPI & I2C Master & Slave support.
  • Enhanced USART: Addressable with RS-485,RS232 & LIN Support.
  • External Oscillator.: up to 40MHz.
  • Internal Oscillator: 4MHz.
3. PIC supports the analog inputs? If yes, then what's its range and Step Size?

Yes. It has a 10 bit resolution, and its range is 0 to 1023.

Step Size: It is the voltage difference between one digital level and the next level that can be measured by ADC. If ADC has higher resolution, it gives smaller step size.If ADC has 8 bit resolution, input voltage is 0-5V and the step size is (5V/1023)=19.53mV.

4. Can we directly interface the DC Motor to PIC Microcontroller/ or Any Mircocontroller?

No, We can't interface the DC motor to our microcontroller because the DC motor requires the 12V to operate and it also produces the back EMF, which may damage our controller. Hence it is not good to interface the DC motor directly to the controller. So use a motor driver circuit in between the DC motor and controller.We are using an L293D motor driver IC to run the DC motors, using this IC we drive the 2 DC Motor at a time.

5. Explain the PWM in PIC Microcontrollers.

PWM (Pulse Width Modulation) in PIC Microcontrollers is a technique or method of generating the analog signals by changing the duty cycle of a square wave and even we can vary the duty cycle to achieve the different level of output. It's commonly used for adjusting LED brightness, controlling the speed of motors, and other applications where analog outputs are required.

6. Explain the Harvard and von Neumann architectures and how they relate to PIC Microcontrollers.

Harvard architecture, followed by most PIC Microcontrollers, separates program memory (Flash) and data memory (RAM). In Vice-versa, von Neumann architecture combines both in one memory. This separation in PIC Microcontrollers allows for faster and more efficient execution of instructions and data access.

7. Which tools are commonly used for PIC Microcontroller programming?

PIC Microcontrollers are typically programmed using Integrated Development Environments (IDEs) like MPLAB IDE, MPLAB X. Hardware programmers such as PICkit, Tinybootloader and ICD are used to transfer the compiled code to the microcontroller. The process involves writing code, compiling it into a hex file, and then flashing it onto the PIC Microcontroller.

8. What is the purpose of the Brownout Reset (BOR) in a PIC Microcontroller?

The Brownout Reset (BOR) in a PIC Microcontroller is a continuous check to the Microcontroller, if voltage supply is dropped below the threshold level voltage then it will restart the microcontroller.

9. What is the role of Analog-to-Digital Converters (ADC) in PIC Microcontrollers, and how are they configured?

In a PIC Microcontroller the ADC Module will convert the Analog signal from sensors into the digital values (like 0,1) that are done by the microcontroller. To configure the ADC we have to set the reference voltage, select the input channels, and specifying the resolution.

10. How to configure the Timers in PIC, and What is the significance?

The Timer in a PIC Microcontroller is vital for generating precise time delays and controlling events. It can be configured by setting its control registers to define the time period and mode of operation. For example, you can use the Timer to create accurate time intervals for tasks like generating PWM signals or measuring time-based events.