搜索
bottom↓
回复: 31

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

[复制链接]

出0入0汤圆

发表于 2008-12-31 13:15:31 | 显示全部楼层 |阅读模式
手上有块9325的LCD(320×240,2.8寸的),看到的大家用的大多是9320的,所以请教一下ILI9325和ILI9320的液晶驱动上有什么区别?拿9320的驱动改成9325的驱动可方便
谢谢~

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

发表于 2008-12-31 18:05:49 | 显示全部楼层
记号~

出0入0汤圆

 楼主| 发表于 2008-12-31 16:41:02 | 显示全部楼层
好的,谢谢这位兄弟~

出0入0汤圆

发表于 2008-12-31 13:45:45 | 显示全部楼层
貌似是初始化时 屏幕翻转有点不同 其他不记得了
我的代码  兼容ili9320和ili9325 基于STM32F103的驱动  

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

出0入0汤圆

发表于 2009-4-24 17:04:31 | 显示全部楼层
ILI9320与ILI9325用的都挺多的

出0入0汤圆

发表于 2010-3-2 15:43:31 | 显示全部楼层
谢谢!收藏

出0入0汤圆

发表于 2010-3-2 15:45:40 | 显示全部楼层
正好有STM32F的开发板,哈哈

出0入0汤圆

发表于 2010-3-3 20:33:47 | 显示全部楼层
正想用

出0入0汤圆

发表于 2010-9-12 00:45:28 | 显示全部楼层
除了初始化时 屏幕翻转有点不同  还有其他什么不同呢?

出0入0汤圆

发表于 2010-10-14 15:52:35 | 显示全部楼层
也想了解这个问题

出0入0汤圆

发表于 2010-10-20 14:14:54 | 显示全部楼层
回复【1楼】colaring 十月天高人浮躁
-----------------------------------------------------------------------

感谢,正在研究这个

出0入0汤圆

发表于 2010-11-12 12:56:22 | 显示全部楼层
mark

出0入0汤圆

发表于 2010-11-12 13:15:37 | 显示全部楼层
基本差不多。。我用9325。。。

出0入0汤圆

发表于 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


#define  LCD_nCS(x)     if(x==1) PORTG|=BIT(PG4);else PORTG&=~BIT(PG4)         
#define  LCD_nRD(x)     if(x==1) PORTG|=BIT(PG1);else PORTG&=~BIT(PG1)
#define  LCD_nWR(x)     if(x==1) PORTG|=BIT(PG0);else PORTG&=~BIT(PG0)
#define  LCD_RS(x)      if(x==1) PORTG|=BIT(PG3);else PORTG&=~BIT(PG3)
#define  LCD_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 YELLOW  0xFFE0
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[3:0]
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[3:0], AP, DSTB, SLP, STB
main_w_c_d(0x0011, 0x0007); // DC1[2:0], DC0[2:0], VC[2:0]
main_w_c_d(0x0012, 0x0000); // VREG1OUT voltage
main_w_c_d(0x0013, 0x0000); // VDV[4:0] for VCOM amplitude
delay_ms(50); // Dis-charge capacitor power voltage
main_w_c_d(0x0010, 0x1490); // SAP, BT[3:0], AP, DSTB, SLP, STB
main_w_c_d(0x0011, 0x0227); // DC1[2:0], DC0[2:0], VC[2:0]
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[4:0] for VCOM amplitude
main_w_c_d(0x0029, 0x0026); // Set VCM[5:0] 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);//黑
        }
}

出0入0汤圆

发表于 2011-4-15 15:25:08 | 显示全部楼层
9320 白屏中,呵呵

出0入0汤圆

发表于 2011-4-27 13:20:53 | 显示全部楼层
9325 白屏中。。。

出0入0汤圆

发表于 2011-8-29 11:16:46 | 显示全部楼层
OK

出0入0汤圆

发表于 2011-8-29 14:38:56 | 显示全部楼层
听说这两块芯片停产了。。。

出0入0汤圆

发表于 2011-9-5 15:36:24 | 显示全部楼层
回复【17楼】beihai326  
-----------------------------------------------------------------------

不是,9325不是很多的。

出0入0汤圆

发表于 2011-9-20 21:14:30 | 显示全部楼层
mark

出0入0汤圆

发表于 2011-9-20 21:14:51 | 显示全部楼层
mark

出0入0汤圆

发表于 2011-10-17 15:45:43 | 显示全部楼层
感激不尽~

出0入0汤圆

发表于 2012-1-7 14:29:46 | 显示全部楼层
mark

出0入0汤圆

发表于 2012-1-11 19:18:32 | 显示全部楼层
mark,学习中

出0入0汤圆

发表于 2012-7-28 07:08:02 | 显示全部楼层
mark,再求ili9331与ILI9325的驱动的区别?请大神们指点一二,小弟感激不尽——stm32菜鸟

出0入0汤圆

发表于 2012-11-28 09:59:57 | 显示全部楼层
9331白屏中

出0入0汤圆

发表于 2012-11-28 22:24:37 来自手机 | 显示全部楼层
我用过SSD1289 1963 ILI9325 9331 R61509没有一块白屏的……

出0入0汤圆

发表于 2013-4-8 22:48:58 来自手机 | 显示全部楼层
学习一下....

出0入0汤圆

发表于 2014-1-7 10:36:45 | 显示全部楼层
看看                                         

出0入0汤圆

发表于 2014-1-15 15:43:22 | 显示全部楼层
4楼代码很好用,收下了。

出0入0汤圆

发表于 2014-7-2 12:28:44 | 显示全部楼层
4楼的代码很好用,谢了!

出0入0汤圆

发表于 2015-2-5 16:41:41 | 显示全部楼层
下载4搂的代码看看
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-23 12:36

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表