LCD -8051

  • MICROCONTROLLER - AT89S51 
  • COMPILER - MIKROC
  • SIMULATION - PROTEUS 8.1
  • CRYSTAL - 4MHz


CIRCUIT

PROGRAM


sbit LCD_RS at P2_0_bit;

sbit LCD_EN at P2_1_bit;

sbit LCD_D4 at P2_2_bit;

sbit LCD_D5 at P2_3_bit;

sbit LCD_D6 at P2_4_bit;

sbit LCD_D7 at P2_5_bit;

// End Lcd module connections


void main()

{

Lcd_Init(); // Initialize Lcd

Lcd_Cmd(_LCD_CLEAR); // Clear display

Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off

Lcd_Out(1,6,"haii"); // Write text in first row
while(1) ;

}