第十一届蓝桥杯嵌入式组别底层驱动程序-拓展板(18B20温度传感器)

第十一届蓝桥杯嵌入式组别底层驱动程序-拓展板(18B20温度传感器)

PA6-TDQ
添加18B20底层驱动函数

/*********************************************************************
* 文件名称:18B20
* 日期版本:2019-12-2/V3.0b 
* 作    者:零点工作室(RMLS)
*********************************************************************/
#include "stm32f10x.h"
#include "ds18b20.h"
uint6_t z;
    ds18b20_init_x();
        z=(ds18b20_read()&0x7ff);
     	LCD_ClearLine(Line0);
     	sprintf(str," t= %2.2f",(float)z/16.);
     	LCD_DisplayStringLine(Line0, str);

猜你喜欢

转载自blog.csdn.net/weixin_43352501/article/details/103354445