EEE Question Bank
EEE Question Bank
2. In brief explain types of microcontroller? Which factors must be considered (criteria) for
Data Types
Variables
Operators
Loops
Control statements
10. Explain the General purpose Input Outputs (GPIO) used in ATmega 328P based Arduino board.
11. Explain the following functions used to handle GPIO in AImega 328P based Arduino board with
pinMode()
digital Write)
digitalRead(0
.X...
2. It is desired to blink two LEDs simultaneously Both LEDs should be ON for period of 100
msec and OFF for period of 50 msec. The LEDs are connected to digital pins 3 and 5 of port B
of ATmega 328P based Arduino board. Draw the interfacing diagram and write the algorithmic
steps to execute program.
Solutio
Interacing of Atmega 328P with (wo lLEDs
PB3D11 ED
ATmega328
PB6 PBS 013
PB7
Algorithm
To interface LED's to Digital pin of PORTB PB3 and PBS of ATmega328.
(Hint-It is very important to insert the delay at appropriate step using correct syntax9
1. Start
2. Set the direction of PB3 and PB5 (0r Digital Pin no. 11 and Digital pin no. 13) ofATmega328
as an output pins using function
pinMode (11,0UTPUT)
pinMode(13,0UTPUT)
3. Send High value (Logic 1) to Digital pin no. 11 and Digital pin no. 13 using function
digital Write(11,HIGH)
digitalWrite(13,HIGH)
so that both LED's will be turned ON
led.begin(numCols. numRows):
led.setCursor(colNumber.rowNumber);
led.print(Data to be displayed):
lcd.clear):
led.blink(): & led.noBlink):
Ied.display(): & led.noDisplay ():
led.serollDisplayLeft():
lcd.scroll DisplayRight();
5. Draw interfacing circuit diagram of Arduino board and LCD. Also write basic algorithm used
for this interfacing.
X
6. Draw a neat sketch showing the interfacing of Atmega 328P based Arduino board with 16 2
Liquid crystal display (LCD) and write algorithmic steps to continuously blink the following
two row message with a delay of 1 second.
Message to display in 1" row All the BEST
Message to display in 2nd row for IN-SEMM
Solution
Interfacing of Atmega 328P with 16 x 2 LCD
LCD1
vCC
u8883a85
FFEEFFEL
PPO
ATmega328 PBI
PE2
RYSTAL PES
CRYS TAL 3
CRYSTAL
Algorithm
Start
2. Include IiquidCrystal.h Library file
3. Set the
interlacing pins of LCD with Arduino board
4. Initialize the 16*2 LCD
5. Set cursor to blink at
row=0, column-0 position (First Row. First Position)
6. Display string "All the BEST on LCD"
#include<LiquidCrystal.h
LiquidCrystal lcd(12, 11, 5,4,3, 2); / sets the interfacing pins
void setup()
void loop()
Ied.setCursor(2,0);
lcd.print("BEST COLLEGE"):
Icd.setCursor(4,1);
lcd.print("MESCOE");
Show in 16 x 2 display
given below
*A*.*************
8.
Explain serial communication with reference to Arduino.
Solution
Communication is an
exchange of information between two devices. The information is data
which can be anything like -
text documents,
images
audio or video files
Data be sent or received between two
can
systems or devices and it is in the form of bits i.e. 0's
and l's. The word serial means "one after
the other."
Serial communications is an
easy and flexible way for Arduino board to interact with
and other devices. The main computer
purpose of serial communication is to transfer the sketch (program)
from computer to Arduino, send information to
computer etc.
The most common type of serial communication
protocol is UART (Universal Asynchronous
Receiver Transmitter)
Solution
Arduino has built-in support for UART which enable serial communication. USART (Universal
Serial Asynchronous Receiver Transmitter) is a serial communication protocol used to
transmit/receive data serially at a specific baud rate. The Arduino can transmit and receive data
to the PC over USB Cable. This comes handy when we want to send the sensor data from
controller to PC.
The Arduino IDE has built-in Serial Monitor window, which
displays the data sent from
Arduino to PC. The same way we can send data/command from Serial Monitor to Arduino.
The serial communication enables us to control electronic devices connected to Arduino board
from PC.
11. What are the types of Serial Communication'?
Solution
Synchronous Serial Data Communication -Devices that
and their
timing is in
are
synchronized use the same clock
synchronization with each other.
Asynchronous Serial Data Communication Devices that
transmitter and receiver. (a uses different clock sources for
process operates independently of other
processes.)
12. Write a note on Arduino USART.
Solution
Arduino Uno
(ATmega328) has an in-built USART which is useful for
serial communication. It
can be used to
communicate data between PC or various serial
Bluetooth, etc. devices like GSM, GPS,
Arduino communicate with serial
devices over digital pins 0 (RXD) and 1
It communicates with PC/laptop over USB. (TXD).
It consists of two LED indicators i.e. TX and
RX .These LEDs used
serial transmission and reception w.r.t Arduino to indicate the status of
When -
board.
PC transmits
data to Arduino UNO over USB RX LED
Arduino Uno transmits glows to indicate data is received
data to PC over USB TX LED glows to indicate
transmitted data is
X....
..X
16. What is LM 35? What is the operating temperature range of LM 35? What is typical accuracy
of LM 35 over its operating temperature range? What is the output voltage of LM 35 per
degree celcius temperature?
17. How can LM 35 be interfaced with ATmega 328P based Arduino board? Draw relevant
interfacing diagram and write algorithm to display temperature on LCD. Assume that the
output of LM 35 is connected to analog pin A4 of the Arduino board.
18. Explain the principle of operation of LVDT and draw the interfacing diagram of LVDT with
Arduino board. Write algorithmic steps to display digital output of ADC on serial monitor.
19. What is the principle of operation of strain gauge? Draw a neat diagram showing the
interfacing of strain gauge with Atmega 328P based Arduino board given that output voltage
from strain gauge after signal conditioning is connected to analog pin 0 of Arduino board.
Write algorithmic steps to display strain on serial monitor.