//Program to display special Characters on LCD using AVR Microcontroller (ATmega16) /* To display special character on LCD data LCD DATA port----PORT B ctrl port------PORT D rs-------PD0 rw-------PD1 en-------PD2 using internal clock frequency 1MHz */ #include #include #define LCD_DATA PORTB //LCD data port #define signal PORTD #define en PD2 // enable signal #define rw PD1 // read/write signal #define rs PD0 // register select signal void LCD_cmd(unsigned char cmd); void init_LCD(void); void LCD_write(unsigned char data); void LCD_character(); int main() { DDRB=0xff; DDRD=0x07; init_LCD(); _delay_ms(50); // delay of 50 mili seconds LCD_character(); return 0; } void init_LCD(void) { LCD_cmd(0x38); // initialization of 16X2 LCD in 8bit mode _delay_ms(1); LCD_cmd(0x01); // clear LCD _delay_ms(1); LCD_cmd(0x0E); // cursor ON _delay_ms(1); LCD_cmd(0x80); // ---8 go to first line and --0 is for 0th position _delay_ms(1); return; } void LCD_cmd(unsigned char cmd) { LCD_DATA=cmd; ctrl =(0<