我在设计硬件时没有仔细阅读datasheet,只连接了rw和en,rs接到了vcc上,现在我想画张图,要从液晶里向外读取数据
当前的gdram,那位用过这样能实现吗?下面的代码时网上找的
/------------------------------------------------------------------------------
// 读数据
//------------------------------------------------------------------------------
unsigned char LCD_read_data(void)
{
unsigned char data_in;
LCD_read_status(); //根据需要检测忙
SET_DATA_IN;
SET_LCD_RS;
SET_LCD_RW;
SET_LCD_RS;
SET_LCD_RW;
CLR_LCD_E;
CLR_LCD_E;
CLR_LCD_E;
CLR_LCD_E;
SET_LCD_E;
SET_LCD_E;
data_in = LCM_DATA_IN;
SET_DATA_OUT;
return(data_in);
} |