Valid statements accepted by HD44780 Lcd controller
Valid Data accepted by HD44780 lcd controller
Special characters accepted by Hd44780 ccontroller
Hd44780 reserves a space of 64 bytes in its ROM(read only memory). We can generate special 8 custom characters in this ram and invoke them to display on lcd when desired. The size of individual custom character is a 5×8 matrix. Where 5 represents number of coulombs and 8 represents number of rows. Custom characters are independent of shape we can make a shape of our desired look in 5×8 dot matrix.
|
Some of the tutorial/projects related to this tutorial are
Valid commands accepted by HD44780 lcd controller
Now how to send data and commands/data to lcd? Below is a small code which can help you to understand the difference between commands and data send to lcd.
The scenario is that i have microcontroller. Lcd rs(register select) ,rw(read/write) ,en(enable) pins are connected to pins 5 , 6 , 7 of microcontroller.
sbit rs = P3^7; //External controller Pin
sbit rw = P3^5; //External controller Pin
sbit en = P3^6; //External controller Pin
- lcdcmd() function is sending commands to lcd.
- lcddata() function is sending data to lcd.
Their is only just difference between the function names and the rs(register select) pin statement. In command function it is 0. In data function it is 1. This is the main difference which you have to understand read the text below very carefully.
Commands and Data send to Lcd
Command and Data send to Lcd Difference with example
lcd commandsvoid lcdcmd(unsigned char value)
{ P1 = value; rs = 0; rw = 0; en = 1; MSDelay(50); en = 0; MSDelay(50); } when we call the lcdcmd() function we put our command in the function such as lcdcmd(0x38). 0x38 is command its description is below. This is an 8-bit command. Its equivalent binary is 01011000. when rs(register set) is zero 0 it means that we selected command register and their is command on the data pins of lcd. |
lcd datavoid lcddata(unsigned char value)
{ P1 = value; rs = 1; rw = 0; en = 1; MSDelay(50); en = 0; MSDelay(50); } when we call the lcddata() function we put our data in the function such as lcddata(‘a’). ‘a’ is a character. This is also an 8-bit data. when rs(register set) is one 1 it means that we selected data register and their is data on data pins.. |
Filed Under: Knowledge Share, Microcontroller Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.