- CS 片选信号
- RS (置1为写数据,置0为写命令)
- /WR (为0表示写数据)
- /RD (为0表示读数据)
- RESET 复位LCD( 用固定命令系列 0 1 0来复位)
- SYS_CSx 对应CS
- SYS_OE 对应RD
- SYS_WE对应WR
- SYS_RS对应RS
- 这里没有对应RESET,直接采用某一个IO口来代替。 在mini6410中 这里采用VD[21]即GPJ5来充当RESET脚
- 数据脚 输出VDOUT[17:0],与RGB管脚不一样的是,MCU-LCD还带有 VDIN[17:0],即显存中的数据可以通过命令读取出来。
我们测试是采用学生公司的MCU LCM,爱诺信2.8"的mcu屏。因为接口不是完全兼容,因此只能用采用复杂连线板来匹配。开发板使用的是mini6410。
这个LCM按其管脚要求配置成 16bpp(565)。这是LCM一侧的跳线配置。
相应的,在S3C6410一侧使用VD[0-15]
因此在S3C6410 一侧,采用VD[0-15]来与其对接
I80 硬件波形分析
---------------------------------------------------------
启动波形
根据I80的要求,每次如果需要RESET LCD屏,需要用软件发送 101序列。
这是MCU-LCD IC里的RESET波形图
这里我们实测LCD屏的启动波形
MCU-LCD初始化屏幕,一般出现如下画面表示硬件连线正确,并且初始化成功.
写入波形
在MCU-LCD中,用RS脚来区别是向MCU屏发送命令还是数据。而且通常每一种MCU屏有一组初始化命令,它具体的序列取决了不同硬件,所以不同型号的MCU-LCD屏初始化命令序列是不一样的,这个要由生产厂家来提供。
参考S3C6410提供的I80标准波形,在写入时,WE必须是低电平,RS取决于写入命令还数据。CS是片选有效,是低电平有效。
//MCU屏要求,每次Reset要求送一个 1,0,1的波形 |
LCD_MCU_Write_Register(0x00E3,0x3008); LCD_MCU_Write_Register(0x00E7,0x0012); LCD_MCU_Write_Register(0x00EF,0x1231); LCD_MCU_Write_Register(0x0001,0x0100); LCD_MCU_Write_Register(0x0002,0x0700); LCD_MCU_Write_Register(0x0003,0x1030); LCD_MCU_Write_Register(0x0004,0x0000); LCD_MCU_Write_Register(0x0008,0x0207); LCD_MCU_Write_Register(0x0009,0x0000); LCD_MCU_Write_Register(0x000A,0x0000); LCD_MCU_Write_Register(0x000C,0x0000); LCD_MCU_Write_Register(0x000D,0x0000); LCD_MCU_Write_Register(0x000F,0x0000); LCD_MCU_Write_Register(0x0010,0x0000); LCD_MCU_Write_Register(0x0011,0x0007); LCD_MCU_Write_Register(0x0012,0x0000); LCD_MCU_Write_Register(0x0013,0x0000); Delay(10); LCD_MCU_Write_Register(0x0010,0x1490); LCD_MCU_Write_Register(0x0011,0x0227); Delay(10); LCD_MCU_Write_Register(0x0012,0x001A); Delay(10); LCD_MCU_Write_Register(0x0013,0x0700);//1000 LCD_MCU_Write_Register(0x0029,0x0001);// 0015 LCD_MCU_Write_Register(0x002B,0x000C); Delay(10); LCD_MCU_Write_Register(0x0020,0x0000); LCD_MCU_Write_Register(0x0021,0x0000); LCD_MCU_Write_Register(0x0030,0x0000); LCD_MCU_Write_Register(0x0031,0x0607); LCD_MCU_Write_Register(0x0032,0x0305); LCD_MCU_Write_Register(0x0035,0x0000); LCD_MCU_Write_Register(0x0036,0x1604); LCD_MCU_Write_Register(0x0037,0x0204); LCD_MCU_Write_Register(0x0038,0x0001); LCD_MCU_Write_Register(0x0039,0x0707); LCD_MCU_Write_Register(0x003C,0x0000); LCD_MCU_Write_Register(0x003D,0x000F); LCD_MCU_Write_Register(0x0050,0x0000); LCD_MCU_Write_Register(0x0051,0x00EF); LCD_MCU_Write_Register(0x0052,0x0000); LCD_MCU_Write_Register(0x0053,0x013F); LCD_MCU_Write_Register(0x0060,0xa700); LCD_MCU_Write_Register(0x0061,0x0001); LCD_MCU_Write_Register(0x006A,0x0000); LCD_MCU_Write_Register(0x0080,0x0000); LCD_MCU_Write_Register(0x0081,0x0000); LCD_MCU_Write_Register(0x0082,0x0000); LCD_MCU_Write_Register(0x0083,0x0000); LCD_MCU_Write_Register(0x0084,0x0000); LCD_MCU_Write_Register(0x0085,0x0000); LCD_MCU_Write_Register(0x0090,0x0010); LCD_MCU_Write_Register(0x0092,0x0600); LCD_MCU_Write_Register(0x0093,0x0003); LCD_MCU_Write_Register(0x0095,0x0110); LCD_MCU_Write_Register(0x0097,0x0000); LCD_MCU_Write_Register(0x0098,0x0000); LCD_MCU_Write_Register(0x0007,0x0133); |
#define LCD_MCU_START_WRITE() rI80IFCONB0 |=(1<<9) void LCD_MCU_Write_Cmd(unsigned short cmd){ rLDI_CMD0 = cmd; //等Normal command 变为0 while(!( (rI80IFCONB0& (1<<9)) == 0)); rLDI_CMDCON0 = (rLDI_CMDCON0 & (0x0)) |((0x01)<<0); //01 : Normal Command Enable rLDI_CMDCON1 = (rLDI_CMDCON1 & (0x0)) |((0x0)<<0); //Command 0 RS control,送命令 LCD_MCU_START_WRITE(); Delay(10);}void LCD_MCU_Write_Data(unsigned short data){ rLDI_CMD0 = data; //等Normal command 变为0 while(!( (rI80IFCONB0& (1<<9)) == 0)); rLDI_CMDCON0 = (rLDI_CMDCON0 & (0x0)) |((0x01)<<0); //01 : Normal Command Enable rLDI_CMDCON1 = (rLDI_CMDCON1 & (0x0)) |((0x1)<<0); //Command 0 RS control ,送数据 LCD_MCU_START_WRITE(); Delay(10);} |