Like the title says, “Arduino LCD interfacing without potentiometer” we are going to interface LCD with Arduino. Interfacing LCD with Arduino is quite an easy task as compared to other development boards. The LCD interfacing requires a potentiometer, which controls the backlight. But it’s hard for noobies to use a potentiometer, as they run into different problems.
So, In this tutorial, we are going to interface LCD with Arduino and without potentiometer. The same tutorial can help you interface LCD with any other board and that too without using potentiometer.
Arduino MFRC522 tutorial – Is RFID tag present or removed?
COMPONENTS REQUIRED:
Arduino UNO | ||
LCD 16×2 | ||
Jumper wires |
VIDEO TUTORIAL:
CIRCUIT DIAGRAM AND EXPLANATION:
Pins Explanation:
The LCD we are using has 16 pins. Which can be categorized as follows,
- DATA PINS ( 8 data pins which are labeled as D0-D7)
- CONTROL PINS ( 3 control pins labeled as RS, RW, and E )
- POWER PINS ( 2 power pins VDD and VSS)
- CONTRAST CONTROL ( 1 Contrast control pin labeled as VEE which defines the thickness of letters )
- BACKLIGHT PINS ( 2 backlight pins labeled as A and K) One can power or leave the backlight pins.
Circuit Explanation:
In the circuit, you can observe we have only taken two control pins, this gives the flexibility. The contrast bit and READ/WRITE are not often used so they can be shorted to ground. This puts LCD in the highest contrast and read mode. We just need to control ENABLE and RS pins to send characters and data accordingly.
The connections which are done for LCD are given below:
PIN1 or VSS to ground
PIN2 or VDD or VCC to +5v power
PIN3 or VEE to ground (gives maximum contrast best for a beginner)
PIN4 or RS (Register Selection) to PIN0 of ARDUINO UNO
PIN5 or RW (Read/Write) to ground (puts LCD in read mode eases the communication for user)
PIN6 or E (Enable) to PIN1 of ARDUINO UNO
PIN11 or D4 to PIN8 of ARDUINO UNO
PIN12 or D5 to PIN9 of ARDUINO UNO
PIN13 or D6 to PIN10 of ARDUINO UNO
PIN14 or D7 to PIN11 of ARDUINO UNO
The Arduino IDE allows the user to use LCD in 4-bit mode. This type of communication enables the user to decrease the pin usage on Arduino, unlike other the Arduino need not be programmed separately for using it in the 4-bit mode because by default the Arduino is set up to communicate in 4-bit mode. In the circuit, you can see we have used 4-bit communication (D4-D7).
So from mere observation from above table we are connecting 6 pins of LCD to controller in which 4 pins are data pins and 2 pins for control.
CIRCUIT DIAGRAM:
Arduino LCD interfacing without potentiometerCODE:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(0, 1, 8, 9, 10, 11); /// REGISTER SELECT PIN,ENABLE PIN,D4 PIN,D5 PIN, D6 PIN, D7 PIN
void setup()
{
// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);
}
void loop()
{
// set the cursor to column 0, line 1
lcd.print(” HIGH VOLTAGES”);//print name
lcd.setCursor(0, 1); // set the cursor to column 0, line 2
lcd.print(“HIGH VOLTAGES”);//print name
delay(750);//delay of 0.75sec
lcd.scrollDisplayLeft();//shifting data on LCD
lcd.setCursor(0, 0);// set the cursor to column 0, line1
}
THAT’S IT:
SUBSCRIBE US ON YOUTUBE,
for any query, you can contact us.