基于51單片機(jī)驅(qū)動LCD1602液晶顯示thb6064ah細(xì)分64 作者: 時間:2016-11-30 來源:網(wǎng)絡(luò) 加入技術(shù)交流群 掃碼加入和技術(shù)大咖面對面交流海量資料庫查詢 收藏 void LCD_write_command(uchar command){while(LCD_check_busy());LCD_RS = 0;LCD_RW = 0;LCD_E=0;_nop_();_nop_();LCD_DB = command;_nop_();_nop_();_nop_();_nop_();LCD_E = 1;_nop_();_nop_();_nop_();_nop_();LCD_E = 0;}void LCD_write_data(uchar dat){while(LCD_check_busy());LCD_RS = 1;LCD_RW = 0;LCD_E = 0;LCD_DB = dat;_nop_();_nop_();_nop_();_nop_();LCD_E = 1;_nop_();_nop_();_nop_();_nop_();LCD_E = 0;delay_n40us(1);}void LCD_disp_char(uchar x,uchar y,uchar dat){uchar address;if(y == 1){address = 0x80 + x;}else{address = 0xc0 + x;}LCD_write_command(address);LCD_write_data(dat);}void LCD_disp_str(uchar row,uchar * str){int i;if(row == 1){for(i=0;str[i]!=