Engineering, Management, Agriculture and Veterinary MCQs are now live. FPSC, PPSC, EPE, IELTS & GRE coming soon.

Digital Electronics & Microprocessors: Microcontrollers and PLCs

Electrical Engineering · Digital Electronics & Microprocessors

30 questions, each with the answer and a worked solution.

Practice interactively and track your score →
Question 1

What is a microcontroller?

  1. A memory chip only
  2. A power transistor
  3. A CPU only
  4. A single chip containing a CPU, memory, timers and I/O peripherals
Show answer & solution

Answer: (D) A single chip containing a CPU, memory, timers and I/O peripherals

Microcontrollers are used in embedded systems.

Question 2

What are the main features of the 8051 microcontroller?

  1. 32-bit CPU with no I/O
  2. 8-bit CPU, 4 KB on-chip ROM, 128 bytes RAM, four I/O ports and two timers
  3. 16-bit CPU with 1 MB RAM
  4. No timers
Show answer & solution

Answer: (B) 8-bit CPU, 4 KB on-chip ROM, 128 bytes RAM, four I/O ports and two timers

The 8051 is a classic microcontroller family.

Question 3

Which microcontroller is used on the Arduino Uno board?

  1. Intel 8085
  2. ATmega328P
  3. ARM Cortex-A72
  4. Intel 8086
Show answer & solution

Answer: (B) ATmega328P

It is an 8-bit AVR microcontroller.

Question 4

What is GPIO in a microcontroller?

  1. General-purpose input/output pins that can be programmed as inputs or outputs
  2. A timer
  3. A memory type
  4. A power supply pin
Show answer & solution

Answer: (A) General-purpose input/output pins that can be programmed as inputs or outputs

GPIO pins connect switches, LEDs and sensors.

Question 5

Which serial communication protocol uses only two wires, SDA and SCL?

  1. Ethernet
  2. SPI
  3. UART only
  4. I²C
Show answer & solution

Answer: (D) I²C

I²C supports multiple devices on a shared bus.

Question 6

Which serial protocol uses separate MOSI, MISO, SCK and chip select lines for fast communication?

  1. CAN
  2. I²C
  3. SPI
  4. RS-485 only
Show answer & solution

Answer: (C) SPI

SPI is used for memory and display interfaces.

Question 7

What is a UART used for?

  1. Parallel memory access
  2. Asynchronous serial communication using transmit and receive lines
  3. Analog-to-digital conversion
  4. Power control
Show answer & solution

Answer: (B) Asynchronous serial communication using transmit and receive lines

UARTs implement RS-232-style serial links.

Question 8

What is the purpose of a watchdog timer in a microcontroller?

  1. To measure time of day
  2. To generate PWM
  3. To store data
  4. To reset the system if the program hangs and fails to refresh the timer
Show answer & solution

Answer: (D) To reset the system if the program hangs and fails to refresh the timer

It improves reliability of embedded systems.

Question 9

What is the purpose of a PWM output on a microcontroller?

  1. To control average power to loads such as motors and LEDs
  2. To store data
  3. To measure voltage
  4. To communicate serially
Show answer & solution

Answer: (A) To control average power to loads such as motors and LEDs

Duty cycle sets the average output.

Question 10

What is the scan cycle of a PLC?

  1. Charging the battery
  2. Programming the PLC once
  3. Reading inputs, executing the program and updating outputs repeatedly
  4. Testing insulation
Show answer & solution

Answer: (C) Reading inputs, executing the program and updating outputs repeatedly

Scan times are usually a few milliseconds.

Question 11

Which programming language for PLCs resembles relay wiring diagrams?

  1. Python
  2. Assembly language only
  3. Ladder diagram
  4. Structured text only
Show answer & solution

Answer: (C) Ladder diagram

Ladder logic is defined in IEC 61131-3.

Question 12

Which standard defines PLC programming languages such as ladder diagram and structured text?

  1. IEC 61131-3
  2. ISO 9001
  3. IEC 60034
  4. IEC 61850
Show answer & solution

Answer: (A) IEC 61131-3

It includes five languages.

Question 13

What is a TON instruction in a PLC?

  1. A math instruction
  2. An on-delay timer that turns its output on after a set time
  3. A counter
  4. A comparison instruction
Show answer & solution

Answer: (B) An on-delay timer that turns its output on after a set time

TOF is an off-delay timer.

Question 14

What is the purpose of an HMI in industrial control?

  1. To measure resistance
  2. To replace sensors
  3. To store power
  4. To allow operators to monitor and control the process through a display
Show answer & solution

Answer: (D) To allow operators to monitor and control the process through a display

HMI stands for human–machine interface.

Question 15

Which industrial communication protocol is widely used between PLCs, meters and SCADA systems?

  1. Modbus
  2. Bluetooth only
  3. HDMI
  4. HTTP only
Show answer & solution

Answer: (A) Modbus

Modbus RTU runs over RS-485 and Modbus TCP over Ethernet.

Question 16

What is an embedded system?

  1. A power plant
  2. A transmission line
  3. A dedicated computer system built into a device to perform specific functions
  4. A general-purpose desktop computer
Show answer & solution

Answer: (C) A dedicated computer system built into a device to perform specific functions

Washing machines and meters contain embedded systems.

Question 17

What type of output module is used in a PLC to switch AC loads such as contactor coils?

  1. Thermocouple module
  2. Analog input module
  3. Communication module
  4. Relay or triac output module
Show answer & solution

Answer: (D) Relay or triac output module

Transistor outputs switch DC loads.

Question 18

Which 32-bit processor architecture dominates modern microcontrollers and mobile devices?

  1. Intel 8085
  2. ARM
  3. Zilog Z80
  4. Motorola 6800
Show answer & solution

Answer: (B) ARM

ARM Cortex-M cores are widely used in embedded systems.

Question 19

What is the function of an on-chip ADC in a microcontroller?

  1. To convert analog sensor voltages into digital values
  2. To generate clock signals
  3. To store programs
  4. To convert digital values to analog
Show answer & solution

Answer: (A) To convert analog sensor voltages into digital values

Typical microcontroller ADCs have 10–12 bits.

Question 20

Which network is commonly used in vehicles for communication between electronic control units?

  1. USB
  2. CAN bus
  3. VGA
  4. HDMI
Show answer & solution

Answer: (B) CAN bus

CAN is robust in noisy environments.

Question 21

What is the main advantage of a PLC over hard-wired relay control?

  1. It needs more wiring
  2. It cannot handle timers
  3. Logic can be changed by reprogramming without rewiring
  4. It is less reliable
Show answer & solution

Answer: (C) Logic can be changed by reprogramming without rewiring

PLCs also offer diagnostics and communication.

Question 22

What is the purpose of the timer/counter peripheral in a microcontroller?

  1. To convert AC to DC
  2. To store data permanently
  3. To supply power
  4. To measure time intervals, generate delays and count external events
Show answer & solution

Answer: (D) To measure time intervals, generate delays and count external events

Timers also generate PWM signals.

Question 23

Which device is commonly used by DISCO grid stations to send data to control centres?

  1. Analog voltmeter
  2. Fuse
  3. Megger
  4. Remote terminal unit (RTU) or substation automation controller
Show answer & solution

Answer: (D) Remote terminal unit (RTU) or substation automation controller

They link to SCADA systems.

Question 24

What is the function of an interrupt in a microcontroller program?

  1. To respond quickly to events such as timer overflow or external signals
  2. To slow the program
  3. To erase memory
  4. To reduce clock speed
Show answer & solution

Answer: (A) To respond quickly to events such as timer overflow or external signals

Interrupt service routines handle the event.

Question 25

What is an RTOS used for in embedded systems?

  1. Charging batteries
  2. Playing games
  3. Managing tasks with predictable timing in real-time applications
  4. Word processing
Show answer & solution

Answer: (C) Managing tasks with predictable timing in real-time applications

Real-time operating systems schedule tasks deterministically.

Question 26

What is the function of a PLC input module?

  1. To supply power to loads
  2. To drive motors directly
  3. To store the program
  4. To connect field signals such as switches and sensors to the PLC processor
Show answer & solution

Answer: (D) To connect field signals such as switches and sensors to the PLC processor

Inputs are often 24 V DC.

Question 27

What is a PLC counter instruction used for?

  1. Measuring voltage
  2. Generating PWM
  3. Delaying outputs
  4. Counting events such as products on a conveyor
Show answer & solution

Answer: (D) Counting events such as products on a conveyor

Up and down counters are common.

Question 28

What is the purpose of retentive memory in a PLC?

  1. To store analog signals only
  2. To keep values such as counts and timer values during power loss
  3. To erase memory on startup
  4. To communicate
Show answer & solution

Answer: (B) To keep values such as counts and timer values during power loss

Battery-backed or non-volatile memory is used.

Question 29

What does SCADA stand for?

  1. Supervisory Control and Data Acquisition
  2. Supply Control and Distribution Automation
  3. Signal Conversion and Data Access
  4. System Control and Digital Analysis
Show answer & solution

Answer: (A) Supervisory Control and Data Acquisition

SCADA monitors grids, pipelines and water systems.

Question 30

Which RS standard is used for robust multi-drop serial communication in industrial networks?

  1. RS-232 only
  2. HDMI
  3. RS-485
  4. USB
Show answer & solution

Answer: (C) RS-485

RS-485 supports long cables and many devices.

Practice these 30 questions interactively →