
Make necessary settings and check the display on LCD.

LCD_DATA= data // data lines are set to send commandĬompile the above code and dump the HEX file in AVR microcontroller as described in the previous tutorials.

PORTD |= (1< LCD_write(‘ ‘) // call a function to display space on LCD _delay_ms(100) // delay of 100 Milli seconds #define rs PD5 // register select signal is connected to port D pin 5ĭDRB=0xFF // set LCD data port as outputĭDRD=0圎0 // set LCD signals (RS, RW, E) as out put #define rw PD6 // read/write signal is connected to port D pin 6 #define en PD7 // enable signal is connected to port D pin 7 #define ctrl PORTD // port D is selected as LCD command port #define LCD_DATA PORTB // port B is selected as LCD data port # define F_CPU 16000000UL // clock speed is 16MHz