توجه کنید که باید در کدویژن باید پایه های I2C را تعیین کنید.
برای کدویژن پایین 2.5.3 باید از کد زیر استفاده کنید:
#asm
   .equ __i2c_port=0x0B ;PORTD
   .equ __sda_bit=5
   .equ __scl_bit=6
#endasm

و برای کدویژن بالای 2.5.3 باید در پروژه بنویسید.

بعد به یه رشته نیاز داریم پس:

char buff[40];

تابع بعدی:

LCD_Clear();

او ال ای دی رو پاک میکنه.

داشت یادمم میرفت کتابخانه زیر رو هم اضافه کنید:

#include <stdio.h>
تابع بعدی...
LCD_Goto(0,0);

مکان نمایش متن رو  انتخاب میکنه.(الان به مکان 0.0 میره)

تابع بعدی...

LCD_Printf(X,W);

نمایش متن

W:اندازه متن

X:نام رشته.

خوب برای نمایش یک رشته باید این طور بنویسید:

char buff[40];  
sprintf(buff,"متن مورد نظر");
LCD_Printf(buff,0);

تابع بعدی...

LCD_DrawImage();

نمایش عکس.

اول با نرم افزار glcd_editor عکس مورد نظر را به کد تبدیل کرده و اسم آرایه عکس را درون پرانتز بدهید.

پروژه نمونه:

#include <mega328p.h>
#asm
   .equ __i2c_port=0x0B ;PORTD
   .equ __sda_bit=5
   .equ __scl_bit=6
#endasm
#include <i2c.h>
#include <stdio.h>
#include "ssd1306.c"
char buff[40];
flash unsigned char AVR[1026] =
{
0x00,0xFE,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0xFE,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0xFF,
0xFF,0x07,0x1E,0x38,0x60,0xC0,0x60,0x30,
0x1E,0x07,0xFF,0xFF,0x00,0x00,0xFF,0xFF,
0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x00,
0x00,0xFC,0xFC,0x06,0x03,0x03,0x83,0x83,
0x83,0x8F,0x8E,0x00,0x00,0xF0,0xF8,0x8C,
0x84,0x86,0x83,0x83,0x83,0x86,0x8C,0x8C,
0xF8,0xF0,0x00,0x00,0x80,0x80,0x80,0x80,
0x80,0x80,0x00,0x00,0xF0,0xF8,0x9C,0x8C,
0x86,0x87,0x83,0x83,0x87,0x8E,0x9C,0xF8,
0xF0,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,
0x00,0x00,0xFC,0xFE,0x83,0x83,0x83,0x83,
0x83,0x83,0x83,0xFE,0x3C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0xFF,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,
0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0xC1,0x00,
0x00,0x1F,0x3F,0x70,0xE0,0xC0,0xC1,0xE1,
0x31,0x3F,0x0F,0x00,0x00,0xFF,0xFF,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0xFF,0xFF,0x00,0x00,0x01,0x01,0x01,0x01,
0x01,0x01,0x00,0x00,0xFF,0xFF,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0xFF,
0xFF,0x00,0x00,0x03,0x0F,0x18,0x30,0x60,
0xC0,0x80,0x80,0xC0,0x70,0x18,0x0F,0x03,
0x00,0x00,0xFF,0xFF,0x01,0x01,0x03,0x07,
0x0D,0x39,0x71,0xC0,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x80,0xC0,0xC0,0xC0,0xC0,0xC0,
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x20,0x60,0xC0,0xC0,0x80,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
0xC0,0xC0,0x20,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xE0,0xF8,0x3C,0x1E,
0x06,0x03,0xC1,0x61,0x20,0x20,0x60,0xC0,
0x00,0x00,0x00,0x80,0xC0,0x41,0x41,0xC1,
0x03,0x03,0x03,0x06,0x1C,0x18,0x38,0x70,
0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x01,
0x03,0x06,0x0C,0x18,0x30,0xE0,0xC0,0xC0,
0xC0,0xE0,0x30,0x18,0x0C,0x06,0x03,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,
0x0F,0x0E,0x1C,0x3C,0x78,0x78,0xF0,0xF0,
0xE0,0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,
0x00,0x00,0x80,0x80,0xC0,0xE0,0xE0,0xF0,
0xF8,0xF8,0xFC,0xFC,0x7E,0x1F,0x0F,0x03,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xF8,0xFF,0x03,0x00,0x00,0x00,
0x80,0x87,0x8D,0x0C,0x09,0x0C,0x06,0x03,
0x00,0x00,0x1F,0x11,0x12,0x18,0x0C,0x87,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,
0x7F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0x03,0x03,0x03,0x03,0x03,0x03,
0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x81,
0xC3,0xE7,0xE7,0xFF,0xFF,0xFF,0xFF,0xFE,
0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xCF,0x87,0x83,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,
0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0F,0x1F,0x7C,0xF8,0xC0,0x80,
0x81,0x87,0x8D,0x8B,0x0A,0x1A,0x16,0x14,
0x14,0x14,0x14,0x14,0x16,0x1B,0x0D,0x07,
0x81,0x80,0xC0,0xE0,0x78,0x3E,0x1F,0x07,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0xC0,0xC0,0xE0,0xF0,0xF0,
0xF8,0xFC,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xBF,0x9F,0x8F,0x87,0x8F,0x9F,0xBF,
0xBF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFE,0xFC,
0xFC,0xF8,0xF0,0xF0,0xE0,0xE0,0xC0,0xC0,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,
0x00,0x7F,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x41,
0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,
0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,
0x41,0x41,0x41,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,
0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,
0x41,0x41,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0x40,0x40,0x40,0x40,0x40,0x7F,0x00
};  
void main(void)
{
i2c_init();
LCD_init();
LCD_DrawImage(AVR);
delay_ms(5000);
LCD_Clear();
LCD_Goto(0,0);
sprintf(buff,"micro1386.blog.ir");
LCD_Printf(buff,0);
delay_ms(5000);
LCD_Clear();
LCD_Goto(0,0);
sprintf(buff,"سلام");
LCD_Printf(buff,0);
delay_ms(5000);
LCD_Clear();
while (1)
      {
}
}