interfacing lcd with 8051 using keil c at89c51


Posted on Feb 7, 2014

16G—2 character lcd display is very basic module which is commonly used in electronics devices and projects. It can display 2 lines of 16 characters. Each character is displayed using 5G—7 or 5G—10 pixel matrix. Interfacing 16G—2 LCD with 8051 using Keil C is bit complex because there is no powerful libraries in Keil C. To solve this problem we have developed a


interfacing lcd with 8051 using keil c at89c51
Click here to download the full size of the above Circuit.

LCD library which includes commonly used features, you just need to include our header file and use it. You can download the header file at the bottom of this article. LCD can be interfaced with microcontroller in 4 Bit or 8 Bit mode. These differs in how data is send to LCD. In 8 bit mode to write a character, 8 bit ASCII data is send through the data lines D0 D7 and data strobe is given through E of the LCD. LCD commands which are also 8 bit are written to LCD in similar way. But 4 Bit Mode uses only 4 data lines D4 D7. In this mode 8 bit character ASCII data and command data are dividedintotwo parts and send sequentially through data lines. The idea of 4 bit communication is used save pins of microcontroller. 4 bit communication is a bit slower than 8 bit communication but this speed difference can be neglected since LCDs are slow speed devices. Thus 4 bit mode data transfer is most commonly used. //LCD Module Connections sbit RS = PO0; sbit EN = P0; sbit D0 = P2; sbit D1 = P2; sbit D2 = P22; sbit D3 = P2; sbit D4 = P2; sbit D5 = P2; sbit D6 = P2; sbit D7 = P2; //End LCD Module Connections Lcd8_Set_Cursor() & Lcd4_Set_Cursor() : These functions are used to set the cursor position on the lcd screen. By using this function we can change the position of character and string displayed by the following functions.




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    LED Sensor Electronic Tracker with H-Bridge Drive
    Butterfly Mixer Circuit
    Ultra-high gain audio amplifier
    Intercom
    Audio-circuit-bridge
    SCR to make a small solid state tesla coil
    The light theremin
    GPS Jammer



    Top