|
发表于 2009-8-14 17:56:00
|
显示全部楼层
void init_lcd_interface(void)
SET_LCD_PARALLEL_CE2WR_SETUP_TIME(3);指 LCD的CS对WR的setup time, n<=3
SET_LCD_PARALLEL_CE2WR_HOLD_TIME(3);指CS to WR的hold time, n<=3
SET_LCD_PARALLEL_CE2RD_SETUP_TIME(0);//CS to RD setup time, n<=3
SET_LCD_PARALLEL_WRITE_WAIT_STATE(5);//Write的timing, n<=31
SET_LCD_PARALLEL_READ_LATENCY_TIME(0);//Read的timing, n<=31
SET_LCD_ROI_CTRL_CMD_LATENCY(4); //这个会影响到刷屏速度, n<1023
Example:
SET_LCD_PARALLEL_CE2WR_SETUP_TIME(2);
SET_LCD_PARALLEL_CE2WR_HOLD_TIME(0);
SET_LCD_PARALLEL_CE2RD_SETUP_TIME(0);
SET_LCD_PARALLEL_WRITE_WAIT_STATE(2);
SET_LCD_PARALLEL_READ_LATENCY_TIME(2);
SET_LCD_ROI_CTRL_CMD_LATENCY(2);
Assume the system clock is 52 MH,The system clock cycle is approximate 20ns.
In this example, the write strobe (WR low) will be (2+0+2 )*20ns= 80ns. Read strobe (RD low) period will be
(2+1)*20ns=60ns. And the WR/RD high period will be 2*20ns=40ns. |
|