LCD: Page 2 of 2

Entry mode set

This command sets cursor move direction and display shift ON/OFF. There are 4 possible function set commands;04, 05, 06, and 07. This command changes the direction the cursor moves by setting the address counter to increment or decrement. This command is very important. If you do not understand it you may not see anything or what you actually wanted to see on LCD screen. I have created 4 animated gifs to demonstrate what the function set command is all about.

As said earlier if we want to display the text at specific positions of LCD , we require to manipulate address and then to set cursor position accordingly.I want to display "MAHESH" in message "Hi MAHESH" at the right corner of first line then I should start from 10th character.So referring to table 80h+0Ah= 8Ah.

INTERFACING  LCD TO 8051

The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus.

If 4-bit data bus is used, the LCD will require a total of 7 data lines.

If 8-bit data bus is used, the LCD will require a total of 11 data lines.

The three control lines are  EN, RS and RW.

lcd interfacing with 8051 click here

LCD SCREEN

a lcd(16*2) having two row containing 16 character by each each one. the each character consists of either 5*8 or 5*10 dot matrix. our main topic of discussion is limited to most commonly used 5*8 dot matrix display. if you are going to print more than 16 character in a single row your character will be accepted by lcd but you are unable to locate the complete string on lcd.

LCD MEMORY BLOCK

1)DDRAM(display data RAM)

2)CGROM(character generator ROM)

3)CGRAM(character generator RAM)

DDRAM

character to be displayed store in DDRAM. it can contain upto 80 characters some of them directly connected to characters on LCD screen. characters sent from D0-D7 for displaying messaga starts from location 00hex if character appears at a location cursor. cursor will move next address location automatically.

CGROM

lcd has got inbuilt memory map with each character has assign a specific address. if program being executed encounter the character transfers to lcd(transfer 'A' binary 01000001 appears in port) . CGROM match character to address on map as seen in figure result in displaying character 'A' on lcd.

for displaying number on lcd you can see in map it needs to move forward by 48. so in case on displaying number 48 will be added to number relative to their values prior to sent to lcd.

CGRAM

sometimes user needs to create pattern of their choice CGRAM has 64 bytes space where user can make symbol of his choice. A symbol of any size can be created in 5*8 pixel.  so you can at most create 8 custom character at a time.Logic one in every register represents a dimmed dot, while 8 locations grouped together represent one character.

lcd creating custom character click here

Category: 

tags: 

Share

Who's new

  • ravirajpatil871...
  • shubhambajoria
  • yassir
  • demiholyman890954
  • scottgillum51169040

Get Notified

 

Share

We are Social

Syndicate

Subscribe to Syndicate