0% found this document useful (0 votes)
46 views52 pages

EP Descriptive Questions With Solutions

Uploaded by

blahhwhocares69
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)
46 views52 pages

EP Descriptive Questions With Solutions

Uploaded by

blahhwhocares69
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
You are on page 1/ 52

Subject: Embedded Programming

Subject Code: CA311

Branch: BCA

Question Bank
(Descriptive Questions)

Prepared By:
Dr. Shailesh Khant
EP Descriptive Question Bank with Solutions

1. What is a system? What is an embedded system? Give examples of an


embedded system.
System:
“It is a method of organizing, working, or performing one or more tasks
according to a fixed plan.”

Embedded system:
Embedded system is combination of h/w and s/w which is used to perform
specific task.

Examples are as follows.


Washing machine
Fire alarm system
Automatic car
Air conditioner system
Mobile
Lift
Weather monitoring system
Industrial safety system

2. Give the differences between Microprocessor and Microcontroller. (IMP)

Microprocessor Microcontroller

1. It does not have inbuilt memory It is having inbuilt memory

2. It uses functional blocks like register, It uses functional blocks of


ALU, timing, and control units. microprocessors like RAM, timer,
parallels I/O, ADC, and DAC.

3. In Microprocessor, bit handling Microcontroller offers many kinds of bit


instruction is less, One or two types handling instruction.
only.

4. Offers rapid movements of code and Offers rapid movements of code and
data between external memory and data in the microcontroller.
microprocessor.

5. Helps you to design general purpose Helps you to design application-specific


digital computers system. dedicated systems.
6. It allows you to do multitasking at a It is a single task oriented system.
time.

7. In Microprocessor system, you can In Microcontroller system, the fixed


decide the number of memory or I/O number for memory or I/O makes a
ports needed. microcontroller ideal to complete the
specific task.

8. Offers support for external memory This type of system is lightweight and
and I/O ports, which makes it heavier cheaper compares to the
and costlier system. microprocessor.

9. External devices need more space, and This type of system consumes less
their power consumption is quite amount of space, and power
higher. consumption is also very low.

10. High cost Low cost

3. Give the differences between Analog signal and Digital Signal.

Analog Signal Digital Signal


1. It is having continuous value It is having discrete or fixed value
2. It is having continuous time It is having discrete or fixed time.
3.

4. Analog sensor can read Digital sensors can read digital


analog value value.
5. Knob is an example of analog LED or switch is an example of
signal generator digital signal
6. Value from Temperature Value from ultrasonic sensor is an
sensor is an example of example of digital signal.
analog signal
4. Explain Embedded system architecture or embedded system block
diagram. (IMP 6 marks)

1. Sensor:
 Sensor is a device which sense the environment signal like temperature,
pressure and convert it into electrical signal.
 Sensor output can be directly saved into memory or it can be given to A-D
convertor block for further processing.
 Sensor output can be given to processor directly if the output is in digital
form.

2. A-D Convertor:
 A-D convertor means Analog to Digital convertor.
 There are number of methods or circuits available which can converts
analog signal to digital.
 A-D convertor output can be directly stored in the memory or it can be
given to processor for further processing.

3. Memory:
 Memory is used to store the information either in analog form or digital
form.
 It can be of two types
o Volatile
o Non-volatile

4. Processor / controller and ASIC (Application Specific Integrated Circuit):


 Processor / controller is used to process the analog / digital data.
 Data can be taken from memory or A-D convertor.
 After processing the data output can be stored in memory or given to D-A
convertor.
 ASIC stands for Application Specific Integrated Circuit.
5. D-A Convertor:
 This block accepts input from either processor or memory.
 It converts digital output into analog signal.
 This analog signal can be given to actuator device.

6. Actuator:
 Actuator accepts input from D-A convertor.
 It gives the output to desired components or machine which is a part of an
embedded system.
 Actuator is a device which allows something to work or operate.

5. Explain General Types of embedded system based on scaling.

 Embedded system is basically divided into three categories.


o Small scale embedded system
o Medium scale embedded system
o Large scale (Sophisticated) embedded system

Small scale embedded system:


 Small scale embedded system is of 8 bits or 16 bits. (It means it requires
microcontroller which can able to process 8 bit data or 16 bit data at the
same time)
 It can be work using battery.
 Low level programming languages are enough to design small scale
embedded system.

Medium scale embedded system:


 Medium scale embedded system is of 16 bits or 32 bits. (It means it
requires microcontroller which can able to process 16 bit data or 32 bit data
at the same time)
 It uses high level programming languages like C, C++, Java etc.
 It may requires external power supply, so that it can work properly.
 Complexity is higher than small scale embedded system.

Sophisticated Embedded system (Large scale embedded system):


 It is accepting or transferring data which is greater than 32 bits.
 It is designed with large amount of hardware and software complexity.
 Many processors and controllers are used so that the system can work
properly.
 You may require knowledge of VLSI, ASIC, PLC etc.

6. List out applications of embedded system in various fields or domain.


(IMP)
Robotics science:
 Drone designing
 Agriculture robot
 Self-guidance robot
 Industrial robot
 Underwater vehicle
Agriculture domain:
 Smart irrigation system
 Plucker system
 Grain elevator
 Rain water harvesting
 Farm security system
 Moisture detection
 Fertilizer spraying system
Medical domain:
 X-ray machine
 MRI system / city scan
 Pill reminder
 Dialysis machine
 Cardiac monitoring
 Sonography machine
 Patient monitoring system
Automobiles:
 Braking system
 Ignition system
 Cruise
 Engine control
 Fingerprint based security
 Air bags
 Door lock system
 Lighting system
 Parking assistant system
 Smart mirroring system
Industrial domain:
 Industrial robots
 Fire safety system
 Authentication system
 Valve monitoring system
 Missile control
 Space station
 RADAR navigation
Home devices:
 Air conditioners
 Washing machine
 Microwave oven
 Door lock system
 Motion based light control
 Fancy light for decoration
 CCTV camera system
 Water level detector and controller
Entertainment:
 Video games
 DVD player
 Digital camera
 Lighting control
 Sound controller

7. List and discuss advantages and disadvantages of embedded system.


Advantages:
 It can cover wide varieties of domains.
 It reduces the cost of the system because it requires hardware’s which
are for specific task only.
 It gives enhanced performance.
 Embedded system is useful for mass production.
 It is highly reliable.
 Few interconnections are there.
 Operation is fast.
 It optimizes the resources.
 It can even work with less amount of power.

Disadvantages:
 Maintenance problem for long term.
 It requires high development effort to develop the system.
 It needs long time to market.
 Upgrading is not easy.
 Limited amount of resources and memory.
 Problem finding / solving is difficult in sophisticated system.
 Technology improvement is not there.

8. Give the differences between General purpose computer and embedded


system.(IMP)

Parameter General purpose computer Embedded system


purpose Multipurpose Specific Purpose, single functioned
system
Performance Faster and better for all Fixed task (application), Runtime
applications
User interface Keyboard. Mouse, display, Buttons, sensors, display, LEDs
touch screen
constraints Low constraints Size, power, memory, storage,
types of operation
Memory High Low
Power High Low
Storage Higher(Gb) Lower(Kbytes)
Operation Complicated simpler

9. Explain operation of Washing Machine as an embedded system with block


diagram. (IMP)
Washing Machine is a typical example of an embedded system providing extensive
support in home automation applications.

Washing machine contains


1 sensors,
2 actuators,
3 control unit
4 application-specific user interfaces like keypads, display units, etc.
You can see all these components in a washing machine if you have a closer look at it.
Some of them are visible and some of them may be invisible to you.

The actuator part of washing machine consists of a motorized agitator, tumble tub,
water drawing pump and inlet valve to control the flow of water into the unit.

(An actuator is a component of a machine that is responsible for moving and controlling
a mechanism or system)

The sensor part consists of the water temperature sensor, level sensor, etc.

The control part contains a microprocessor/controller based board with interfaces


to the sensors and actuators.

The sensor data is fed back to the control unit and the control unit generates the
necessary actuator outputs.

The control unit also provides connectivity to user interfaces like keypad for setting the
washing time, selecting the type of material to be washed like light , medium, heavy
duty, etc.

User feedback is reflected through the display unit and LEDs connected to the control
board.

The integrated control panel consists of a microprocessor/controller based board with


I/O interfaces and a control algorithm running in it.
Input interface includes the keyboard which consists of wash type selector namely Wash,
Spin and Rinse, cloth type selector namely Light, Medium, Heavy duty and washing time
setting, etc.

The output interface consists of LED/LCD displays, status indication LEDs, etc. connected
to the I/O bus of the controller.

It is to be noted that this interface may vary from manufacturer to manufacturer and
model to model.

The other types of I/O interfaces which are invisible to the end user are different kinds of
sensor interfaces, namely, water temperature sensor, water level sensor, etc. and
actuator interface including motor control for agitator and tub movement control, inlet
water flow control, etc.

10. What is an interrupt? What are the types of interrupt? How to handle the
interrupt? (IMP 5 or 6 Marks)
Interrupt:
An interrupt is a signal from an outer device attached to a computer or from inner program
within the computer that requires immediate actions.

There are two main types of interrupts


1. Hardware interrupt:
It is an interrupt generated by external devices or I/O devices which force CPU to stop
current execution and to handle the interrupt.
It is of two types
a. Maskable interrupt: It can be delayed.
b. Non-Maskable interrupt: It cannot be delayed. It must be handled immediately.

2. Software interrupt:
It is an interrupt generated by software programs which force CPU to stop current
execution and handle the interrupt.
It is of two types.
a. Normal interrupt: it can be generated due to internal software program or instructions.
b. Exception: It is purely unplanned interrupt while executing program. Divide by zero error
is an example of this type of interrupt.
How to handle the interrupt in microcontroller?
o Interrupt Handler is a program which is used to handle the interrupt
o It follows the below steps to complete execution of interrupt.
PC=Address2, Stack=Address1

Running Interrupt
Program
PC=Address1
Step-1: Interrupt occurs when current execution is at address1, PC=address1.
Step-2: store the current address=Address1 in stack., STACK = address1
Step-3: Store Address2 in program counter (PC). PC=address2
Step-4: Start execution of interrupt program which is stored at address2.
Step-5: When interrupted routine /program is executed / finished then move
back to running program.
Step-6: Get address1 from stack and store in program counter.PC=address1
Step-7: Continue executing current program.

11. Explain following terms of embedded Proframming.


1. Stack
2. Program Counter
3. Interrupt
4. Serial Transmssion
5. Parallel Transmission
1. Stack:
It is temporary storage area used to store the runtime data. It follows LIFO
(Last In First Out) Mechanism.
2. Program Counter (PC)
It is a register which stores the current address of the program in execution.
3. Interrupt:
An interrupt is a signal from an outer device attached to a computer or from
inner program within the computer that requires immediate actions.
4. Serial Transmission:
It is a transmission method where information or data bits are sent one by
one serially using single wire or bus.
5. Parallel Transmission:
It is transmission where information or data bits are sent parallel using
multiple wires or buses.
12. Give differences between serial communication and parallel
communication. (IMP)

serial communication parallel communication


Data will be sent serially one by one Data will be sent parallely at the
or character by character. same time.
It uses single channel It uses multiple channels.
It is slower communication. It is faster communication.
It is preferred when distance It is preferred when distance
between transmitter and receiver is between transmitter and receiver is
higher. smaller.
Cost is low. Cost is high.

13. List out characteristics of an embedded system and explain any three of
them in details.

Following are some of the characteristics of an embedded system that make it different
from a general purpose computer:
1. Application and Domain specific:
2. Sophisticated functionality:
3. Restricted Memory:
4. Reactive and Real time
5. Operation in harsh environment
6. Distributed
7. Small size and Low weight
8. Power concerns
1. Application and Domain specific:
 An embedded system is designed for a specific purpose only.
 It will not do any other task.
Ex. A washing machine can only wash, it cannot cook
 Certain embedded systems are specific to a domain: ex. A hearing aid is an
application that belongs to the domain of signal processing.

2. Sophisticated functionality:
 ES can have refined functioning or purpose.

3. Restricted Memory:
 It can have limited amount of memory for storage or to run the application real
time. Generally, it is in terms of Kbytes.

4. Reactive and Real time


 Certain Embedded systems are designed to react to the events that occur in the
nearby environment. These events also occur real-time.

 Ex. An air conditioner adjusts its mechanical parts as soon as it gets a signal from
its sensors to increase or decrease the temperature when the user operates it
using a remote control.

 An embedded system uses Sensors to take inputs and has actuators to bring out
the required functionality.

 To measure heartbits of patients we must require real time processing which can
be fast.

5. Operation in harsh environment


 Certain embedded systems are designed to operate in harsh environments like very
high temperature of the deserts or very low temperature of the mountains or
extreme rains.

 These embedded systems have to be capable of sustaining the environmental


conditions it is designed to operate in.

6. Distributed
 Certain embedded systems are part of a larger system and thus form components
of a distributed system. These components are independent of each other but
have to work together for the larger system to function properly.

 Ex. A car has many embedded systems controlled to its dash board. Each one is an
independent embedded system yet the entire car can be said to function properly
only if all the systems work together.
Mobile (camera module, processing module, audio module, wifi, gsm)
7. Small size and Low weight
 An embedded system that is compact in size and has light weight will be desirable
or more popular than one that is bulky and heavy.

 Ex. Currently available cell phones. The cell phones that have the maximum
features are popular but also their size and weight is an important characteristic.

 For convenience users prefer mobile phones than phablets. (phone + tablet pc)

8. Power concerns
 It is desirable that the power utilization and heat dissipation of any embedded
system be low.

 If more heat is dissipated then additional units like heat sinks or cooling fans need
to be added to the circuit.

 If more power is required then a battery of higher power or more batteries need
to be accommodated in the embedded system.

 If you don’t have batteries then you must require variable power supply.

14. List and Explain Operational attributes.

These are attributes related to operation or functioning of an embedded system. The way
an embedded system operates affects its overall quality.

1. Response
2. Throughput
3. Reliability
4. Maintainability
5. Security
6. Safety
1. Response
 Response is a measure of quickness of the system.
 It gives you an idea about how fast your system is tracking the input variables.
 Most of the embedded system demand fast response which should be real-time.

2. Throughput
 Throughput deals with the efficiency of system.
 Efficiency = output/input = 100%
 Output <= input, so efficiency <= 100%
 (if we are sending 100 packets to other system and if 98 packets are received and
others are lost then efficiency = throughput = 98/100=98%)
 It can be defined as rate of production or process of a defined process over a
stated period of time.
3. Reliability
 Reliability is a measure of how much percentage you rely upon the proper
functioning of the system.
 Mean (Average) Time between failures and Mean Time To Repair are terms used in
defining system reliability.
 Mean Time between failures can be defined as the average time the system is
functioning before a failure occurs.
 Mean time to repair can be defined as the average time the system has spent in
repairs.

4. Maintainability
 Maintainability deals with support and maintenance to the end user or a client in
case of technical issues and product failures or on the basis of a routine system
checkup.
 It can be classified into two types,

1. Scheduled or Periodic Maintenance


 This is the maintenance that is required regularly after a periodic time interval.
 Example are Periodic Cleaning of Air Conditioners, Refilling of printer cartridges.

2. Maintenance to unexpected failure


 This involves the maintenance due to a sudden breakdown in the functioning of
the system.
 Examples are Air conditioner not powering on, Printer not taking paper in spite of
a full paper stack

5. Security
 Confidentiality, Integrity and Availability are three corner stones of information
security.
 Confidentiality deals with protection data from unauthorized disclosure.
 Integrity gives protection from unauthorized modification.
 Availability gives protection from unauthorized user

6. Safety
 Safety deals with the possible damage that can happen to the operating person
and environment due to the breakdown of an embedded system or due to the
emission of hazardous materials from the embedded products.

15. List and Explain Non-operational attributes.


Non Operational Attributes
i. Testability & Debug-ability
ii. Evolvability
iii. Portability
iv. Time to prototype and market
v. Per unit and total cost
Testability and Debug-ability
 It deals with how easily one can test his/her design, application and by which mean
he/she can test it.
 Debugability means debugging the product for finding out the probable sources that
create unexpected behaviour in the total system

Evolvability
 For embedded system, the qualitative attribute “Evolvability” refer to ease with which
the embedded product can be modified to take advantage of new firmware or hardware
technology.

Portability
 Portability is measured of “system Independence”.
 An embedded product can be called portable if it is capable of performing its operation
as it is intended to do in various environments irrespective of different processor and or
controller and embedded operating systems.

Time to prototype and market


Time to Market is the time elapsed between the conceptualization of a product and time
at which the product is ready for selling or use

Per unit and total cost

Cost is an important factor which needs to be carefully monitored. Proper market study
and cost benefit analysis should be carried out before taking decision on the per unit cost
of the embedded product.
16. Write down applications of embedded system created using arduino
controller. (IMP)
Some of the applications are as under.
1. Fire alarm system
2. Temperature monitoring system
3. RFID based authentication system. (attendance system)
4. Car safety system
5. Motion detection system
6. Object detection system
7. Water quality measurement system
8. Water level detection system
9. Weather monitoring system
10. Weight measurement system
11. Obstacle avoidance robot
13. Smart Hand sanitizer
14. Face recognition based attendance
15. Heartbeat monitoring system.
16. Smart Hand gloves
17. Stick for blind person
18. Farm security system.
19. Irrigation system.
20. Soil moisture detection system.
21. smart shoes

17. Explain Arduino UNO board in details. (IMP)

Power USB
Arduino board can be powered by using the USB cable from your
computer.

Power (Barrel Jack)


Arduino boards can be powered directly from the AC mains power supply
by connecting it to the Barrel Jack (2).

Voltage Regulator
The function of the voltage regulator is to control the voltage given to
the Arduino board and stabilize the DC voltages used by the processor
and other elements.

Crystal Oscillator
The crystal oscillator helps Arduino in dealing with time issues. How does
Arduino calculate time? The answer is, by using the crystal oscillator. The
number printed on top of the Arduino crystal is 16.000H9H. It tells us that
the frequency is 16,000,000 Hertz or 16 MHz.
Time = 1/frequency or frequency = 1/time
Frequency of a signal is number of cycles per second.
1K = Kilo = 103=1000
1M = Mega = 106=1000000
1G = Giga = 109=1000000000
1T = Tera = 1012 = 1000000000000
1m = mili = 10-3 =
1micro = micro =10-6=
1n = neno = 10-9 =

Arduino Reset
You can reset your Arduino board, i.e., start your program from the
beginning. You can reset the UNO board in two ways. First, by using the
reset button (17) on the board. Second, you can connect an external reset
button to the Arduino pin labelled RESET (5).

Pins (3.3, 5, GND, Vin)


 3.3V (6) − Supply 3.3 output volt
 5V (7) − Supply 5 output volt
 Most of the components used with Arduino board works fine with
3.3 volt and 5 volt.
 GND (8)(Ground: 0v ) − There are several GND pins on the Arduino,
any of which can be used to ground your circuit.
 Vin (9) − This pin also can be used to power the Arduino board from
an external power source, like AC mains power supply.

Analog pins
The Arduino UNO board has six analog input pins A0 through A5. These
pins can read the signal from an analog sensor like the humidity sensor or
temperature sensor and convert it into a digital value that can be read by
the microprocessor.

Main microcontroller
Each Arduino board has its own microcontroller (11). You can assume it
as the brain of your board.
The microcontrollers are usually of the ATMEL Company.
You must know what IC your board has before loading up a new program
from the Arduino IDE. This information is available on the top of the IC.
For more details about the IC construction and functions, you can refer
to the data sheet.

ICSP pin
ICSP: In Circuit Serial Programming
Arduino board is connected with another arduino board or another
controller using ICSP module.
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino
consisting of (Master / slave)
MOSI Master output Slave input Mater to Slave
MISO Master input Slave output Slave to Master
SCKSerial clock
RESET Reset
VCC +5V
GND 0v
It is often referred to as an SPI (Serial Peripheral Interface), which could
be considered as an "expansion" of the output. Actually, you are slaving
the output device to the master of the SPI bus.

Power LED indicator


This LED should light up when you plug your Arduino into a power source
to indicate that your board is powered up correctly. If this light does not
turn on, then there is something wrong with the connection.

TX and RX LEDs
Tx: transmitter
Rx: Receiver
On your board, you will find two labels: TX (transmit) and RX (receive).
They appear in two places on the Arduino UNO board. First, at the digital
pins 0 and 1, to indicate the pins responsible for serial communication.
Second, the TX and RX led (13). The TX led flashes with different speed
while sending the serial data. The speed of flashing depends on the baud
rate used by the board. RX flashes during the receiving process.
Digital I/O
The Arduino UNO board has 14 digital I/O pins (15)
(of which 6 provide PWM (Pulse Width Modulation) output. These pins
can be configured to work as input digital pins to read logic values (0 or 1)
or as digital output pins to drive different modules like LEDs, relays, etc.
The pins labeled “~” can be used to generate PWM: Pulse width
Moduation.

AREF
AREF stands for Analog Reference. It is sometimes, used to set an external
reference voltage (between 0 and 5 Volts) as the upper limit for the
analog input pins.

18. Explain Clock Signal

Clock signal in embedded system is used for synchronization purpose.

Clock signal have two periods.


 ON Period (1)
 OFF Period.(0)

Clock signal have two edges.


 Positive edge (0 to 1)
 Negative edge (1 to 0)

Above figure shows positive edge and negative edge.


19. Why Arduino UNO is so popular? (Features of Arduino UNO)
Arduino is available in market with varieties of models but the best is Arduino UNO due to
following reasons.
 It is having an easy USB interface.
 It is an open source board.
 It is having free IDE software. (Intergrated development environment)
 Free download of codes/software is available from www.arduino.cc
 Low cost
 Connected to external supply when usb interface is not available.
 16 MHZ clock to make functions high speed.
 14 digital pins and 6 analog pins for input / output connections.
 32k memory to upload the programs. (Sketches)
 On chip reset button
 ICSP connections for serial programming.
 LED indicators
 Pins for I2C connections
 Pins for UART connections
 Efficient Power management
20. List and explain various analog components and devices used with
arduino controller. (IMP)

1. LED: output device which can be on or off.


2. Switch: input device which can be on or off.
3. Bread board: It is used to make temporary connections.
4. Resistors: passive components to resist the flow of current
5. Capacitors: passive component used for charging and discharging
6. Inductors: passive component used for charging and discharging
7. 7 segment display: Output device to display numbers and characters
8. LCD display: Output device to display numbers and characters
9. Buzzer: output device which makes sound
10. Sensors (Temperature sensor, ultrasonic sensor): input device to get external data
11. Microphone: input device to take sound as input.
12. Relay: current or voltage convertor
13. DC / AC motor: output device which works as an actuator to operate something
14. Servo / stepper motor: output device which works as an actuator to operate something
15. Integrated circuit (IC): device which can have multiple components on it.
16. Fuse: to protect devices from high voltage or power.
17. connecting wires (Jumper wire): for connections
18. Multi meter: to measure voltage, current, resistor etc
19. Soldering iron: to make permanent connection
20. Battery: to supply the power
21. Potentiometer: to vary the resistance.
22. Keypad: input device to input number and alphabets,
23. Touchpad: touch input
24. Speaker: output sound
25. Camera: input device to capture the image.
21. If a color code printed on resistor is
1. Brown, Black, Red, Gold
2. Red, Black, orange, Gold
2. yellow, orange, red, silver
then find value of resistor. (IMP)

Color code Digit value Multiplier


0 Black 0 100
1 Brown 1 101
2 Red 2 102
3 Orange 3 103
4 Yellow 4 104
5 Green 5 105
6 Blue 6 106
7 Violet 7 107
8 Gray 8 108
9 white 9 109
Gold / silver Gold = 5% Silver = 10%

1. Brown , Black, Red, Gold


Resistor value = (10 X 102) = 1000 ohm = 103 = 1 Kohm
Lower Range = 1K – (1 x 0.05) = 1K – 0.05 = 0.95 K
Upper Range = 1K + (1 x 0.05) = 1K + 0.05 = 1.05 K
Resistor range is between 0.95 K to 1.05 K
2. Red, Black, Orange, Gold
Value of resistor = 20 X 103 = 20 Kohm
Lower range = 20K – (20K x 0.05) = 20K – 1K = 19Kohm
Upper range = 20K + (20K x 0.05) = 20K + 1K = 21Kohm
Resistor range is between 19 K to 21 K.
3. Yellow , Orange, Red, Silver
Value of resistor = 43 x 102 =4300 = 43000/10 = 4.3 Kohm
Lower Range = 4.3K – (4.3K x 0.1) = 4.3K – 0.43 k = 3.87 K
Upper Range = 4.3K + (4.3K x 0.1) = 4.3K + 0.43 k = 4.73 K
Resistor range is between 3.87 K to 4.73 K
22. List Digital hardware components used in embedded projects.

1. logic gates
2. decoder
3. clock generator circuit
4. encoder
5.MUX
6. DE-MUX
7. RAM
8. ROM
9. timers
10. Flip flops
11. digital sensors
12. switches

23. List all input devices used in embedded circuit.

1. switch
2. keypad
3. sensors
4. potentiometer
5. power supply
6. battery

24. List all output devices used in embedded circuit.

1. LED
2. LCD display
3. seven segment display
4. buzzer
5. DC / AC Motor, Stepper motor, servo motor
6. LED / LCD matrix
7. OLED

25. Explain various logic gates used to develop digital embedded system.
(IMP)
Logic gates are the basic building blocks of any digital system. It is an electronic circuit
having one or more than one input and only one output. The relationship between the input
and the output is based on a certain logic. Based on this, logic gates are named as AND
gate, OR gate, NOT gate etc.

1. AND Gate

A circuit which performs an AND operation is shown in figure. It has 2 input and one output.
Logic diagram

Truth Table
If any of the input is 0 then output is 0.

2. OR Gate

A circuit which performs an OR operation is shown in figure. It has 2 input and one output.
Logic diagram

Truth Table

If any of the input is 1 then output is 1.

3. NOT Gate
NOT gate is also known as Inverter. It has one input A and one output Y.

Logic diagram

Truth Table
4. NAND Gate

A NOT-AND operation is known as NAND operation. It has 2 input and one output.
Logic diagram

Truth Table

If any of the input is 0 then output is 1.

5. NOR Gate

A NOT-OR operation is known as NOR operation. It has 2 input and one output.
Logic diagram

Truth Table

If any of the input is 1 then output is 0.


6. XOR Gate (EX-OR)

XOR or Ex-OR (Exclusive OR) gate is a special type of gate. It can be used in the half adder,
full adder and subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or sometime
as X-OR gate. It has 2 input and one output.
Logic diagram

Truth Table

If both inputs are same then output is 0 else 1.

7. XNOR Gate

XNOR gate is a special type of gate. It can be used in the half adder, full adder and
subtractor. The exclusive-NOR gate is abbreviated as EX-NOR gate or sometime as X-NOR
gate. It has 2 input and one output.

Logic diagram

Truth Table

If both inputs are same then output is 1 else 0.


26. What is combinational circuit? Which are the design steps of
combinational circuits? List out some combinational circuit.

A circuit made up with various logic gates is known as combinational circuit.

Design steps:
1. Find the number of inputs and outputs related with circuit.
2. Give symbol to inputs and outputs.
3. Design truth table.
4. Create function based on truth table for output
5. Implement the circuit using logic gates.

Examples:
1. Half adder
2. Full adder
3. Half subtractor
4. Full subtractor
5. Decoder
6. Encoder
7. Multiplexer
8. De-multiplexer
9. Priority encoder
10.BCD adder
11.Code convertor
12.Comparator

27. What is sequential circuit? Give example of sequential circuit used in


embedded system.

Sequential circuit:
A combinational circuit with memory elements is known as sequential circuit.
As a memory element Flip Flop is used.
Example of Sequential circuit.
1. Counter
It is used to count the number of occurrence or works a timer.
2. Shift register
It is used for scrolling purpose

28. How to run arduino program?

 Download latest version of arduino IDE from arduino.cc website.


 Install arduino IDE.

 Install require libraries to run the program.


 Refer the documentation.
 Write an arduino program using embedded C.
 Arduino program is known as “sketch”.
 Tick mark tool is used to compile arduino program.
 Right arrow is used to upload the program on arduino controller.
 Refer inbuilt examples to run the codes.

29. List out arduino data types.

1. Void()it returns null


2. Char it defines characters.
3. Int it defines integer numbers
4. Float it defines floating numbers
5. Byte it defines variable byte with size 8 bits
6. Boolean it defines Boolean type of data
7. Const it defines constant
8. String it defines string( group of characters)
9. Arr it defines array
10. Unsigned int it defines unsigned integer number
11. unsigned char it defines unsigned character variable
12. word it defines word
13. long it defines numbers with larger size
14. short it defines short size number
15. unsigned long it defines long number without sign
16. unsigned short it defines short number without sign
17. double it defines number with higher size

30. List and explain various arduino operators.

1. Arithmetic operators (+, -, *, /, %)


+ addition
-  Subtraction
*  multiplication
/  division
%  remainder

2. Comparison operators (==, >,< !=,<=,>=…….)


== equal to operator
>  greater than
<  less than
>= greater than or equal to
<= less than or equal to
3. Boolean operators (&&, ||, !)
&& logical AND
||  logical OR
!  logical NOT

4. Bitwise operator (&, |,….)


&  bitwise AND
|  bitwise OR

5. Compound operators (++,--,+=,-=, *=,/=…….)


++ increment
--  decrement

31. List out arduino control statements.


 Control statements are used to control the part of program based on
condition or multiple conditions. These are,

1. if ---else statement
2. Switch case statement

(Control statement flow chart)

1 If statement
If(condition)
{
}
It takes an expression in parenthesis and a statement or block of statements.
If the expression is true then the statement or block of statements gets
executed otherwise these statements are skipped.

2 If …else statement
If(condition)
{true part
}
Else
{false part
}
An if statement can be followed by an optional else statement, which executes
when the expression is false.

3 If…else if …else statement


If(condition)
{
}
elseif (condition)
{
}
Else
{
}
The if statement can be followed by an optional else if...else statement, which
is very useful to test various conditions using single if...else if statement.

4 switch case statement


switch (variable) {
case label:
// statements
break;
}

case label 1: {
// statements
break;
}
default: {
// statements
break;
}
Similar to the if statements, switch...case controls the flow of programs by
allowing the programmers to specify different codes that should be executed
in various conditions.
32. What do you mean by arduino loop? List and explain five main looping
structure used in arduino programming.

Loop statements are used to execute a statement or group of statements


multiple times based on the conditions.

Five different Loops can be created using three different structures.


1. While loop
2. for loop
3. Do while loop
4. Nested loop
5. Infinite loop

1 while loop
while (condition)
{
Statements to be executed when condition is true
}
while loops will loop continuously, and infinitely, until the expression inside
the parenthesis, () becomes false. Something must change the tested variable,
or the while loop will never exit.
While loop is executed at least once.(True/false)
False.

2 do…while loop
do
{
Statements to be executed
}
While (condition)
The do…while loop is similar to the while loop. In the while loop, the loop-
continuation condition is tested at the beginning of the loop before performed
the body of the loop.
Do While loop is executed at least once.(True/false)
True.

3. For Loop:
For (initialization; control or condition; increment or decrement)
{
Statements
}
A for loop executes statements a predetermined number of times. The control
expression for the loop is initialized, tested and manipulated entirely within
the for loop parentheses.

4. Nested Loop
for ( initialize ;control; increment or decrement)
{ // statement block
for ( initialize ;control; increment or decrement)
{ // statement block
}
}
C language allows you to use one loop inside another loop. The following
example illustrates the concept.

5. Infinite loop
Using while:
While(1)
{
Statements
}
It is the loop having no terminating condition, so the loop becomes infinite.
Using Do----while:

Do
{
Statements
}
While(1)
It is the loop having no terminating condition, so the loop becomes infinite.
Using For loop:

For (; ;)
{
statements
{
It is the loop having no terminating condition, so the loop becomes infinite.

33. Explain Various Arduino Programming functions used in embedded C.

Sno Name Description or syntax of the function


1 pinMode()  pinMode(pin, Mode)
 it is used to specify whether the pin used in
interfacing is INPUT or OUTPUT.
 pinMode(13, INPUT) means pin 13 will acts as
input pin.
 pinMode(6, OUTPUT) means pin 6 will acts as
output pin.
 Int a=5
pinMode(a, INPUT)
 It refers to digital input and output.

2 digitalRead()  digitalRead(Pin)
 Reads the value from a specified digital pin,
either HIGH or LOW.
 digitalRead(13) means it reads the digital
input from pin 13.
 Int A=7
digitalRead(a) means it reads from pin 7.
 This is actually an input fuction.
3 digitalWrite()  digitalWrite(pin, value)
 it writes the value high or low to specified
Pin.
 digitalWrite(13, HIGH) means it will write
HIGH value of pin 13
 this is actually an output function.
 Int A=7
digitalWrite(A, HIGH) means it writes HIGH
value on pin 7.
4 analogRead()  analogRead(Pin)
 Reads the value from the specified analog
pin.
 analogRead(A0) means it reads analog value
from pin A0.
 Int apin=A0
analogRead(apin) means it reads variable
(apin) value.

5 analogWrite()  analogWrite(pin, value)


 it basically writes value on specified output
pin.
 Int analogpin=3 (connect potentiometer
with pin3 to get analog input)
 val = analogRead(analogPin);
analogWrite(ledPin, val / 4);
6 Max()  max(x,y)
 it finds maximum out of two numbers.
7 Min()  min(x,y)
 it finds minimum out of two numbers.
8 Abs()  Calculates the absolute value of a number.
 Abs(x)
9 Sq()  It finds square of a given number
 Sq(x)
10 Squrt()  It finds square root of a given number
 Sqrt(x)
11 Cos()  It finds cosine value of a given number
12 Sin()  It finds sine value of a given number
13 Tan()  It finds tan value of a given number
14 isdigit() Isdigit(c) will return (1) TRUE if c is digit else it
returns (0) FALSE.
15 Isalpha() Isalpha(C) will return 1 if it is alphabet else return 0.

16 Isalnum() Isalnum(C) will return 1 if it is alpha numeric


character else return 0.
17 isupper() Isupper(C) will return 1 if C is an upper case else it
returns 0.
18 islower() Islower(C) will return 1 if C is a lower case else it
returns 0.
19 Isspace() Isspace(C) will return 1 if C is white space character,
new line character, horizontal tab, vertical tab.
20 map() It re-map the range.
map(value, fromLow, fromHigh, toLow, toHigh)
valuevariable
fromlowlower value of current range
fromhighhigher value of current range
tolowlower value of new range
tohighhigher value of new range
map(x, 1, 50, 50, 1)

34. Explain various Constants used in Arduino Programming. (IMP)

Following is the list of arduino constants.

Constants Meaning / Uses


INPUT This constant is used to declare specified pin as input.
pinMode(b, INPUT) : b pin is working as an input

OUTPUT This constant is used to declare specified pin as output.


pinMode(a, OUTPUT): a pin is working as an output

HIGH It is used to assign high value (+5v) to given variable or pin.


digitalWrite(LED, HIGH): it will send high value to an LED.
(LED is ON)

LOW It is used to assign low value (+0v) to given variable or pin.


digitalWrite(LED, LOW): it will send low value to an LED.
(LED is OFF)

TRUE True is defined as ‘1’. It is correct


FALSE False is defined as ‘0’.it is incorrect

LED_BUILTIN It refers to built in LED on arduino board.


Basically inbuilt is connected with Pin 13.

digitalwrite(LED_BUILTIN, HIGH) it will glow the on board


LED (13)

35. Explain following functions used with arduino programming. (Most IMP)
1. pinMode()
2. digitalRead()
3. digitalWrite()
4. analogRead()
5. anaogWrite()
1. pinMode()
 pinMode(pin, Mode)
 it is used to specify whether the pin used in interfacing is INPUT or
OUTPUT.
 pinMode(13, INPUT) means pin 13 will acts as input pin.
 pinMode(6, OUTPUT) means pin 6 will acts as output pin.
 Int a=5
pinMode(a, INPUT)
 It refers to digital input and output.

2. digitalRead()
 digitalRead(Pin)
 Reads the value from a specified digital pin, either HIGH or LOW.
 digitalRead(13) means it reads the digital input from pin 13.
 Int a=7
digitalRead(a) means it reads from pin 7.
 This is actually an input function.

3. digitalWrite()
 digitalWrite(pin, value)
 It writes the value high or low to specified Pin.
 digitalWrite(13, HIGH) means it will write HIGH value of pin 13
 This is actually an output function.
 Int a=7
digitalWrite(a, HIGH) means it writes HIGH value on pin 7.

4. analogRead()
 analogRead(Pin)
 Reads the value from the specified analog pin.
 analogRead(A0) means it reads analog value from pin A0.
 Int apin=A0
analogRead(apin) means it reads variable (apin) value.

5. analogWrite()
 analogWrite(pin, value)
 it basically writes value on specified output pin.
 Int analogpin=3
(connect potentiometer with pin3 to get analog input)
val = analogRead(analogPin);
analogWrite(ledPin, val / 4)
36. Explain Time related function used in arduino programming. (IMP)

delay():
Pauses the program for the amount of time (in milliseconds) specified as
parameter. (There are 1000 milliseconds in a second.)

delay(500): it delays or pauses for 500 milliseconds

void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a 1 second (1000 milliseconds)
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a 1 second (1000 milliseconds)
}

delayMicroseconds():
Pauses the program for the amount of time (in microseconds) specified as
parameter. (There are 1000 microseconds in a millisecond and there are 106
microseconds in 1 second.)

1 sec = 106 microsecond


1 microsecond = 10-6 second

void loop()
{
digitalWrite(outPin, HIGH); // sets the pin on
delayMicroseconds(50); // pauses for 50 microseconds
digitalWrite(outPin, LOW); // sets the pin off
delayMicroseconds(50); // pauses for 50 microseconds
}

micros():
Returns the number of microseconds since the Arduino board began running
the current program. This number will overflow (go back to zero), after
approximately 70 minutes.

void loop()
{
Serial.print("Time: ");
time = micros();
Serial.println(time); //prints time since program started
delay(1000); // wait a second so as not to send massive amounts of data
}

millis():
Returns the number of milliseconds since the Arduino board began running
the current program. This number will overflow (go back to zero), after
approximately 50 days
void loop()
{
Serial.print("Time: ");
time = millis();
Serial.println(time); //prints time since program started
delay(1000); // wait a second so as not to send massive amounts of data
}

37. What is PWM? Which pins of arduino Uno board function as PWM pins?
(IMP)
PWM: Pulse Width Modulation

It is a technique where the width of pulse is changing according to source


value. Means by passing different values user can control pulse width.

There are six arduino pins which works as PWM pins.


These pins are 3, 5, 6, 9, 10, 11.

It generally works with analogWrite() function.

38. What is sensor? Why do we need sensor? List various types of sensors.

“A sensor is a device which reads the physical environment or environmental


variable and tell you what happened.”

“A sensor is an object whose purpose is to detect change in environmental


parameters and provide corresponding output.”
“A sensor is a device which reads environmental parameters and convert it
into electrical form which can be read by other devices.”

Sensor provides input to embedded system and based on that input


information system will make decision.

We need a sensor to feed data in a system and tells the system when to take
a specific action.

Let’s take an example of air condition system.


 You have set temperature to 18 degree.
 Initially the ac was off.
 So fan starts pumping the air until desired temperature is reached.
 How the ac system knows that desired temperature is reached?
 You must require a device which sense the temperature which is
temperature sensor device.
 Based on that system will take a decision to operate or not.

Types of sensors:
1. Temperature sensor.
2. Humidity sensor
3. Pressure sensor
4. Ultrasonic sensor
5. Motion sensor
6. IR (Infrared) Sensor
7. Optical sensor (photo detector)
8. Sound sensor
9. Water sensor
10. Gas sensor
11. Line follower sensor
12. Wireless sensor (RFID)
13. Color sensor
14. Light intensity sensor
15. Barcode reader
16. Heart rate pulse sensor
17. Alcohol sensor
18. Fingerprint scanner
19. Flame sensor
20. Specific gas sensor (Mithane)
39. What are the uses of temperature sensor? Explain LM35 sensor.

Temperature sensor:
 It detects the environmental temperature.
 Various types of temperature sensors are
o Resistance Temperature Detectors (RTD)
o Thermocouples
o Thermistor
 LM35 is popular temperature sensor.
 TMP36 is also well known temperature sensor.

LM35 sensor:

PIN 1 : Voltage Pin (range is 4 v to 20v and it is connected with vcc of arduino
controller)
PIN 2: Output Pin (it is connected with A0 analog pin of arduino)
PIN 3 : Ground pin (connected with ground of arduino)

 LM35 reads the temperature from environment and generate the


output electrical signal or voltage which is proportional to temperature.
 It can able to detect temperature from -55 degree to +150 degree.
 It operates between 4 to 20 v.
 It is having low cost with greater accuracy.
 Coating around LM35 protects it from self-heating.
 Lm35 has many family members a few names are LM35C, LM35CA,
LM35D, LM135, LM135A, LM235, LM335.
40. What do you mean by ultra sound? Explain ultrasonic sensor with its pin
diagram? How to calculate distance of object using ultrasonic sensor?

Ultra: It refer to sound which cannot be listen by human but animals like bat
and dog can hear it.

Sonic: It refers to sound

 Generally human use the eye for finding the distance of an object
which is not an accurate method.
 Birds like bat can emit the sound signal and receives it back and find
the distance.
 If we estimate the time between sending and receiving the signal then
we can able to find distance.
 Ultrasonic sensor can be used in many applications where we need to
find the distance of an object, detecting motion, counting objects etc.
 Ultrasonic sensor must have two parts
o A transmitter which transmits the signal which human cannot
hear.
o A Receiver which receives the reflected signal bounced back from
nearby objects.
 If the object is very close to the sensor, the signal comes back quickly.
 If the object is far away from the sensor, the signal takes longer to come
back
 If objects are too far away from the sensor, the signal takes so long to
come back (or is very weak when it comes back) that the receiver cannot
detect it.
 It is having four pins to interface with arduino controller.
o Vcc: +5v (power pin)
o Gnd: Ground pin
o Trig: Trigger pin to send the ultrasonic signal
o Echo: Echo pin to receive the reflected signal
 To interface with arduino make connection as follows
o Vcc: connect with +5v of aruino
o Gnd: connect with ground of arduino
o Trig: connect with Pin 7 of arduino
o Echo: connect with Pin 6 of arduino

Utrasonics
Object
sensor

 Total time required by the signal to move forward and reverse back is
T.
 The time to receive back from object is (T/2).
 Velocity = distance /time
 Sound velocity is 343 m/s.
 1m = 100 cm.
 343 m/s is 34300 cm/s.
 Now convert cm/s into cm/microsecond.
 Micro = 10-6
 34300 x 10-6 cm/microsecond.
 34300 / 1000000 =0.0343 cm / microsecond.
 Velocity = distance /time
 Distance = velocity x time
 Distance = velocity x (T/2)
 Distance = 0.0343 x T/2
 Distance (cm) = 0.0172 x T cm
 Distance (inch) = distance(cm) / 2.54

41. What is keypad? How keypad works? How to interface keypad with
Arduino? (IMP)

A keypad is a device that can be used to receive input data from user.
In this project, you will first learn how to interface a 4×4 keypad with Arduino,
and then you will Build a simple calculator using a keypad.
Since past until now, there has been various methods to enter data into
devices and systems such as buttons, audio, image, etc. Keypad is one of the
most effective methods to enter data into the system. The advantage of this
method over other methods is that it is easy to use and cheap. – That’s why
we see a lot of keypads around us. Like your computer keypads, which is a kind
of large keypads.

Different Kind of Keypads

Keypads are made in various types, but the most common sizes are 5 * 4 and
4 * 4.

These numbers indicate the number of rows and columns of the keypads. For
example, A 3*4 keypad has 4 rows and 3 columns.

How Does A Keypad Work?

To receive data from 12 buttons, we need to use 12 digital pins from our
microcontroller (Arduino), and this means wasting a lot of pins, but using the
keypad, we only need 7 digital pins. You can see how the keypad works in the
animation below.
Keypad pins are divided into two groups: row and column. you can see 2
examples of naming them in the image below.

Interfacing with Arduino:

42. What is UART? How does it works?

What is UART?

 It stands for Universal Asynchronous Reception and Transmission


(UART)
 A simple serial communication protocol that allows the host
communicates with the auxiliary device.
 UART supports bi-directional, asynchronous and serial data
transmission.
 It has two data lines, one to transmit (TX) and another to receive (RX),
which are used to communicate through digital pin 0, digital pin 1.
 TX and RX are connected between two devices. (eg. USB and computer)

How does it work?

 It can operate between devices in 3 ways:

 Simplex = data transmission in one direction


 Half-duplex = data transmission in either direction but not
simultaneously
 Full-duplex = data transmission in both directions simultaneously
 Once connected, data flows from TX of the transmitting UART to RX of
the receiving UART.
 As UART is an asynchronous serial transmission protocol = No clocks
 Transmitting UART converts parallel data from the master device (eg.
CPU) into serial form and transmit in serial to receiving UART. It will then
convert the serial data back into parallel data for the receiving device

Ref: Basics of UART


communication.

 UART data transmission speed is referred to as BAUD Rate and is set to


9600 or 115,200 by default (BAUD rate is based on symbol transmission
rate, but is similar to bit rate).

43. What is I2C ? How does it work? (IMP)

What is I2C?
 It stands for Inter-integrated-circuit (I2C)
 It is a serial communications protocol similarly to UART. It is used with
modules and sensors.
 It is a simple, bidirectional two-wire synchronous serial bus and requires
only two wires to transmit information between devices connected to
the bus.
 They are useful for projects that require many different parts (eg.
sensors, pin, expansions and drivers) working together as they can
connect up to 128 devices to the mainboard while maintaining a clear
communication pathway!
 This is because I2C uses an address system and a shared bus = many
different devices can be connected using the same wires and all data
are transmitted on a single wire and have a low pin count.
 Speed of I2C is also dependent by data speed, wire quality and external
noise

How does it work?


 It has 2 Lines which are SCL (serial clock line) and SDA (serial data line
acceptance port)
 SCL is the clock line for synchronizing transmission.
 SDA is the data line through which bits of data are sent or received.
 The master device initiates the bus transfer of data and generates a
clock to open the transferred device and any addressed device is
considered a slave device.
 If the master wants to send data to the slave, the master must first
address the slave before sending any data.
 If the master wants to receive data from the slave, the master must
again address the slave first.
PCF 8574 (I2C for LCD)

PCF8574 Serial Interface Module Board LCD Converter.


44. What is SPI ? How does it work? (IMP)

 SPI, or Serial Peripheral Interface, is a serial communication protocol


often used in embedded systems for high-speed data exchanges
between devices on the bus.

 It operates using a master-slave paradigm that includes at least four


signals:
1. a clock (SCLK),
2. a master output/slave input (MOSI),
3. a master input/slave output (MISO),
4. and a slave select (SS) signal.

 The SCLK, MOSI, and MISO signals are shared by all devices on the bus.

 The SCLK signal is generated by the master device for synchronization,


while the MOSI and MISO lines used for data exchange.

 Additionally, each slave device added to the bus has its own SS line. The
master pulls low on a slave's SS line to select a device for
communication.

 SPI communication supports full-duplex communication, meaning that


both the master and slave can transmit data simultaneously.
45. Why LCD is used? Explain LCD pin configuration and interface with Arduino.

LCD: Liquid Crystal Display


 It is used to display characters and numbers on its screen.
 (16 x 2) = 32 characters can be displayed on LCD.
 16 columns (Vertical Line) and 2 rows( horizontal Line)

H E L L O W O R L D ! !
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

 It can be found in digital clock, washing machine, Microwave oven, Freeze,


LCD Television and many more places.
 LCDs are used in embedded system for displaying some parameters or
status information.
 (16 x 2) LCD display is having 16 Pins.
 It is having 2 rows. In each row 16 characters can be displayed.

LCD Pin Configuration:

Pin Name of Function of the PIN


NUmber The Pin
Pin 1 VSS It is Ground pin of LCD display and it must be
connected with ground pin of arduino.
Pin 2 VCC It is connected with +5 V. It must be connected with
+5 of arduino board.
Pin 3 VEE It must be connected with potentiometer device
which is used to vary the brightness / contrast of the
display.

Potentiometer is a device which is use to vary the


resistance. It is having three terminals.

First is connected with +5, second is connected with


ground and third is connected with arduino pin and
VEE.
Pin 4 RS Register Select.

There are two different register used with LCD.


1. Data Register
2. Instruction(command) Register

RS pin is used to select any one of the above register.

RS1+5v activate or use data register.


RS0ground  activate or use Instruction
register.

It must be connected with digital pin of arduino.


Pin 5 RW Read /Write

It is used to specify whether you want to read or


write on LCD display.

It must be connected with digital pin of arduino.

R/W1+5vRead
R/W0GroundWrite
Pin 6 E E (Enable) is used to enable the LCD display for
displaying data.

E=1enable the LCD


E=0disable the LCD

It must be connected with any digital pin of arduino.


Pin 7 D0 Data Pin – 0 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 8 D1 Data Pin – 1 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 9 D2 Data Pin – 2 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 10 D3 Data Pin – 3 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 11 D4 Data Pin – 4 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 12 D5 Data Pin – 5 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 13 D6 Data Pin – 6 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 14 D7 Data Pin – 7 is used to send the data and it must be
connected with any digital pin of arduino.
Pin 15 LED +5v Used to enable LED Light and must be connected
with +5 v.
Pin 16 LED gnd It must be connected with Ground

LCD Interfacing with Arduino:

You might also like