lcd interfacing with 8051 c programming

Discussion in 'Embedded Systems and Microcontrollers' started by khan yousufzai, Sep 1, 2012.

  1. khan yousufzai

    Thread Starter New Member

    Aug 31, 2012
    19
    0
    please anybody send me lcd all commands c programming 8051 microcontroller i use,,,,please also tell me that commands for 16x2 lcd and 16x4 lcd are the same or different
     
  2. madhusuthanan

    New Member

    May 30, 2012
    5
    0
    hi khan yousufzai,
    The commands are same for 16x2 &16x4 but the address are different. the commands are get from google itself.
     
  3. mukesh.sehwag

    New Member

    Oct 16, 2010
    7
    0
    1. 0X38 - Initialization of LCD
    2. 0X0E - Cursor on of LCD means it will show the cursor
    3. 0X01 - It will clear the LCD screen (if already some data has been written)
    4. 0X06 - It will start writing the data from left to right
    or
    0X04 - It will start writing the data from right to left
    Send any one of the two(06 or 04) command to LCD
    5. 0X80 - It will Start the cursor from first row and first column. Change it according to your requirement from 80 to 8F.
    0XC0 - It will start the cursor from second row first column. Change it from C0 to CF (for 16*2)

    For 16*4 only the 5th command will differ.
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Also the correct timing is VERY important. If you write a command to the LCD before it is done with the previous. The LCD will not work properly. The datasheet will inform you about the details regarding this matter
     
Loading...