Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

LCD cursor possition

3 posts / 0 new
Last post
usama
usama's picture
Offline
Last seen: 4 months 2 weeks ago
Joined: 04/07/2016 - 15:05
LCD cursor possition

hellow all

I using 8051 and lcd 16x2. I need curcor possition write under the int or data on lcd like "A " not like this " A _ ".

Please suggest me by example program or any way. 

Ashutosh Bhatt
Ashutosh Bhatt's picture
Offline
Last seen: 1 week 1 day ago
Joined: 21/12/2010 - 15:59
cursor position will be by

cursor position will be by default always where next character to be displayed

if you want then its goint to overwrite the letter everytime

Faroogh
Faroogh's picture
Offline
Last seen: 2 days 20 hours ago
Joined: 24/01/2016 - 19:43
I do not Know Much 8051 But i

I do not Know Much 8051 But i tell you how i did id in avr

 

Suppose  this is 16 x 2 Lcd

 

        Address of First box  on first Line is 0x80              # # # # # # # # # # # # # # # #

         Address of First box  on first Line is 0xC0            # # # # # # # # # # # # # # # #

Before Main Function

 

char colmn[2]={0x80,0xC0};

void SetCursor(uint8_t x,uint8_t y);      \\ X=Row     Y= Colmn

int main()

{

----------------

to go Specific Location 

SetCursor(4,0);  \\4th box in first line

 SetCursor(4,1);  \\4th box in second line

-----------

}

void SetCursor(uint8_t x,uint8_t y)
{
SendCmd(colmn[y]+x);
}