0% found this document useful (0 votes)
31 views2 pages

Microcontroller Viva Questions

Microcontroller lab viva question

Uploaded by

md.robiul70karim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Microcontroller Viva Questions

Microcontroller lab viva question

Uploaded by

md.robiul70karim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Microcontroller Viva Questions and

Answers
What is a microcontroller?
A microcontroller is a compact integrated circuit designed to perform specific control tasks.
It contains a processor (CPU), memory (RAM and ROM), and input/output ports on a single
chip, making it ideal for embedded applications.

What does DDRD mean?


DDRD stands for Data Direction Register D in AVR microcontrollers. It is used to configure
the direction of each pin on PORTD — setting a bit to 1 makes the pin an output, and 0
makes it an input.

Why do we use PORTD?


PORTD is one of the digital I/O ports of the microcontroller. It allows us to send data to or
read data from external devices connected to the D0–D7 pins.

Why do we need to use DDRD with PORTD?


DDRD sets the data direction (input or output) for each pin of PORTD. Without properly
configuring DDRD, we cannot control the behavior of PORTD pins.

What does DDRD = 0x00 mean?


This means all pins of PORTD are configured as inputs.

What does DDRD = 0xFF mean?


This means all pins of PORTD are configured as outputs.

What does F_CPU mean in code?


F_CPU defines the clock frequency of the microcontroller. For example, #define F_CPU
16000000UL means the microcontroller is running at 16 MHz.

What is the relation between F_CPU and _delay_ms()? How does it work?
The _delay_ms() function uses the F_CPU value to calculate time delays. The correct value of
F_CPU ensures accurate timing. If F_CPU is incorrect, the delay will not match the desired
time.

How does the CPU understand that 1000 means 1 second?


The CPU measures time based on clock cycles. For example, if the clock frequency is 1 MHz,
then 1000 clock cycles equal 1 millisecond. So, 1,000,000 cycles equal 1 second.
When do we use a microprocessor vs. a microcontroller?
A microprocessor is used for complex computing tasks such as in PCs or servers. A
microcontroller is used for simple control-based applications like home appliances,
automation systems, and embedded devices.

Applications of microcontrollers:
Microcontrollers are widely used in washing machines, microwave ovens, digital
thermometers, robotics, automotive systems, and IoT devices.

How does a 7-segment LED display work?


A 7-segment display has 7 LEDs arranged in a specific pattern to form digits. By turning
specific segments on or off, we can display numbers from 0 to 9.

What is an Integrated Circuit (IC)?


An IC is a small electronic device made of a semiconductor material that contains many
miniaturized components like transistors, resistors, and capacitors.

Which components are inside an IC?


An IC typically contains transistors, resistors, capacitors, and sometimes diodes, all
embedded in a small silicon chip.

How is IC fabrication done?


ICs are fabricated using photolithography on silicon wafers. This involves layering, doping,
and etching to form circuits and components on a microscopic scale.

What is the difference between CISC and RISC?


CISC (Complex Instruction Set Computer): Has many complex instructions; each may take
multiple cycles.
RISC (Reduced Instruction Set Computer): Uses fewer, simpler instructions that execute
faster, often in a single clock cycle.

Phn: s21

Processor:snapdragon 888g , 16bit ARM base

You might also like