PRACTICAL NO.
1. TITLE/TOPIC
Familiarization with Components of a Microprocessor System
2. COMPONENTS/EQUIPMENT REQUIRED
Personal Computer or Laptop
GNU Simulator for 8085 (Offline: [Link])
Online Simulator: [Link]
3. THEORY
A microprocessing system refers to a system that uses a microprocessor or
microcontroller as its central processing unit (CPU) to perform computing tasks. It is an
electronic system designed to process data, execute instructions and control the external
devices based on a set of programmed commands. Main components are:
Microprocessor (CPU): The central unit that carries out computational tasks,
executes instructions, and controls other components. It is a general-purpose
microprocessor (e.g., Intel or AMD). In an Arduino, it is a microcontroller (e.g.,
ATmega328P).
Memory (RAM/ROM//EEPROM): Used for storing intermediate data,
instructions/firmware, and configuration.
Input/Output (I/O) Interfaces: ports or devices for user interaction or
communication with other systems (e.g., keyboards, displays, sensors, etc.).
Bus System: A set of electronic paths (address bus, data bus, control bus) that
connect the microprocessor to memory and peripherals.
Figure 1 Microprocessing system components
4. OBSERVATION TABLE
Component Name Observed in System Function
(PC/Arduino/Smartphone)
Microprocessor / CPU
RAM
ROM / Flash Memory
Input Devices
Output Devices
I/O Ports / Interfaces
Bus System
(Address/Data/Control)
5. PRECAUTIONS
Handle components carefully and avoid electrostatic discharge.
Ensure power is off before making connections.
Keep the workspace clean and dry to avoid short circuits..
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What are the basic components of a micro processing system?
3. What is the difference between RAM and ROM?
4. What are the main types of buses used in a microprocessing system?
5. Name any two input and output devices used in a microprocessing system.
6. How is an Arduino board different from a general-purpose computer?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 2
1. TITLE/TOPIC
Introduction to Assembly Programming Software
2. COMPONENTS/EQUIPMENT REQUIRED
Personal Computer or Laptop
GNU Simulator for 8085 (Offline: [Link])
Online Simulator: [Link]
3. THEORY
Assembly Language is a low-level programming language that communicates directly with a
computer’s hardware. It uses mnemonic codes and symbols to represent machine-level
instructions. Assembly language is hardware-specific and allows direct control of processor
operations.
An Assembler converts the assembly language code into machine code (binary format). To
practice and test these programs, simulation software is used.
4. OBSERVATION TABLE
S. No. Task Performed Observation / Remarks
1 GNUSim8085 / SIM8085 interface
explored
2 Program written and assembled
successfully
3 Simulation executed
4 Changes observed in register/memory
5. PRECAUTIONS
Select the correct simulator or tool as per the microprocessor type.
Write valid syntax instructions and avoid syntax errors.
Ensure proper initialization of registers before program execution.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What is assembly language?
3. Name two tools used for 8085 assembly programming.
4. What is the function of an assembler?
5. How are register values affected during program execution?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 3
1. TITLE/TOPIC
Write a Program in Assembly Language to Subtract a Hexadecimal Number in
Memory Address 0050 from a Hexadecimal Number in Memory Location 0060 and
Store the Result in Location 0070.
2. COMPONENTS/EQUIPMENT REQUIRED
Personal Computer or Laptop
GNU Simulator for 8085 (Offline: [Link])
Online Simulator: [Link]
3. THEORY
In 8085 microprocessor, arithmetic operations such as addition and subtraction are performed
using the accumulator (Register A). Subtraction is carried out using the SUB instruction which
subtracts the content of a register or memory location from the accumulator. The result remains
in the accumulator and may affect the status of flags like Carry, Zero, Sign, and Auxiliary Carry.
The final result can then be stored in a specified memory location using the STA instruction.
4. ALGORITHM
1. Load first number (multiplicand) from address 0020 into register B.
2. Load the first hexadecimal number from memory location 0060 into Register A.
3. Load the second number (to be subtracted) from memory location 0050 into
another register (e.g., Register B).
4. Subtract the content of Register B from Accumulator A.
5. Store the result from Register A into memory location 0070.
5. ASSEMBLY LANGUAGE CODE
CODE COMMENTS
6. PRECAUTIONS
Ensure correct memory locations are used.
Write accurate opcode syntax.
Verify simulator settings before execution.
7. OBSERVATION TABLE
S No. Memory Location Value (Hex) Observation / Result
1 0060H (Num1)
2 0050H (Num2)
3 0070H (Result)
8. RESULT/DISCUSSION
1. What have you learned from this activity?
2. Which instruction is used for subtraction in 8085?
3. What is the role of the accumulator in arithmetic operations?
4. How is memory accessed in 8085 assembly language?
5. What happens if the subtraction result is negative in 8085?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 4
1. TITLE/TOPIC
Multiply two 8-bit numbers, located at addresses 0020 and 0021 and store the
product an 8-bit number in location 0020.
2. COMPONENTS/EQUIPMENT REQUIRED
Personal Computer or Laptop
GNU Simulator for 8085 (Offline: [Link])
Online Simulator: [Link]
3. THEORY
Since 8085 microprocessor does not have a direct MUL instruction, the multiplication is usually
done by repeated addition (loop-based program).
4. ALGORITHM
1. Load first number (multiplicand) from address 0020 into register B.
2. Load second number (multiplier) from address 0021 into register C.
3. Clear accumulator A (used to store sum/product).
4. Add B to accumulator C times (using a loop).
5. Store the final result (A) into location 0020.
5. ASSEMBLY LANGUAGE CODE
CODE COMMENTS
6. PRECAUTIONS
Ensure data is correctly entered at memory addresses before executing.
Do not use addresses reserved by system software.
Verify result by checking memory content after execution.
7. OBSERVATION TABLE
Address Content (Before Execution) Content (After Execution)
0020H Multiplicand (e.g., 03H)
0021H Multiplier (e.g., 03H)
8. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What is the role of the accumulator in this program?
3. Why do we use repeated addition in 8085 for multiplication?
4. Can 8085 directly multiply two numbers?
5. What happens if the product exceeds 8-bit?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 6
1. TITLE/TOPIC
Move a block of 32 numbers starting at address $2000 to a new start address $3000
2. COMPONENTS/EQUIPMENT REQUIRED
Personal Computer or Laptop
GNU Simulator for 8085 (Offline: [Link])
Online Simulator: [Link]
3. THEORY
In microprocessor-based systems, data transfer between memory locations is a fundamental
operation. This practical demonstrates how to move a block of data from one memory area to
another using assembly language. It involves the use of register pairs, loops, and memory
addressing techniques. Such operations are essential in tasks like buffer copying, memory
initialization, or data manipulation in embedded systems and computer applications.
4. ALGORITHM
1. Load the count (32) in register C.
2. Set HL = 2000H (Source Address)
3. Set DE = 3000H (Destination Address)
4. Move the content from memory pointed by HL to accumulator.
5. Move accumulator content to memory pointed by DE.
6. Increment HL and DE.
7. Decrement counter and repeat until count becomes zero.
5. ASSEMBLY LANGUAGE CODE
CODE COMMENTS
6. PRECAUTIONS
Use correct source and destination addresses.
Ensure counter is loaded correctly.
Do not overwrite important memory areas.
7. OBSERVATION TABLE
Address (Source) Before After
2000H–201FH Data Block
Address (Destination) Before After
3000H–301FH Empty/Random
8. RESULT/DISCUSSION
1. What have you learned from this activity?
2. Which instruction is used to load a 16-bit address in HL/DE?
3. Why do we use a loop in this program?
4. What is the purpose of the INX instruction?
5. How many bytes are transferred in this program?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 6
1. TITLE/TOPIC
Write a subroutine that can be used to produce a time delay and which can be set to
any value.
2. COMPONENTS/EQUIPMENT REQUIRED
Personal Computer or Laptop
GNU Simulator for 8085 (Offline: [Link])
Online Simulator: [Link]
3. THEORY
Time delays are essential in microprocessor-based systems for tasks like LED blinking, switch
debouncing, and timed execution. Delays are usually implemented using software loops in
assembly language. In this practical, a subroutine is developed that produces a time delay using
nested loops. The delay duration can be easily adjusted by changing the counter values, making
the subroutine reusable for various timing requirements.
4. ALGORITHM
1. Load delay value in a register (e.g., B).
2. Call the delay subroutine from the main program.
3. Inside the subroutine, use nested loops to create a time delay.
4. Return to the main program after delay.
5. Modify counter values to adjust delay duration.
5. ASSEMBLY LANGUAGE CODE
CODE COMMENTS
6. PRECAUTIONS
Set correct counter values to ensure proper delay.
Ensure subroutine address is within program range.
Avoid infinite loops by proper use of return instructions.
7. OBSERVATION TABLE
Register Initial Value Final Value
B (outer loop) 05H 00H
C (inner loop) FFH 00H
8. RESULT/DISCUSSION
1. What have you learned from this activity?
2. Why are nested loops used for delay generation?
3. What is the role of the CALL and RET instructions?
4. What are real-world applications of delay subroutines?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 7
1. TITLE/TOPIC
Familiarization with Pinout Diagram of Commonly Used Microcontroller (Arduino)
2. COMPONENTS/EQUIPMENT REQUIRED
1. Personal Computer
2. Arduino UNO Board
3. USB cable for Arduino connection
4. Arduino IDE (offline/online)
5. Projector or printed pinout diagram handout
3. THEORY
Development boards provide an easy and accessible platform to learn and experiment with
microcontrollers. It consists of a microcontroller (typically ATmega328), which can be
programmed using Arduino IDE (Integrated Development Environment) — a software used to
write and upload code to the board.
What does Arduino Mean?
The word Arduino corresponds to two main aspects:
1. Arduino Hardware
This includes physical boards, shields, carriers, kits, and accessories.
Arduino Boards: These contain a microcontroller, oscillator, headers,
ports, and code-burning circuitry. Examples of Arduino families include:
Arduino Classic, Arduino MKR, Arduino Nano, Arduino Lillypad, Arduino
Portenta, Arduino Nicla, Arduino Opta
Arduino Kits and Accessories: Starter Kits typically contain an
Arduino board and various electronic components for project-
based learning.
Arduino Shields and Carriers: Shields are modular circuit
boards that add extended functionality to the Arduino board.
Common shields include: Arduino Motor Shield, Arduino 4-Relays Shield, Arduino Ethernet
Shield
2. Arduino Software
The Arduino IDE (Integrated Development Environment) is used to write, compile, and
debug code. It simplifies programming and uploading code to the Arduino board.
4. PROCEDURE
Step 1: Hardware Setup
1. Examine different types of Arduino development boards UNO
2. Identify the microcontroller and supporting components on each board.
3. Study available Arduino kits and note the components provided in a starter kit.
4. Identify various shields and carriers, and discuss how they enhance board capabilities.
5. Discuss industrial applications where Arduino development boards can be used.
Step 2: Testing and observations
Item Type/Model Type/Model Observed
Arduino Board UNO / Nano / MKR / Portenta
Microcontroller ATmega328 / SAMD21 / STM32
Arduino IDE Offline / Online
Shield (Example) Motor / Relay / Ethernet
Kit or Accessory Starter Kit / Sensor Kit
5. PRECAUTIONS:
Handle boards and cables carefully to avoid damage.
Disconnect USB cable before handling or changing connections.
Keep workspace clean and dry to avoid short circuits.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What is the difference between Arduino board and Arduino IDE?
3. What is the purpose of shields in Arduino systems?
4. How does Arduino IDE simplify embedded system programming?
5. What are the benefits of using Arduino Kits for beginners?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 8
1. TITLE/TOPIC
Familiarization with Pinout Diagram of Commonly Used Microcontroller (Arduino)
2. COMPONENTS/EQUIPMENT REQUIRED
1. Personal Computer
2. Arduino UNO Board
3. USB cable for Arduino connection
4. Arduino IDE (offline/online)
5. Projector or printed pinout diagram handout
3. THEORY
A microcontroller is an integrated circuit that contains a processor, memory, and
input/output (I/O) peripherals. Understanding pinout is crucial to properly interface the
microcontroller with other components and develop functional circuits.
The Arduino Uno is an open-source microcontroller based on the Microchip ATmega328P
microcontroller initially released in 2010. The word "uno" means "one" in Italian
corresponds to its first release. Its latest version is Arduino Uno R3 released in the year
2011.
4. PROCEDURE
Step 1: Hardware Setup (Circuit Diagram)
Pin Label on Board Description
A0 – A5 Analog Inputs 10-bit ADC channels, also usable as digital I/O.
D0 (RX) Digital Pin 0 UART Receive – used for serial communication.
D1 (TX) Digital Pin 1 UART Transmit – used for serial communication.
ICSP Header ICSP Pins In-Circuit Serial Programming interface.
D10, D11, D12, D13 SPI Pins SPI communication interface.
A4 (SDA), A5 (SCL) I2C Pins I2C interface for data transfer.
USB Connector USB Type-B Used for programming and power (5V from PC).
D0 – D13 Digital I/O Pins General-purpose digital input/output pins (0 to 13).
D13 Built-in LED Onboard LED connected to Digital Pin 13.
D2, D3 Interrupt Pins External interrupts INT0 and INT1.
GND GND Ground pins.
Vin Vin Input voltage to the board (7–12V recommended).
5V 5V Regulated 5V output from voltage regulator.
3.3V 3.3V Regulated 3.3V output (max 50 mA).
D3, D5, D6, D9, PWM Pins Pulse Width Modulation outputs (marked with ~ on board).
D10, D11
AREF AREF Analog Reference for ADC.
RESET RESET Resets the microcontroller.
Step 2: Testing and observations
Pin Type Pin Numbers/Labels
Digital I/O Pins
Analog Input Pins
PWM Pins
Power Pins
Communication Pins
5. RESULT/DISCUSSION
1. What have you learned from this activity?
2. How many digital I/O pins are available on Arduino Uno??
3. What is the use of analog pins A0–A5?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 9
1. TITLE/TOPIC
Introduction to IDE for Microcontroller Programming
2. COMPONENTS/EQUIPMENT REQUIRED
Personal Computer
Arduino UNO Board
USB cable for Arduino connection
Arduino IDE (Offline and/or Online Web Editor)
Projector or Handouts for demonstration
3. THEORY
An IDE (Integrated Development Environment) is a software suite that provides
comprehensive facilities to computer programmers for software development. In
microcontroller programming, IDEs are used to write, compile, debug, and upload code
(called sketches) to a Arduino board.
Parts of the Arduino IDE (Code Window) :
Menu bar to create, open, and save code (sketche). A sketch is a set of instructions that tells
the Arduino what to do.
Toolbar Icon/Buttons to do common tasks like:
Verify – Check for errors in your code.
Upload – Send code to the Arduino board.
New, Open, Save – For managing sketches.
Text Editor: This is the main region where actual
sketch (code) is written.
Output Pane: It displays text output generated by the Software, including complete
error messages compiling status of code and other information.
Before starting, two important settings must be done:
1. Select the Board – Go to Tools > Board and choose Arduino Uno.
2. Select the Port – Go to Tools > Port and choose the port that matches your
Arduino. On Windows, it starts with COM (e.g., COM3). These settings allow
your computer and Arduino to communicate properly.
Setup is where you will set the pin that
controls the LED to an output, telling
the Arduino which pin will control the
LED.
Loop is where you will put the code
that controls the timing, turning the
LED on and off continually.
Output Pane
4. PROCEDURE
Step 1: Hardware Setup (Circuit Diagram)
1. Install the ________________________________________________.
2. Connect the Arduino UNO Board to the PC using a _______________ cable.
3. Launch the _________ and explore its Graphical User Interface (GUI).
4. Select the correct board (Arduino UNO) from ______________.
5. Select the communication port from ______________________.
Step 2: Software (Arduino IDE) Setup Write simple code (e.g., blink an LED using
digital pin 13)
Step 3: Testing and observations
1. Click on Verify to ________________ the code and check for errors.
2. Click on Upload to send the ________________ to the microcontroller.
3. Explore Library Manager from _______________ and explore the examples.
5. PRECAUTIONS
1. Always install the latest version of Arduino IDE or required drivers.
2. Select the correct Board and Port before uploading the code.
3. Avoid any electrical short circuits while connecting external hardware.
4. Ensure code is properly saved and verified before uploading.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What is the purpose of using an IDE in microcontroller programming?
3. Name some features of the Arduino IDE.
4. What is the function of the Serial Monitor in Arduino IDE?
5. What is a sketch in Arduino IDE?
6. What is the latest release of Arduino IDE?
7. Which software is used for Programming Arduino boards?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 10
1. TITLE
Write a program & construct circuit for interfacing LED with Arduino.
2. COMPONENTS/EQUIPMENT REQUIRED
Arduino Uno Board
LED (5mm)
Resistor 220Ω
Jumper Wires
Arduino IDE
3. THEORY
Arduino IDE is a development platform used to write, compile, and upload code to the
Arduino microcontroller. The LED blinking program is the most basic test to ensure the
board is functioning and the programming interface is working. The built-in LED on most
Arduino boards is connected to digital pin 13 and can be turned ON/OFF by writing HIGH
or LOW to the pin using digitalWrite() function.
4. PROCEDURE
Step 1: Hardware Setup (Draw Circuit Diagram)
Step 2: Software (Arduino IDE) Setup Write code:
Step 3: Testing and observations
Testing Observation
Code Successfully uploaded
LED Blink Status
5. PRECAUTIONS
1. Use a current-limiting resistor in series with LED.
2. Check the polarity of LED connections (Anode to pin, Cathode to GND).
3. Select correct pin number in the code.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What is the use of pinMode() function in Arduino?
3. What does digitalWrite() do?
4. Why is the built-in LED connected to pin 13?
5. What is the role of delay() function in the program?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 11
1. TITLE
Write a program & construct circuit for interfacing LED with Arduino.
2. COMPONENTS/EQUIPMENT REQUIRED
Arduino Uno Board
LED (5mm)
Resistor 220Ω
Jumper Wires
Arduino IDE
3. THEORY
LEDs (Light Emitting Diodes) are basic electronic output
devices that emit light when current flows through them.
Using a digital output pin of the Arduino, we can turn the
LED ON and OFF by sending HIGH or LOW signals. A
current-limiting resistor is used in series with the LED to prevent it from burning out due
to excess current.
4. PROCEDURE
Step 1: Hardware Setup (Draw Circuit Diagram)
Step 2: Software (Arduino IDE) Setup Write code:
Step 3: Testing and observations
Testing Observation
Successfully uploaded
LED blinks ON/OFF at 1-second interval
Change the intervals
5. PRECAUTIONS
1. Use a current-limiting resistor in series with LED.
2. Check the polarity of LED connections (Anode to pin, Cathode to GND).
3. Select correct pin number in the code.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What is the purpose of using a resistor with LED?
3. What is the function of digitalWrite()?
4. How can you change the blinking rate of an LED?
5. What happens if LED is connected without a resistor?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 12
1. TITLE/TOPIC
Write a program & construct circuit for interfacing switches with Arduino.
2. COMPONENTS/EQUIPMENT REQUIRED
Arduino Uno Board
Push Button (Tactile Switch)
LED (5mm)
220Ω Resistor and 10kΩ Resistor (Pull-down)
Jumper Wires
Arduino IDE
3. THEORY
A push button is a momentary switch that completes a circuit when pressed and breaks
it when released. It requires a pull-down or pull-up resistor to avoid a floating state
(undefined voltage). An LED (Light Emitting Diode) emits light when current flows through
it. Requires a current-limiting resistor (220Ω) to prevent damage.
4. PROCEDURE
Step 1: Hardware Setup (Circuit Diagram)
Step 2: Software (Arduino IDE) Setup Write code:
Step 3: Testing and observations
TESTING OBSERVATION - LED STATUS
Switch Not Pressed (LOW)
Switch Pressed (HIGH)
5. PRECAUTIONS
1. Ensure the LED anode (+) and cathode (-) are connected properly.
2. Always use a 220Ω resistor for the LED and a 10kΩ pull-down resistor for the button.
3. Floating State: Without a pull-down resistor, the button may give erratic readings.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. Why is a pull-down resistor necessary with a push button?
4. What happens if we connect the LED without a current-limiting resistor?
5. What happens if a pull-down resistor is not used?
6. What is the purpose of using a resistor with LED?
7. Which leg of LED connects to positive supply?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 13
1. TITLE/TOPIC
Write a program & construct circuit for interfacing a 7-segment display with Arduino.
2. COMPONENTS/EQUIPMENT REQUIRED
Arduino Uno Board
7-Segment Display (Common Cathode)
220-ohm Resistors (7 pcs)
Jumper Wires
USB Cable
Arduino IDE
3. THEORY
7-Segment Display:
The 7-segment display consists of seven LEDs arranged in a rectangular fashion. Each
of the seven LEDs is called a segment because when illuminated the segment forms
part of a numerical digit (both Decimal and Hex) to be displayed.
Letters (a,b,c,d,e,f,g,h,dp) are used to designate terminals of each segment. The PinOut
of Common Cathode single digit 7-Segment is as follows:
4-Digit Seven-Segment Display
Module:
The TM1637 is 4-Digit Seven
Segment Module has a built-in LED
driver and a segment of colon to
display time.
Connections:
1. Connect each segment (a-g) to Arduino pins 2-8 via 220Ω resistors.
2. Connect the Common Cathode (CC) to GND
4. PROCEDURE: DRAW CIRCUIT DIAGRAM AND WRITE CODE USING 7 SEGMENT DISPLAY
Step 2: Software (Arduino IDE) Setup Write code:
Step 3: Testing and observations
TESTING OBSERVATION - LED STATUS
The 7-segment display successfully
shows digits as programmed.
5. PRECAUTIONS
Proper Connections: Double-check connections before powering the circuit.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. What is the difference between Common Cathode and Common Anode 7-segment
displays?
3. Why are resistors used with each segment?
4. How can you display the letter "A" on a 7-segment display?
5. What happens if you connect a segment directly to Arduino without a resistor?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 14
1. TITLE/TOPIC
Write a program & construct circuit for interfacing a LCD with Microcontroller.
2. COMPONENTS/EQUIPMENT REQUIRED
Arduino Uno Board
PC with Arduino IDE
lcd1602 Display
220-ohm Resistor
Jumper Wires
USB Cable
3. THEORY
An LCD (Liquid Crystal Display) is
used to display alphanumeric characters. The most popular LCD is the 16×2 LCD, which
has two rows with 16 rectangular areas or characters. There are also other sizes like
16×1, 16×4, 20×4 and so on, but they all work on the same principle. Uses the HD44780
controller for communication.
It operates in 4-bit (uses 6 data pins) or 8-bit (uses 11 data pins) data mode. It requires
6 data pins (4-bit mode) or 11 pins (8-bit mode).
The LCD1602 comes in 2 possible configurations: I2C configuration and standard
4. PROCEDURE: WRITE CODE USING 7 SEGMENT DISPLAY
DRAW CIRCUIT DIAGRAM
TESTING AND OBSERVATIONS
Understand the wiring and note down the different of function (methods) of
LiquidCrystal.h library used in this code.
Verify that the LCD displays:
Line 1: "Assalamualikum!"
Line 2: "Welcome to my institute"
5. PRECAUTIONS
1. Correct Wiring: Ensure RS, E, and D4-D7 are properly connected.
2. Backlight Resistor: Always use a 220Ω resistor for the backlight.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. Why is a pull-down resistor necessary with a push button?
3. What is the purpose of the RS pin?
4. How can you scroll text on the LCD?
5. What happens if the RW pin is connected to +5V instead of GND?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________
PRACTICAL NO. 15
1. TITLE/TOPIC
Write a program & construct circuit Using ADC of Microcontroller and Display Output
on 7-Segment/LCD.
2. OBJECTIVE
After performing this practical, students will be able to:
• Interface an Analog Potentiometer with Arduino.
• To read an analog voltage using the ADC (Analog-to-Digital Converter) of an
Arduino Uno, and display the digital output on LCD.
3. COMPONENTS/EQUIPMENT REQUIRED
• Arduino Uno Board
• PC with Arduino IDE
• Potentiometer (10kΩ)
• lcd1602 Display
• 220-ohm Resistor
• Jumper Wires
• USB Cable
4. THEORY
Arduino Uno has a 10-bit ADC (0-1023) on pins [Link] analog voltage (0-5V) to
a digital value (0-1023). As ADC provide digital output which is proportional to analog
value. To convert this digital value to analog input voltage,
Analog out = digital value * (Vref/2^n – 1)
e.g. digital value = 512 and ADC is 10-bit with 5V Vref. But, we want to know that
for what analog voltage it is giving respective digital value. Then,
Analog out = 512 * (5 V / 1023)
= 2.5 V
4. PROCEDURE: WRITE CODE
DRAW CIRCUIT DIAGRAM
TESTING AND OBSERVATIONS
S No Digital Value on LCD Digital Voltage on LCD
1. 0.0 0.00 V
2. 254 1.24 V
3.
5.
6. 1023
5. PRECAUTIONS
ADC Range: Ensure input voltage ≤ 5V to avoid damage.
Resistors: Use 220Ω for 7-segment LEDs.
LCD Contrast: Adjust potentiometer for clarity.
6. RESULT/DISCUSSION
1. What have you learned from this activity?
2. Why is a potentiometer used with the LCD? ?
3. How does Arduino’s 10-bit ADC work?
4. What happens if the potentiometer exceeds 5V?
5. How can you improve ADC accuracy?
PNO: __________ Student Name: ______________________________
Instructor Signature: _________________________________________