原创 C51 温湿度传感器DHT11驱动 LCD1602显示程序 硬件通过 含电路图和实际测试效果图
/**************************************************************************** * 名 称:Init_Lcd() 主函数调用
* 功 能:Lcd初始化
* 入口参数:无
* 出口参数:无
* 范 例: 在主函数中直接调用
****************************************************************************/
void Init_Lcd() //LCD初始化
{
LCD_write_char(0x38,0);
Delay_ms(1);
LCD_write_char(0x38,0);
Delay_ms(1);
LCD_write_char(0x38,0);
Delay_ms(1);
LCD_write_char(0x0c,0);
Delay_ms(1);
LCD_write_char(0x06,0);
Delay_ms(1);
LCD_write_char(0x0c,0);
Delay_ms(1);
//
}
/**************************************************************************** * 名 称:LCD_write_str(uchar X,uchar Y,uchar *s)主函数调用
* 功 能:在指定地址写一个字符串 eg:Y=0,1,2,3,4,5,6,7,8,9,10...15。 X=0,1。 * 入口参数:X:横坐标 Y:纵坐标 *s:字符串首地址
* 出口参数:无
* 范 例: LCD_write_str(1,1,uchar *s)
****************************************************************************/ void LCD_write_str(unsigned char X,unsigned char Y,unsigned char *s)
{
LCD_write_char(0,' ');
LCD_set_xy( X, Y ); //写地址
while (*s) // 写显示字符
{
LCD_write_char( 0, *s );
s ++;
}
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库原创 C51 温湿度传感器DHT11驱动 LCD1602显示程序 硬件通过 含电(4)在线全文阅读。
相关推荐: