moen 发表于 2008-12-31 13:15:31

ILI9325和ILI9320的液晶驱动上有什么区别?【恢复】

手上有块9325的LCD(320×240,2.8寸的),看到的大家用的大多是9320的,所以请教一下ILI9325和ILI9320的液晶驱动上有什么区别?拿9320的驱动改成9325的驱动可方便
谢谢~

thinkker 发表于 2008-12-31 18:05:49

记号~

moen 发表于 2008-12-31 16:41:02

好的,谢谢这位兄弟~

colaring 发表于 2008-12-31 13:45:45

貌似是初始化时 屏幕翻转有点不同 其他不记得了
我的代码  兼容ili9320和ili9325 基于STM32F103的驱动  

点击此处下载 ourdev_566403.rar(文件大小:7K) (原文件名:ili932x驱动.rar) 

zjn8888 发表于 2009-4-24 17:04:31

ILI9320与ILI9325用的都挺多的

020411 发表于 2010-3-2 15:43:31

谢谢!收藏

020411 发表于 2010-3-2 15:45:40

正好有STM32F的开发板,哈哈

clever0725 发表于 2010-3-3 20:33:47

正想用

heicad 发表于 2010-9-12 00:45:28

除了初始化时 屏幕翻转有点不同还有其他什么不同呢?

ntwhq 发表于 2010-10-14 15:52:35

也想了解这个问题

xing_jian 发表于 2010-10-20 14:14:54

回复【1楼】colaring 十月天高人浮躁
-----------------------------------------------------------------------

感谢,正在研究这个

sunchao151 发表于 2010-11-12 12:56:22

mark

myqiang1990 发表于 2010-11-12 13:15:37

基本差不多。。我用9325。。。

weiaiwuxian 发表于 2011-2-23 16:45:19

我就用的9325的屏但是现在就是一直白屏不知道是什么原因,程序如下:请高手帮我看看我的问题出在什么地方 了
#include <iom128v.h>
#include <macros.h>

//CS:PG4 /RS:PG3 /WR:PG0 /RD:PG1 /RST:PG2 /8位模式PG


#defineLCD_nCS(x)   if(x==1) PORTG|=BIT(PG4);else PORTG&=~BIT(PG4)       
#defineLCD_nRD(x)   if(x==1) PORTG|=BIT(PG1);else PORTG&=~BIT(PG1)
#defineLCD_nWR(x)   if(x==1) PORTG|=BIT(PG0);else PORTG&=~BIT(PG0)
#defineLCD_RS(x)      if(x==1) PORTG|=BIT(PG3);else PORTG&=~BIT(PG3)
#defineLCD_nRST(x)    if(x==1) PORTG|=BIT(PG2);else PORTG&=~BIT(PG2)

#define RED   0xf800
#define GREEN   0x07e0
#define BLUE    0x001f
#define WHITE   0xffff
#define BLACK   0x0000
#define YELLOW0xFFE0
void delay_ms(unsigned char i)
{

        unsigned char a, b;
        for (a = 1; a < i; a++)
        {
                for (b = 1; b; b++);
        }
}
void writecom(unsigned int ch)//写指令
{

        LCD_nCS(0);//CS低
        LCD_RS(0);//RS低
        //delay_ms(5);
        LCD_nRD(1);
        PORTA=(unsigned char)(ch>>8);//赋值高八位
        LCD_nWR(0);//WR低
        //delay_ms(5);
        asm("nop");//这个有没有都可以,仿真的时候用的
        //PORTA=ch>>8;//赋值高八位
        LCD_nWR(1);//WR高
       
        PORTA=(unsigned char)(ch&0x00ff);//赋值低八位
        LCD_nWR(0);//WR低
        asm("nop");
        //PORTA=ch&0x00ff;//赋值低八位
        LCD_nWR(1);//WR高
       
        LCD_nCS(1);//CS高
}

void writedata(unsigned int dh)//写数据
{
        LCD_nCS(0);//CS低
        LCD_RS(1);//RS高
        LCD_nRD(1);
        PORTA=(unsigned char)(dh>>8);
        LCD_nWR(0);//WR低
        asm("nop");
        //PORTA=dh>>8;
        LCD_nWR(1);//WR高
       
        PORTA=(unsigned char)(dh&0x00ff);
        LCD_nWR(0);//WR低
        asm("nop");
        //PORTA=dh&0x00ff;
        LCD_nWR(1);//WR高
       
        LCD_nCS(1);//CS高
       
}


void main_w_c_d(unsigned int com1, unsigned int data)//写指令&数据
{        
        writecom(com1);
        writedata(data);
}

void addset(unsigned int x1,unsigned int y1,unsigned x2,unsigned y2)
{
    main_w_c_d(0x0020,x1);//设置X坐标位置
    main_w_c_d(0x0021,y1);//设置Y坐标位置
    main_w_c_d(0x0050,x1);   //开始X
    main_w_c_d(0x0052,y1);//开始Y
    main_w_c_d(0x0051,x2);//结束X
    main_w_c_d(0x0053,y2);//结束Y
    writecom(0x0022);
}
void LCD9325_Init()
{
        LCD_nRST(1);
        delay_ms(1);
        LCD_nRST(0);//RST复位
        delay_ms(10);
        LCD_nRST(1);
        delay_ms(50);
        //LCD_nCS(0);//CS低
main_w_c_d(0x00E3, 0x3008); // Set internal timing
main_w_c_d(0x00E7, 0x0012); // Set internal timing
main_w_c_d(0x00EF, 0x1231); // Set internal timing
main_w_c_d(0x0001, 0x0100); // set SS and SM bit
main_w_c_d(0x0002, 0x0700); // set 1 line inversion
main_w_c_d(0x0003, 0x1000); // set GRAM write direction and BGR=1.
main_w_c_d(0x0004, 0x0000); // Resize register
main_w_c_d(0x0008, 0x0207); // set the back porch and front porch
main_w_c_d(0x0009, 0x0000); // set non-display area refresh cycle ISC
main_w_c_d(0x000A, 0x0000); // FMARK function
main_w_c_d(0x000C, 0x0000); // RGB interface setting
main_w_c_d(0x000D, 0x0000); // Frame marker Position
main_w_c_d(0x000F, 0x0000); // RGB interface polarity
//*************Power On sequence ****************//
main_w_c_d(0x0010, 0x0000); // SAP, BT, AP, DSTB, SLP, STB
main_w_c_d(0x0011, 0x0007); // DC1, DC0, VC
main_w_c_d(0x0012, 0x0000); // VREG1OUT voltage
main_w_c_d(0x0013, 0x0000); // VDV for VCOM amplitude
delay_ms(50); // Dis-charge capacitor power voltage
main_w_c_d(0x0010, 0x1490); // SAP, BT, AP, DSTB, SLP, STB
main_w_c_d(0x0011, 0x0227); // DC1, DC0, VC
delay_ms(50); // delay_ms 50ms
main_w_c_d(0x0012, 0x001D); // Internal reference voltage= Vci;
delay_ms(50); // delay_ms 50ms
main_w_c_d(0x0013, 0x1000); // Set VDV for VCOM amplitude
main_w_c_d(0x0029, 0x0026); // Set VCM for VCOMH
main_w_c_d(0x002B, 0x000D); // Set Frame Rate
delay_ms(50); // delay_ms 50ms
main_w_c_d(0x0020, 239);                // GRAM horizontal Address
main_w_c_d(0x0021, 219); // GRAM Vertical Address
// ----------- Adjust the Gamma Curve ----------//
main_w_c_d(0x0030, 0x0007);
main_w_c_d(0x0031, 0x0707);
main_w_c_d(0x0032, 0x0006);
main_w_c_d(0x0035, 0x0704);
main_w_c_d(0x0036, 0x1F04);
main_w_c_d(0x0037, 0x0004);
main_w_c_d(0x0038, 0x0000);
main_w_c_d(0x0039, 0x0706);
main_w_c_d(0x003C, 0x0701);
main_w_c_d(0x003D, 0x000F);
//------------------ Set GRAM area ---------------//
main_w_c_d(0x0050, 0x0000); // Horizontal GRAM Start Address
main_w_c_d(0x0051, 0x00EF); // Horizontal GRAM End Address
main_w_c_d(0x0052, 0x0000); // Vertical GRAM Start Address
main_w_c_d(0x0053, 0x013F); // Vertical GRAM Start Address
main_w_c_d(0x0060, 0xA700); // Gate Scan Line
main_w_c_d(0x0061, 0x0001); // NDL,VLE, REV
main_w_c_d(0x006A, 0x0000); // set scrolling line
//-------------- Partial Display Control ---------//
main_w_c_d(0x0080, 0x0000);
main_w_c_d(0x0081, 0x0000);
main_w_c_d(0x0082, 0x0000);
main_w_c_d(0x0083, 0x0000);
main_w_c_d(0x0084, 0x0000);
main_w_c_d(0x0085, 0x0000);
//-------------- Panel Control -------------------//
main_w_c_d(0x0090, 0x0010);
main_w_c_d(0x0092, 0x0600);
main_w_c_d(0x0093, 0x0003);
main_w_c_d(0x0095, 0x0110);
main_w_c_d(0x0097, 0x0000);
main_w_c_d(0x0098, 0x0000);
main_w_c_d(0x0007, 0x0133); // 262K color and display ON
delay_ms(50);
//LCD_nCS(1);//CS高
}
void pant(unsigned int color)//单一颜色刷屏
{
        int i,j;
        //LCD_nCS(0);//CS高
        addset(0,0,239,319);
        for(i=0;i<319;i++)
        {
                for(j=0;j<239;j++)
                        writedata(color);
        }
        LCD_nCS(1);//CS高
}
/*IO口初始化函数*/
void port_init(void)
{
PORTA = 0xFF;
DDRA= 0xFF;
PORTB = 0x20;
DDRB= 0x20;
PORTC = 0xFF; //m103 output only
DDRC= 0x00;
PORTD = 0x00;
DDRD= 0x00;
PORTE = 0x00;
DDRE= 0x00;
PORTF = 0x00;
DDRF= 0x00;
PORTG = 0x1F;
DDRG= 0x1F;
}

//call this routine to initialize all peripherals
void init_devices(void)
{
//stop errant interrupts until set up
CLI(); //disable all interrupts
XDIV= 0x00; //xtal divider
XMCRA = 0x00; //external memory
port_init();

MCUCR = 0x00;
EICRA = 0x00; //extended ext ints
EICRB = 0x00; //extended ext ints
EIMSK = 0x00;
TIMSK = 0x00; //timer interrupt sources
ETIMSK = 0x00; //extended timer interrupt sources
SEI(); //re-enable interrupts
//all peripherals are now initialized
}
void main(void)
{
        init_devices();                                                                                        /*初始化IO口*/
        //disp_init();                                                                        /*初始显示部*/
        LCD9325_Init();
        pant(0xf800);
        delay_ms(1000);
        PORTB = 0x00;
        while (1)
        {
          //PORTB = 0x00;
       // delay_ms(200);
       // PORTB= 0x20;
       // delay_ms(200);
          pant(0xf800); //红
       // pant(0xf800);//黑
        }
}

onthewayddf 发表于 2011-4-15 15:25:08

9320 白屏中,呵呵

yiya1989 发表于 2011-4-27 13:20:53

9325 白屏中。。。

ad-losophy 发表于 2011-8-29 11:16:46

OK

beihai326 发表于 2011-8-29 14:38:56

听说这两块芯片停产了。。。

ad-losophy 发表于 2011-9-5 15:36:24

回复【17楼】beihai326
-----------------------------------------------------------------------

不是,9325不是很多的。

a305566 发表于 2011-9-20 21:14:30

mark

a305566 发表于 2011-9-20 21:14:51

mark

jackmony 发表于 2011-10-17 15:45:43

感激不尽~

lixupeng 发表于 2012-1-7 14:29:46

mark

AttTiv 发表于 2012-1-11 19:18:32

mark,学习中

gdpuzs 发表于 2012-7-28 07:08:02

{:biggrin:}mark,再求ili9331与ILI9325的驱动的区别?请大神们指点一二,小弟感激不尽——stm32菜鸟

付新辉 发表于 2012-11-28 09:59:57

9331白屏中

stm32_xiaocai 发表于 2012-11-28 22:24:37

我用过SSD1289 1963 ILI9325 9331 R61509没有一块白屏的……

jz701209李 发表于 2013-4-8 22:48:58

学习一下....

zzx19851221 发表于 2014-1-7 10:36:45

看看                                       

DIYdianzi 发表于 2014-1-15 15:43:22

4楼代码很好用,收下了。

chiasyan 发表于 2014-7-2 12:28:44

4楼的代码很好用,谢了!{:biggrin:}

llb126yx 发表于 2015-2-5 16:41:41

下载4搂的代码看看
页: [1]
查看完整版本: ILI9325和ILI9320的液晶驱动上有什么区别?【恢复】