//================================================
// LCD_Write_Command.c
//================================================
void LCD_Write_Com(uchar com)
{
LCD_RS_Low; //Instruction
LCD_RW_Low; //Write
LCD_EN_Low;
LCD_DATA=com; //P0 receive data
LCD_EN_High; //Open
LCD_EN_Low; //Close
timer_ms_delay(20); //used for busy check
}
//================================================// LCD_Write_Data.c
//================================================void LCD_Write_Data(uchar date)
{
LCD_RS_High; //Data
LCD_RW_Low; //Write
LCD_EN_Low;
LCD_DATA=date; //P0 receive data
LCD_EN_High; //Open
LCD_EN_Low; //Close
timer_ms_delay(20); //used for busy check
}
//================================================// LCD_initialization.c
//================================================
void LCD_initi()
{
/* timer_ms_delay(15); 为什么把这些屏蔽后,显示就不正常了呢?
LCD_Write_Com(0x38);麻烦高手给一个写指令,写数据以及标准初始化的程序!
timer_ms_delay(5);
LCD_Write_Com(0x38);小弟这里谢啦!
timer_ms_delay(5);
LCD_Write_Com(0x38);
timer_ms_delay(5); */
LCD_Write_Com(0x38); //Data Bus 8 bit,line 2,5*7pot/character
LCD_Write_Com(0x0c); //Display on,No cursor,No cursor flashing
LCD_Write_Com(0x06); //光标右移,且AC值加1
LCD_Write_Com(0x01); //Clear,即光标回到左上方,AC的值设置为0
}
为什么把这些屏蔽后,显示就不正常了呢?麻烦高手给一个写指令,写数据以及标准初始化的程序!
小弟这里先谢过啦! |