void lcd_init(void) { LCD_PORT |= _BV(LCD_CS); LCD_DIR |= _BV(LCD_CS); port_init_io(); wrtab(init1, 24); _delay_ms(7); wrtab(init2, 40); _delay_ms(50); wrtab(init3, 2); LCD_PORT &= ~_BV(LCD_CS); // select Display lcd_wrcmd(0xEF); lcd_wrcmd(0x90); lcd_wrcmd(0x00); lcd_wrcmd(0x00); } void port_init_io(void) { LCD_PORT &= ~_BV(LCD_RESET); LCD_DIR |= _BV(LCD_RESET); LCD_DIR |= _BV(LCD_DAT); LCD_PORT |= _BV(LCD_CS); LCD_DIR |= _BV(LCD_CS); LCD_PORT &= ~_BV(LCD_CLK); LCD_DIR |= _BV(LCD_CLK); LCD_PORT |= _BV(LCD_RS); LCD_DIR |= _BV(LCD_RS); _delay_ms(50); LCD_PORT |= _BV(LCD_RESET); _delay_ms(10); SPSR |=(1<