Techno News, How To Unbrick Qualcomm Android Devices, 15 Second ADB Installer Latest Version V1.4.3 Free, Samsung FRP Reset Files Using Odin Flash, ATF Box Full Crack Tool, Facebook Contacts Sync, Miracle Box Latest Setup Full Crack Free, 4 Steps Jcow Social Networking Web Server, Infinity Box Chinese Miracle 2 MTK v 1.58 setup, Miracle Box Crack Latest Version 2.26 Full Setup, Nokia Asha 501 RM-899 Latest Flash File

Senin, 21 Mei 2012

LCD 16x2 interfacing with 8051 4-bit mode

LCD 16x2 interfacing with 8051 4-bit mode - is the information you are looking for in search engines like google and others, okay we have provided such information in the blog Techno News, we have around collecting information from various reliable sources and presenting it in this blog, well please read LCD 16x2 interfacing with 8051 4-bit mode to finish:

Articles : LCD 16x2 interfacing with 8051 4-bit mode
full Link : LCD 16x2 interfacing with 8051 4-bit mode
Article Embedded Zone,

You can also see our article on:


LCD 16x2 interfacing with 8051 4-bit mode



Hi,
today we are interface LCD(16x2) with 4 bit mode.
hear we are using tow good software keil and proteus same as older post lcd interfasing.





This article explains interfacing of LCD with 8051 using 4-bit mode. In this mode only four pins are used for sending data and command instructions. This mode has the advantage over the 8-bit mode as it uses less number of pins. The remaining pins of the controller are available for normal use.

The Data or command is sent in nibble form (1 nibble= 4 bit) in the 4-bit mode. The higher nibble is sent first followed by the lower nibble. The function of RS, RW and EN pins remains similar to 8-bit mode.

Circuit description: 
Connections of LCD with 8051 are shown in circuit diagram. In 4-bit mode, the Data lines must be connected with D4, D5, D6 and D7 pins of LCD module.

Initialization: 
The LCD can be configured in 4-bit mode by sending appropriate instruction which is called “Function set” to it. The Function set is hexadecimal instruction for LCD MPU unit, which selects working modes of LCD. The “Function Set” is mentioned in following table:

Instruction
Rs
Rw
D7
D6
D5
D4
D3
D2
D1
D0
Function set
0
0
0
0
1
DL
N
F
-
-
  
Description: 
DL - Data Length (DL = 1 8bit, DL = 0 4bit)
N - No. of Lines (N = 1 2Lines, N = 0 1Lines)
F - Fonts (F = 1 5x10 dots, F = 0 5x7 dots)

According to table, the value of Function Set for 4 –bit mode will be 0010 0000(0x20) because DL=0. The value “Function Set” for the LCD configuration 2 line (N=1), 5X7 dots (F=0) and 4-bit (DL=0) mode will be 0010 1000(0x28).

When the power supply is given to LCD, it remains in 8-bit mode. Now, if 0x20 is sent, lower nibble will not be received by LCD because four data lines (D4-D7) are connected, so 0x02 is sent instead of 0x20.

now simple program for LCD :

LCD.C

#include <reg51.h>
#include <lcd.h>

void main()
{

lcdinit();
lcddatas(1,"ramoliyabiren");
lcddelay(50);
lcdrotade(1,'r',"ikkemunandar.blogspot.com");
lcdblink(5,"Computer Zone");
while(1) {}


LCD.H

/*

Hi I am Ramoliya Biren.
this program is open use.
for using this hader file.
u need to add this lcd.h in you are source group in keil.
for using fxn

lcddatas(row no,"DATA which u need to desplay"); for desplay string on lcd

lcddata("data(only single char) which u need to desplay on lcd")

lcdblink(no of time u wont to blink data,"data which u wont to blink"); hear data desplay on row 1 only

lcdrotade (row no,'direction of rotaed l or r',"data which u wont to rotaed");

visit : http://ikkemunandar.blogspot.com/

*/

#ifndef _leddatas_H
#define _leddatas_H

#include <reg51.h>

sfr ldata = 0xA0;
sbit rs = P3^2;
sbit rw = P3^3;
sbit en = P3^4;

void lcddelay (unsigned int itime)
{
 unsigned int i,j;
 for(i=0;i<itime;i++)
 for(j=0;j<1275;j++);
}

void lcdcmd(unsigned char value)
{
 ldata = value;
 rs = 0;
 rw = 0;
 en = 1;
 lcddelay(1);
 en = 0;
}

void lcddata (unsigned char value)
{
 ldata = value;
 rs = 1;
 rw = 0;
 en = 1;
 lcddelay(1);
 en = 0;
}

void lcdinit()
{
 lcdcmd(0x0e);
 lcdcmd(0x01);
 lcdcmd(0x80);
 lcddelay(50);
}

void lcdrow(unsigned char no)
{
 if (no == 1)
 {
  lcdcmd(0x80);
 }
 if (no ==2)
 {
  lcdcmd(0xC0);
 }
}

void lcddatas (unsigned char row,unsigned char *lcdstring)
{
 lcdrow(row);
 while (*lcdstring) 
 {
  lcddata(*lcdstring++);
 }
}

void lcdblink(unsigned char no,unsigned char *lcdstring)
{
 unsigned char j;
 for(j=0;j<no;j++)
 {
 lcdcmd(0x01);
 lcddelay(50);
 lcddatas(1,lcdstring);
 lcddelay(50);
 }
}

void lcdrotade(unsigned char no,unsigned char dir,unsigned char *lcdstring)
{
 unsigned char i;
 lcddatas(no,lcdstring);
 if (dir == 'l')
 {
  for (i=0;i<16;i++)
  {
  lcddelay(100);
  lcdcmd(0x18);
  }
 }
 if (dir == 'r')
 {
  for (i=0;i<16;i++)
  {
  lcddelay(100);
  lcdcmd(0x1C);
  }
 }
}

#endif 


         U can also download all sour coda and also emulation file from here.

so keep exploring 8051.....

see video of emulation 




Information about the LCD 16x2 interfacing with 8051 4-bit mode has been discussed

A few of our information about the LCD 16x2 interfacing with 8051 4-bit mode, hopefully give more knowledge for you

You have finished reading LCD 16x2 interfacing with 8051 4-bit mode and many articles about Techno News in our blog this, please read it. and url link of this article is https://ikkemunandar.blogspot.com/2012/05/lcd-16x2-interfacing-with-8051-4-bit.html Hopefully discussion articles on provide more knowledge about the world of new tech gadgets and Techno News.

Tag : ,
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : LCD 16x2 interfacing with 8051 4-bit mode

4 komentar:

  1. It has always been mankind goal to have the world connected to each other. Pets have always been the big deal and have always been closest to humans. We keep looking for ways to have them come closest to us. Puppies and Kittens have always been the call for the day. lets see how we can learn new techniques on how to get your pets closest to us. Below is the link to our website and feel free to drop off what you think can be of help to us all.
    siamese kittens for sale
    siamese cats for sale
    siamese kittens
    siamese kittens for sale near me
    siamese cat for sale near me
    siamese kittens
    siamese kitten

    BalasHapus
  2. It has always been mankind goal to have the world connected to each other. Pets have always been the big deal and have always been closest to humans. We keep looking for ways to have them come closest to us. Puppies and Kittens have always been the call for the day. lets see how we can learn new techniques on how to get your pets closest to us. Below is the link to our website and feel free to drop off what you think can be of help to us all.
    siamese kittens for sale
    siamese cats for sale
    siamese kittens
    siamese kittens for sale near me
    siamese cat for sale near me
    siamese kittens
    siamese kitten

    BalasHapus
  3. It has always been mankind goal to have the world connected to each other. Pets have always been the big deal and have always been closest to humans. We keep looking for ways to have them come closest to us. Puppies and Kittens have always been the call for the day. lets see how we can learn new techniques on how to get your pets closest to us. Below is the link to our website and feel free to drop off what you think can be of help to us all.
    siamese kittens for sale
    siamese cats for sale
    siamese kittens
    siamese kittens for sale near me
    siamese cat for sale near me
    siamese kittens
    siamese kitten

    BalasHapus