LCD Screen Control Part 1
Hello friends, Welcome back to my blog. We described the LED bulb display in a previous post. It is very difficult to show what we want with this LED display. The LCD screen we are going to talk about today can easily show everything. It can display letters, symbols, words, etc.
What is an LCD screen?
LCD is a liquid crystal display. This type of display is made by inserting some liquid between two plates. Using these LCDs we can easily see Arduino outputs. Everything shown on the Arduino IDE Serial Monitor can be displayed on this LCD screen. There are two main types of LCD screens. That is a 16*2 and 16*4. Today we will be using a 16 * 2 type LCD display for our project.
We can display 32 characters on this LCD screen. It has 16 pins to provide input. Of these 16 pins, VSS and VDD pins are used to power it. The contrast of the letters can be controlled by the VO pin. For that, It must be powered by a potentiometer. The PIN named RS selects the registry where the data should be stored. The R / W pin should be connected to the GND pin. The enable pin is called the E-pin. That PIN is required to send data. The D0 to D7 pins are used to send data to the LCD screen. All eight pins are used to send data via an 8-bit mode. D4 to D7 pins are used for the 4-bit model. Today we will use the 4-bit mode for this project. The A and K pins are used to turn ON the screen backlight.
Supplies
Let’s do it practically. The required components are as follows.
- Arduino Uno board
- LCD screen
- Potentiometer
- 180ohm resistor
- Jumper wires
- Breadboard
Let’s Look at the Code.
To work with this LCD screen, you must include the LCD library for this. Please include it as follows.
(adsbygoogle = window.adsbygoogle || []).push({});
You will then need to create an object for this library. I created it as ‘dis’.Then we included the used pins. They are in order RS, E, D4, D5, D6, and D7.
The code in the void setting sets the size of the LCD screen used.
You must then specify the location to be displayed on the LCD.
This code can display what we need. This should be written in double quotes.
Step 4
Now, select the board and port. After, click the upload button.
Please change this code and enjoy it.
The following is an improved project of this code. I have not used a potentiometer for that. OK let’s look at this project. The circuit diagram and source code are as follows.
Circuit Diagram
Connect the circuit as shown below.
Source Code
This code includes three functions. Please remove the backslash one by one and run this code. Please watch the video below for more details. We will meet in the next post.
Have a good day.