新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 基于51單片機驅(qū)動LCD1602液晶顯示thb6064ah細分64

基于51單片機驅(qū)動LCD1602液晶顯示thb6064ah細分64

作者: 時間:2016-11-30 來源:網(wǎng)絡(luò) 收藏
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]!=