Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi

8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi

8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi:

Embedded system k bahut se projects m LCD display ka use hota h jisme hm project k parameters or bahut si related important content ki information LCD se dekhte rhte hein, isliye m yha “8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi” article publish kr rha hu jisse koi bhi student yaa businessmen apne electronic project ko or achhe se design kr sake.
Electronics se related abhi tk sabhi websites (Blogs) sirf English
language m hi hein, lekin mene students ki help krne k purpose se Hindi language m electronics ko describe kiya h taaki logo ko or deeply knowledge ho sake or unke criticle concepts bhi clear ho sake.

How to fix internet connection problem on Android in Hindi

 

8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi

 

Jab aap properly LCD ko microcontroller se interface krana sikh jayenge to aap bahut easily embedded related projects design krna start kr sakte hein or ye jyada muskil bhi nhi h jaise k Digital Temperature indicator/Controller, Digital voltmeter/Ammeter, Digital clock, Home automation display etc.

Ab aap LCD k kisi bhi part m koi bhi text display krva sakte hein jab aap achhe se interfacing sikh jayenge, to chaliye sabse pehle article “8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi”16×2 LCD k baare m kuch jaante hein.

 

16×2 LCD module

16×2 LCD module bahut hi common type ka LCD module h jo jyadatr 8051 based embedded projects m use ki jaati h. Isme 6 rows or 2 columns k 5×7 or 5×8 k dot matrices hote hein. M yha pr JHD162A model ki LCD k baare m baat kr rha hu jo k bahut jyada popular LCD h.
Isme 16 pins hoti hein jisme back light or contrast adjustment function bhi hota h.

LCD (JHD162A) ki Pin details:

Pin 1:  VSS   : Ye pin Ground terminal se connect hoti h.
Pin 2: VCC   : Postive supply voltage (+5 volt)
Pin 3: VEE    : Contrast adjustment k liye
Pin 4: RS       : Register selection k liye
Pin 5: R/W    : LCD se Read krne or LCD m write krne k liye
Pin 6: E         : LCD ko enable or disable krne k liye
Pin 7: D0      : Data pin
Pin 8: D1      : Data pin
Pin 9: D2      : Data pin
Pin 10: D3    : Data pin
Pin 11: D4    : Data pin
Pin 12: D5    : Data pin
Pin 13: D6    : Data pin
Pin 14: D7    : Data pin
Pin 15: LED+ : Backlight +5V
Pin 16: LED- : Backlight 0V

Contrast adjust: Pin 3 VEE se voltage ko adjust krke LCD ki contrast ko vary kiya jata h.
Iske liye hme ek variable resistor (Pot) lena hoga jisme 3 pins hoti hein, Pot ki ek pin ko +5 volt se, third pin ko ground se or center ki pin ko VEE se connect krna hoga.

Data & command: JHD162A LCD m 2 register hote hein Data register or Command register. Data register se kisi bhi data ko LCD pr display kiya jaate h or command resgister se LCD ko command di jaati h.
LCD ko command dene k liye ek particular code hota h jiska ek particular work hota h jiske baare hm abhi baad m baat krenge.
Agr hm RS pin ko High logic (+5V) pr select krte hein to Data register select ho jaayega or agr RS pin ko Low logic (0V) pr select krte hein to Command register select ho jaata h.
Jab hm RS pin ko High krke Data pins (D0-D7) pr koi data enter krate hein to LCD us data ko display pr show krne lagti h or jab hm RS pin ko Low krke data pins (D0-D7) pr data enter krte hein to ye LCD k liye command jaati h k LCD ko ab kya krna h.

R/W pin se LCD ko Read yaa Write mode m select krte hein.
R/w pin: High logic (+5V) : Read mode
R/w pin: Low logic (0V) : Write mode

E pin pr High to Low pulse dene pr LCD enable ho jaati h.

D0-D7 data pins hein jinko data or command dene k liye data inhi pins pr enter kiya jata h.

LED+ ko +5Volt se connect kre.
LED- ko ground (0Volt) se connect kre. Is se LCD ki Backlight bhi ON ho jayegi.

 

16×2 LCD module ki commands:

Yha LCd ki command list h or sabhi values Hexadecimal m hein.

0F :  LCD ON, Cursor ON, Cursor blinking ON
01 :  Clear screen
02 :  Return home
04 :  Decrement cursor
06 :  Increment cursor
0E :  Display ON ,Cursor blinking OFF
80 :  Force cursor to the beginning of 1st line
C0 :  Force cursor to the beginning of 2nd line
38 :   Use 2 lines and 5×7 matrix
83 :   Cursor line 1 position 3
3C :  Activate second line
08 :   Display OFF, Cursor OFF
C1 :  Jump to second line, position1
OC :  Display ON, Cursor OFF
C1 :  Jump to second line, position1
C2 :  Jump to second line, position2

 

LCD ko initialize kaise kre:

LCD ko use krne k liye sbse pehle use initialize krna hota h jiske baad hm koi bhi data us pr print kra sakte hein.
LCd ko initialize krne k staps follow kijiye.

* LCd ki Data pins (Do-D7) pr 38H send kre (Note: H means Hexadecimal).
* LCD ko ON krne k liye ab 0FH send kre.
* Cursor position k liye 06H send kre.
* Display clear krne k liye 01H send kre.

LCD pr data kaise send kre:

LCD ko initialize krne k liye hmne kai instructions LCD ko send kiye to pehle m bta du k aapko pehle ye sikhna h k data send kaise krne hein.

* R/W pin ko Low kre.
* Data display krne k liye RS=1 or Command send krne k liye RS=0 set kre.
* Ab Data byte ko data register m enter kr dein.
* E pin ko High to Low pulse dein (pehle High or fir kuch microsecond ke delay k baad low).
* Jab kabhi bhi koi bhi data yaa command LCD ko send krni ho to yhi steps follow kre.

 

Circuit Diagram:

8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi

 

Is circuit diagram m 16×2 LCD module ko AT89S1 microcontroller se interface kiya gya h.
Capacitor C3, resistor R3 and push button switch S1 Reset circuit bna rhe hein.
Ceramic capacitors C1,C2 and crystal X1 clock generate circuit bna rhe hein.
Microcontroller ki P1.0 to P1.7 pins LCD ki D0-D7 pins se connect hein.
Microcontroller ki P3.3, P3.4 and P3.5 pins LCD ki E, R/W, RS pins se connect hein.
Resistor R1 ko backlight k liye or Pot R2 ko LCD ki contrast adjust krne k liye lgaya gya h.

 

C Program:

#include<reg52.h>
#define dataport P1
sbit rs= P3^5;
sbit rw= P3^4;
sbit e= P3^3;
void delay (unsigned int msec);
void lcd_cmd (unsigned char item);
void lcd_data (unsigned char item);
void lcd_data_string (unsigned char *str);

void delay (unsigned int msec)
{
int a,b;
for(a=0;a<msec;a++)
for(b=0;b<1275;b++)
{
}
}
void lcd_cmd (unsigned char item)
{
dataport =item;
rs=0;
rw=0;
e=1;
delay(1);
e=0;
}
void lcd_data (unsigned char item)
{
dataport =item;
rs=1;
rw=0;
e=1;
delay(1);
e=0;
}
void lcd_data_string (unsigned char *str)
{
int i=0;
while (str[i]!=’\0′)
{
lcd_data (str[i]);
i++;
delay(1);
}

}
void main ()
{
lcd_cmd (0x38);
lcd_cmd (0x0c);
delay(2);
lcd_cmd(0x01);
delay(2);
lcd_cmd (0x80);
delay(2);
lcd_data_string (“Start”);
delay(20);

}

Download C program File: Lcd.c

Ye program mene khud hi develop kiya h jab m Electronics R&D department m working tha, vaise to isme koi bhi problem nhi h kyuki ye already tested h or agr apko isko download krne m koi bhi problem aati bhi h to aap mujhe comment box m comment kr sakte hein yaa fir mujhe mail yaa whatsup bhi kr sakte hein, m surely help krunga. Circuit diagram k according hi apna circuit design kre or haan m jaldi hi ek article or publish krunga or usme hm baat krenge k microcontroller m C program
ko kaise download kiya jaata h.

Ummid krta hu k “8051 Microcontroller ko 16×2 LCD se kaise interface kre in Hindi” article aapko pasand aaya hoga.

 

Thanks a lot to be BusinessBharat Blog Reader…

Hope you enjoy & Learn..!!

2 Comments

  1. ritesh July 18, 2018
    • Deepanshu Saxena July 19, 2018

Leave a Reply