Microcontroller › 8051 › LCD cursor possition › I do not Know Much 8051 But i
July 28, 2017 at 6:49 pm
#14640
Faroogh
Participant
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);
}