Немножко апнем темку
подключение
Микросхема | Дисплей
PB0 -> RS
PB1 -> RW
PB2 -> E
PB4 -> D4
PB5 -> D5
PB6 -> D6
PB7 -> D7
Код:
#include <mega8.h>
#include <delay.h>
#include <lcd.h>
#asm
.equ __lcd_port=0x18 ;PORTB
#endasm
////////////////////////////////////////////////////////////////////////////////////
short int i;
void main(void)
{
PORTB=0x00;
DDRB=0xFF;
lcd_init(16); //initialization
// Global enable interrupts
#asm("cli") //delay
lcd_gotoxy(0,0); //тут мы шагаем на первую строку к первому символу
lcd_putsf("Технический");
lcd_putsf(" OTDEL");
}